Is there a way to inject a local JS file or a JS file that’s store on my server into any web page loaded by UIWebView?
Say I navigate to google.com in that UIWebView, it renders that page and also runs my JS file (local or on my webserver)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The following code will inject javascript locally
Just pass in the name of the file before the js, eg.
To do inject javascript from your server you can download it first and load it into the web view in a similar manner.