warning : No Rule to process javascript for architecture armv7
I am getting a warning when I try to run JavaScript with Cocoa:开发者_StackOverflow中文版
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!
The way to fix this is to click on the myJavaScriptFile.js
file in the left hand pane of Xcode. Then on the right hand pane, highlight the File Inspector (the first icon) and then look at the Target Membership section. You will find that it is ticked for at least one of your Build Targets. Untick it from all Targets. Then do a Cmd-Shift-K Clean and then a Cmd-Shift-B Analyse.
精彩评论