I want to write a Javascript in a standard location and connect this file to a page html.
Write: (using Swift 1.2)
let path = NSTemporaryDirectory() + "foo.js"
var error: NSError?
text = "12345"
text.writeToFile(path, atomically: true, encoding: NSUTF8StringEncoding, error: &error)
html:
<html>
<head>
<script src="path/foo.js"></script>
</head>
<body>
<p> Use Foo </p>
</body>
Which path i can use?