How to Fix the iOS 9 AngularJS UIWebView Issue

Posted: September 18th, 2015Author:

If your users upgrade their Apple device to iOS 9, you could run into a problem when working with the window.location API. The Ionic team found this issue (thank you) and posted a workaround with this patch. Adding this patch to an Appery.io Ionic (or Bootstrap) app is very simple. Let me show you how.

  1. Open your app in the App Builder
  2. Select Create new > JavaScript
  3. Name the JavaScript resource: ngIOS9UIWebViewPatch
  4. Select Angular module in Dependency optionsScreen Shot 2015-09-18 at 1.35.36 PM
  5. Next, click on the Create JavaScript button to create a new AngularJS module
  6. There will be some default code in the file. Go ahead and delete all of it
  7. Go to the patch page and copy all the code in the patch page into the JavaScript file you are creating
    Screen Shot 2015-09-18 at 1.44.35 PM

You are done! Don’t forget to save the changes.

Note: This issue is fixed in AngularJS 1.4.6. Once we upgrade AngularJS to this version, you won’t need this patch any more.