This shows you the differences between two versions of the page.
objective-c:examples:uiwebview_using_local_resources [2014/08/19 02:03] Mo |
objective-c:examples:uiwebview_using_local_resources [2024/02/16 01:06] (current) |
||
---|---|---|---|
Line 261: | Line 261: | ||
To make the Javascript part work one more thing is necessary:\\ | To make the Javascript part work one more thing is necessary:\\ | ||
{{:objective-c:examples:buildphases.png}}\\ | {{:objective-c:examples:buildphases.png}}\\ | ||
- | Click on the blue project icon at the top of the project-navigator on the left and then under targets select the target with name of your project. Find 'Build Phases' and add the main.js to 'Copy Bundle Resources' while clicking add(+) and select your .js file. And that's it! | + | Click on the blue project icon at the top of the project-navigator on the left and then under targets select the target with name of your project. Find 'Build Phases' and add the main.js to 'Copy Bundle Resources' while clicking add(+) and select your .js file. And that's it!\\ |
+ | |||
+ | Run the project and you should see somethings like this. A Javascript call and the index.html after closing the alert:\\ | ||
+ | {{:objective-c:examples:jscall.png}}{{:objective-c:examples:indexcontent.png}}\\ | ||
I hope this will help somebody somehow. Took me a while to figure this small amount of how-to out. Happy coding :) | I hope this will help somebody somehow. Took me a while to figure this small amount of how-to out. Happy coding :) |