I am getting a warning when I try to run JavaScript with Cocoa:
warning: no rule to process file '$(PROJECT_DIR)/myJavaScriptFile.js' of type sourcecode.javascript for architecture armv7
remove myJavaScriptFile.js
from your Xcode Product Target\'Compile Sources'
and it'll be ok
Remove .js file from Compile Sources and add to Copy Bundle Resources in a Build Phases page (if you want to access this file in your application through
[NSBundle mainBundle] pathForResource:@"myJavaScriptFile.js"]
)
I propose a work around I use, which streamline the process when you have to update on regular basis your javascript, by getting rid of any additional manual operation.
Say you have a file name code.js included in a code.html.
simply rename code.js into code.js.html and don't forget to change your inclusion tag in the html as follows:
<script src="code.js"></script>
into
<script src="code.js.html"></script>
Then you simply have to add code.js.html and code.html to your resource straight into xcode and voila!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With