When using Xcode to do WebApps, use UIWebView to invoke a page, and sometimes encounter problems, one is compiled with a yellow exclamation point of the Warning,js file are error: Warning:no rule to Process "$" ( Project_dir)/jquery-1.8.1.min.js ' of type Sourcecode.javascript for architecture i386
The error reason is: JS and HTML and other resource files when added to project, Xcode mistakenly put JS files in the compiled source code (Compile Sources) folder, the JS code also need to "be compiled."
Workaround: Drag the JS file from the targets->build phases-> Compile Sources to the copy Bundle resource
Knowledge Points:
- Copy Bundle resources: Refers to the generated product's. What resource files will be included in the app. By using the different settings of the content in the copy Bundle resources, we can let different product contain different resources, including the main icon of the program, etc., instead of incorporating the resources listed in the Xcode project into the brain.
- Compile Sources: Refers to what source code will be compiled
- Link Binary with Libraries: refers to which library files are referenced during compilation