The Official Ionic Blog

Build amazing native and progressive web apps with HTML5

iOS 9 is releasing next week, and with it comes some changes and bugs that Ionic developers need to be aware of. Even if your app was published for an earlier version of iOS, you might still need to make some fixes due to regressions released by Apple in the web browser.

Apple sent out an email last night (Friday 9/11/2015) encouraging developers to test and submit their apps NOW to make sure they are out in time for iOS 9 release next week: “To prepare, build your apps using Xcode 7 GM seed, and test with the GM seeds of iOS 9. Read the App Review Guidelines and use TestFlight to get feedback before submitting to the App Store.”

This would seem to indicate there’s time to make the iOS 9 roll out if you test, fix, and submit ASAP.

window.location bug

UIWebView, where Ionic, Cordova, and web content historically ran, introduced a regression with the way window.location works. Basically, the value doesn’t properly update synchronously anymore.

The impact of this is that Angular’s browser location detection behaves in unpredictable ways, which bubbles up through UI-Router and impacts Ionic.

There is a fix that must be applied in your Angular/Ionic app. Please read my post and use the patch created by Igor from the Angular team found in it.

Also, empty href links <a href="#"> will trigger your otherwise state, so test those and remove the empty href if necessary.

Radio button issue

UIWebView broke how tilde CSS selectors work. The impact of this change is probably quite widespread on the web, but has manifested itself in an Ionic bug with radio buttons. We’ve removed the need for the tilde selector and the issue is resolved.

To fix, add the new ion-radio-fix directive and corresponding CSS from this gist. Make sure to change any reference to <ion-radio> to <ion-radio-fix>.

Note: this fix is now in Ionic master. So, if you’re feeling adventurous, you could alternatively use a new release of Ionic to avoid having to apply the radio patch.

App Transport Security

iOS 9 introduces a new security feature that blocks non-HTTPS traffic in your app. However, this is a new feature that is only enabled for apps building with X Code 7 and iOS 9 SDK today. It will not break existing apps.

Since the changes above require recompilation, this will impact your development process and manfiest itself as a breaking change.

To fix, edit the MyApp-Info.plist file and add the contents of this patch.

Conclusion

iOS 9 introduces a number of new features, but also several regressions in the supplied UIWebView browser. These issues are not present in iOS Safari, so mobile websites built with Ionic will not break. They are also not present in WKWebView, the new web view environment in iOS.

There is some good news here: Cordova will soon support WKWebView on iOS, which will bring some great performance and feature improvements to Cordova and Ionic apps. We will move to this new feature as soon as it’s ready, and we hope that will happen some time this fall.

Thank you to everyone who helped isolate and fix these issues. It always sucks when breaking changes happen, and going forward we are going to tighten up our OS release testing process to make sure we catch these regressions early and also assume that regressions introduced in iOS betas will not be fixed in time for the GM releases. Unfortunately, we assumed these glaring bugs would be fixed in time but they were not.

  • ohh2ahh

    Thank you for your excellent work on the issues. I fixed the window.location bug and the radio button issue with your patches. I already sent the update to Apple review and asked for an expedited review. Unfortunately the expedited review got decline. Therefore it seems that the window.location bug is in Apple’s eyes not very critical.

  • vaibhavn1

    Hello team,

    Cant we use https://github.com/Telerik-Verified-Plugins/WKWebView plugin. As it already support WKWebView?

    • Marc

      Hi vaibhavn1,
      we are using it since iOS 8 release as UIWebview was already bugged.
      Moreover, the project is well maintained as several iOS9 specific fixes have been released.

  • Felipe Wagner

    Regarding the App Transport Security, this simple gist will solve the problem:

    https://gist.github.com/felipew/6e73a3d52607288f64b5

    • Hossam Hammady

      Please don’t set arbitrary loads to true, this will probably end in the
      rejection of your app. It is better to add exceptions per domain. Please
      see this stackoverflow answer: http://stackoverflow.com/a/30732693/441849

  • Justin Martiniak

    Does anyone have any issue using Ionic Deploy with ios9/xcode7? My app is crashing.

    • arun

      no i got the output in devic !!

    • http://vigie-benjamin.com/ Vigié Benjamin

      Yes, I tried today and my app is broken too.

      Seems to be an issue when extracting the new app. check() and download() are still fine, but the extract() softly die without any traces.

      As a result, the app can’t start for the next launch. I’m blocked on my splashscreen…

  • linus

    We are still facing issue in UIWebView when we have hash tag in the URL. With the patch and without the hash , issues seems to be resolved. Any one knows how to get the patch work with hash tag in the URL as well?

  • Willy Guevara

    does anyone have used this? this solved the App Transport Security Issue for my apps
    https://www.npmjs.com/package/cordova-plugin-transport-security

    • http://www.pdsullivan.com Patrick Sullivan

      I am using that. Seems to be working well. ?

  • arun

    In ionic app development, i develop app for android and apple, In my app implement the google maps but android device output is works perfect but ios the map dnt display in ios device !!!

    • Esports Clips

      This was happening to us. We had to manually set the height of the map container

  • arun

    I have issue in ios development and also list in image view also not displaying 🙁

  • Sam Evoj

    Hello , I have a problems like : Undefined symbols for architecture arm64:

    “_CDVPageDidLoadNotification”, referenced from:

    -[CDVSplashScreen pluginInitialize] in CDVSplashScreen.o

    when archive ionic project in Xcode.

    Thanks.

  • http://androidkidsgames.blogspot.com/ katie woolsey

    i am sure that the iOS 9 will be featuring lot of amazing things..i have seen a list of tips and tricks for the features of the latest iOS devices: http://goo.gl/Xl37Po

  • Daniel Hutton

    Thanks! I have almost finished my first (rather large) app and was surprised at how different the app was when I tested on ios 9 for the first time. This seems to have fixed all of the problems I had with navigation.

  • Pedro Justo

    After install the patch I get this error in xcode for all phones. iPads are OK

    #import

    int main(int argc, char* argv[])
    {
    @autoreleasepool {
    int retVal = UIApplicationMain(argc, argv, nil, @”AppDelegate”);
    return retVal;
    }

    With error: Thread 1:signal SIGABRT on int retVal……

    • Esports Clips

      We had this too, we had to disable bitcode.

  • Mirko Nasato

    Note that Ionic 1.1.1 includes fixes for the window.location and radio button issues:
    https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#111-yttrium-yeti-2015-11-05

  • ravishtiwari

    Hey Max, is there any breaking changes from iOS 10 with adverse impact on Ionic/Hybrid apps? It’s release is around the corner, we have encountered issues with push notification, but, that is related to plugin and not Ionic related.

  • Jorge Cacho

    Which is the minimum iOS version an Ionic app can run on?

    Thanks!