Shazron's Cordova (aka PhoneGap) Blog

at Adobe Systems Inc.

Cordova iOS and iOS 8

with 100 comments

ios8-heroiOS 8 was just released – and Cordova supports it fully, but it is still using the existing UIWebView iOS browser component (more on the new iOS 8 WKWebView later).

The main issues were in the core plugins, which have since been updated in the Cordova Plugin Registry. Update your plugins by removing and re-adding them.

If you use any of these plugins below, you will need to update these plugins and re-release your app for iOS 8, since your existing app built pre-iOS 8 may be broken in iOS 8 without these fixes.

These plugins have been updated for iOS 8:

1. Camera
2. Geolocation
3. StatusBar
4. Contacts


This plugin had a fix to use the new Geolocation permissions in iOS 8. Users are now prompted whenever you require a geolocation – this is for the JPEG format EXIF data. The plugin has a new preference as well, called CameraUsesGeolocation which defaults to false. Previously you had no control over this, it was always true.


This plugin had a fix to use the new Geolocation permissions in iOS 8. Users are now prompted whenever you require a geolocation.


This plugin had a fix for pickContact — iOS 8 has added new delegate functions to handle people picking, without the fix this feature was broken in iOS 8.


Landscape mode for the StatusBar plugin was broken in iOS 8, and the updated plugin fixes it. This is because on iOS 8, screen size is now orientation dependent — previously it was based off portrait mode. The StatusBarBackgroundColor preference is now omitted as well when you install the plugin, leaving it effectively transparent (was #000000 or black). You will have to now set it explicitly.

CDV_IsIPhone5 macro

For whatever reason you are using this, realize that it is broken currently (same reason as the StatusBar landscape fix). If your plugin is not using this macro, don’t worry about it. It has already been fixed for 3.7.0.


If you are using the Web Inspector, you might see “deprecated attempt to access property” errors that are harmless. It has already been fixed for 3.7.0.


Webkit_LogoWe tried.

Unfortunately there is a serious bug in WKWebView where it can’t load file:// urls, so it has hampered our efforts. This functionality was working in iOS 8 betas 1 to 3 on the device (it always works in the iOS 8 Simulator), but broken after that. I’m not sure what the ETA for the bug fix is, but it is in Apple’s radar (literally!).

In the meantime, we have some ideas, like running a local webserver to load the local assets. More info and discussion here.

For all the issues related to Cordova iOS and iOS 8, including our work in getting WKWebView support, check out this task list.


Written by shazron

September 18, 2014 at 11:44 pm

Posted in cordova, phonegap

100 Responses

Subscribe to comments with RSS.

  1. Thank you for the update!!!


    September 19, 2014 at 1:03 am

  2. Hi, there’s a copy/past in the “Camera” section (it talks about geolocation).


    September 19, 2014 at 8:50 am

    • That is correct – there is geo in the plugin to get the EXIF data for JPEG images.


      September 19, 2014 at 1:33 pm

  3. Thanks for your latest update. I resolved Geolocation issue in my app with OS 8.

    Ved Sahani

    September 19, 2014 at 11:46 am

  4. Thanks for the update Shazron 🙂

    Lee Crossley (@lee_crossley)

    September 19, 2014 at 2:12 pm

  5. Thanks for the hard work!

    FSTest1 (@fsapptest1)

    September 19, 2014 at 3:09 pm

  6. Will the plugins still work in iOS7?

    Jonathan Aquino

    September 19, 2014 at 5:30 pm

  7. Does Cordova 2.9 support iOS8?

    Angel Muñoz

    September 19, 2014 at 7:33 pm

    • No.


      September 20, 2014 at 12:26 am

      • Are you sure? We’re using Cordova 2.8 and app still is working pretty nice. Yes, there are several problems but I don’t see why it shouldn’t work on 2.8 and 2.9.
        About our problems:
        1. App periodically crashes when it’s launching. But as I see, it’s common problem for iOS 8.
        2. XCode 6 is crap right now. It shows “Could not inspect the application package” message constantly.
        3. I don’t know why but XCode 6 right now changes application Id on every setting up (it changes sandbox pathes for documents directory but we dependent on it).


        September 24, 2014 at 8:11 am

  8. Thanks Shazron! Can you point me in the right direction to update my app so it supports the new iPhone 6 and 6 plus screen sizes? Right now the app just auto-scales. My app is fully responsive so is it just a matter of including new splash screen sizes in the config file? I’m using Phonegap Build. Thanks!

    Adam Johnson

    September 19, 2014 at 10:41 pm

  9. […] More information, and more detail can be found here. […]

  10. Thanks, Shazron. Your little article saved my days …:-)


    September 20, 2014 at 8:08 am

  11. Thanks for the update! I can’t wait for the WKWebView support to land in Cordova, as it should bring a nice performance boost to iOS Cordova apps.


    September 20, 2014 at 8:49 am

  12. The splash screen plugin is also broken. It uses the CDV_IsIPhone5 macro and it loads the wrong splash screen for iPhone 6 devices.


    September 21, 2014 at 3:47 pm

    • The macro fix is in a core iOS update, so it will have to wait for that. There’s a lot of work to be done still so splashes are more robust


      September 21, 2014 at 7:24 pm

      • Any ideas when the updated splashscreen plugin for iOS 8.0 be released ?


        September 22, 2014 at 3:33 pm

      • No ETA but probably not this week.


        September 22, 2014 at 4:22 pm

  13. Thanks a million for the update. Struggled with geolocation for a while … walking around town with laptop and ipad 😉


    September 21, 2014 at 5:04 pm

  14. I’m getting this error when using the takePicture in CDVCamera.m “Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.”

    Anyone else getting this error?

    Charl Coetzee

    September 22, 2014 at 1:01 pm

    • I’m getting it too. It only seems to appear when the targetWidth/targetHeight are set and prevents my success callback from ever getting called.

      Max Ellinger

      September 23, 2014 at 9:53 pm

      • Looks like it isn’t just us: — weirdly this only seems to be happening on our newer builds, older builds with an older version of the camera plugin (let me know if you want me to check which) work fine in iOS 8.

        Max Ellinger

        September 23, 2014 at 9:59 pm

      • Hi Max. Sorry for the late reply. Even if i take out the width and height, it still gives me the error. I’m currently running the iOS8.1 beta. No luck 😦


        October 7, 2014 at 11:30 am

    • Did you find the fix??


      November 26, 2014 at 8:07 pm

    • I am getting same error in IOS 8.1.2. Please suggest any solution.

      pankaj Vagare

      January 13, 2015 at 7:09 am

  15. which version I should use to make my apps at least build correctly with the ios 8?

    Daniel Hernandez

    September 22, 2014 at 5:51 pm

  16. After removing the plugin, and adding it again via the github repo url. I’ve got the following error. I have the same error with the contacts and the camera plugin.

    ps: was working well before. cordova version 3.5

    Any thoughts? Thanks

    2014-09-22 17:39:39.184 APP[625:38094] CDVPlugin class CDVLocation (pluginName: Geolocation) does not exist.
    2014-09-22 17:39:39.185 APP[625:38094] ERROR: Plugin ‘Geolocation’ not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
    2014-09-22 17:39:39.186 APP[625:38094] -[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [


    September 23, 2014 at 12:46 am

    • In xcode go to build phases and add the complied sources and any link libraries mention in the config.xml.


      September 23, 2014 at 1:54 am

      • Thanks, it worked.

        on iOS8, taking a picture with the front camera makes the app crash. (Was working fine on iOS7). Any thoughts about that?


        September 23, 2014 at 2:14 am

  17. Hi Shazron,

    can you please take a look on this issue? My app stops loading local files when I update it via iTunes or use “phonegap local run ios”. I’m not sure if it’s a PhoneGap issue or an iOS issue.

    Thank you!


    September 23, 2014 at 11:37 am

  18. […] Although Apple implemented this change in iOS Safari, as well as its new WKWebView control, it did not change the scroll behavior in its old UIWebView control. And because of a major bug in the replacement WKWebView control, the Cordova team cannot upgrade to WKWebView yet. […]

  19. hello,

    I just updated cordova to version 3.6.3-0.2.13 and I’m getting the same error when I try to emulate my app. Also I tried to create a new app and emulate it and got the same issue. Seems that upgradig cordova wasn’t the solution because I had the same issue with version 3.5.

    I’m working on a macbook with OS 10.9.5, cordova 3.6.3-0.2.13, xcode 6.0.1

    2014-09-24 09:27:48.859 ios-sim[21279:507] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fdd38602a40’
    *** First throw call stack:
    0 CoreFoundation 0x00007fff8e27025c __exceptionPreprocess + 172
    1 libobjc.A.dylib 0x00007fff972c5e75 objc_exception_throw + 43
    2 CoreFoundation 0x00007fff8e27312d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3 CoreFoundation 0x00007fff8e1ce272 ___forwarding___ + 1010
    4 CoreFoundation 0x00007fff8e1cddf8 _CF_forwarding_prep_0 + 120
    5 ios-sim 0x00000001091f0e29 -[iPhoneSimulator LoadSimulatorFramework:] + 245
    6 ios-sim 0x00000001091f28e0 -[iPhoneSimulator runWithArgc:argv:] + 2271
    7 ios-sim 0x00000001091f2cb2 main + 101
    8 ios-sim 0x00000001091f0ce4 start + 52
    libc++abi.dylib: terminating with uncaught exception of type NSException
    TestApp/platforms/ios/cordova/run: line 158: 21279 Abort trap: 6 ios-sim launch “$SIMULATOR_APP_PATH” –stderr “$CORDOVA_PATH/console.log” –stdout “$CORDOVA_PATH/console.log” $TARGET_FLAG –exit
    Error: /Users/dhernandez/development/personal/mobile/games/TestApp/platforms/ios/cordova/run: Command failed with exit code 134
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)

    Daniel Hernandez

    September 24, 2014 at 2:33 pm

  20. Awesome work.

    When will this plugin be available at Phonegap Build?


    September 25, 2014 at 8:43 am

  21. I just updated the geolocation plugin, but it is not picking up the custom location in the ios emulator. I get a kCLErrorDomain 0. It was working fine before the update. Anyone else experience this?


    September 26, 2014 at 3:50 am

  22. Hey Shazron,

    how do i install 3.7 version from the GitHub repo?

    Need to update!



    September 26, 2014 at 2:22 pm

  23. Hey Shazron,

    The iOS 8.0.2 update did not fix file upload (input type=file) within inappbrowser. Trying to use the camera or select files still crashes our app.
    My guess is that Apple fixed UIWKWebView (because input type=file now works in Mobile Safari), but not UIWebVew.

    Do you have any words of wisdom?

    Our app is currently using Cordova 3.3

    Thank You

    Paul Martinelli

    September 26, 2014 at 6:35 pm

    • Hi Shazron,

      I am facing the same trouble as Paul describes, even after updating to iOS 8.1 (iPad). I have an app built with Cordova 3.4, using the inappbrowser. In the HTML I use an input type=file component but as soon as I try to use the camera (or select from library) the app crashes.

      I would have hoped and actually assumed that Apple would fix this in iOS 8.1, but they didn’t. I could not yet find any soulmates having the same issue with iOS 8.1

      Is this even on Apple’s radar?

      Thanks in advance


      October 23, 2014 at 9:50 am

      • Post the sample code that you used, so I can verify.


        October 31, 2014 at 7:00 pm

      • It’s just a standard input:


        November 4, 2014 at 1:35 pm

      • input type=”file” id=”upload”


        November 4, 2014 at 1:37 pm

  24. I applied step 3 of this tutorial and solved my problem for getting geolocation, tested in iPhone6 with iOS 8.0.2


    September 27, 2014 at 11:28 am

    • The plugin already installs this Info.plist value, you shouldn’t have to manually install it.


      September 28, 2014 at 6:13 am

  25. Yep, it hit our app as well. App crashes when camera view or library is clicked. I hope Apple really gets their things sorted quickly! My app is useless with this bug…


    September 29, 2014 at 3:57 pm

  26. I’ve just updated to use geolocation version 0.3.10, but I’m not seeing the location permissions popup on iOS8. Is there something special I have to do to make that appear? Currently, I’m just getting a timeout error when I call `getCurrentPosition`.

    Matt Huggins

    September 29, 2014 at 8:51 pm

    • Did u sort this out?


      October 7, 2014 at 7:29 am

    • Same thing happens for me. In the old app the permission popup shows but when I build a new one (using adobe phonegap build) nothing happens. I can see in settings that no location permission is set for the app. Changing it does not change anything the getCurrentPosition just fails.


      October 13, 2014 at 12:44 pm

    • Works for me now, found a solution here I added this to config.xml

      Allow GPS


      October 13, 2014 at 2:59 pm

      • tags doesn’t seem to work, what I did was to add the gap:config-file metioned in the thread


        October 13, 2014 at 3:01 pm

  27. Thank you Shazron! Helping a lot of us out with your work.


    September 30, 2014 at 5:08 pm

  28. […] you’re working with iOS, some more recommended reading is Shazron Abdullah’s recent blog post on iOS 8 and Cordova. In fact, if you’re working with Cordova / Phonegap iOS, you should be reading all of Shazron’s […]

    • Could you explain more about the fix to use the new Geolocation permissions in iOS 8? What problem would happen without the fix? I’m wondering if similar plugins that use the camera (such as my LastPhotoTaken plugin, or the cordova-imagePicker for choosing multiple images) will still work without this fix.


      October 6, 2014 at 5:49 pm

      • The old camera plugin will always ask for geo permission for jpgs when taking new pics (new plugin has this turned off by default). If not updated, it will silently fail for new jpgs and you won’t get the pic.


        October 7, 2014 at 7:28 am

  29. […] Shazron’s blog goes into more details on a few other essential plugins here. […]

  30. I’m seeing some performance issues running on iOS 8 with Cordova 3.6. It seems like exec() calls only happen once every second. Running the same code but with iOS 7 the exec() calls do not see this delay. The performance difference is night and day,

    I’ve tested this on a real devices and using the simulator. Both of them are showing the exact same issue with exec() calls only happening once a second.

    Is there something stupid I missed or is there is there a real issue here?


    October 7, 2014 at 2:52 pm

    • Replying to myself here.

      The reason for why exec-calls (and other Javascript code) was executing so slowly was because they occurred in a UIWebView in the background. My application is managed by UINavigationController and once I push a new ViewController onto my Navigation Controller the old UIWebView seem to run Javascript much slower than if it had been in front. This does not happen on iOS 7. Making sure the JS is run from a UIWebView in the active ViewController has made the appplication much faster.


      October 14, 2014 at 6:11 am

  31. Hi, for anyone else hit with the file:// bug, I wanted to share a work-around. My issue was that the Media class wasn’t playing local files in ios8 anymore. After overthinking the problem, I was able to work around the issue by referencing the Documents folder in the CDVSound.m class directly rather than looking up the file in in my JS project. So I’m creating the full path on the obj-C side rather than in JS. You can see the diff here:


    October 7, 2014 at 4:28 pm

  32. I manage a long-term project and tend to run into problems updating XCode and Cordova. Where can I find some guidance on which version(s) or Cordova work with which versions of the iOS SDK?

    e.g. It appeared Cordova 3.6* wasn’t compatible with XCode 5.1 so I had to downgrade to Cordova 3.5.

    [* *]


    October 8, 2014 at 11:55 am

  33. […] このチャートはiOS 8上でのPhoneGapの性能向上を明示するが、WKWebViewの次のリリースにPhoneGapがどれほど上手く順応できるかは示されていない(アドビはテストしていると言うが、現状ではバグによってWKWebViewの使用は不可能だ)。Scirraによると、WKWebViewが組み入れられれば、PhoneGapは「この(性能)差を埋めて、Safariの性能に対抗できる」だろう、ということだ。 […]

  34. Great news. I hope Ios 8 Is better for ios7


    October 9, 2014 at 7:02 am

  35. In ios 8 i see some app’s status bar is small and mine is bigger how can we make it small ? (IPHONE 6 / IOS8)

    Yusuf B.

    October 11, 2014 at 11:43 am

  36. Hi Shazron,

    Under, you wrote:

    “Update, the file url loading bug is fixed! See:
    It appears the bug was a result of their updated sandboxing.
    However, I tested it in iOS 8.1 beta and the new API function is not there yet sad-face. Hopefully it will be in 8.2 or 8.3. We should get the WKWebView train running again once that API function is in, assuming it works as advertised.”

    Is there any possibility that Apple included this fix into the 8.1 that is supposed to be released today? Any ideas as to how we can confirm/deny without waiting for the 8.1 to be made available?



    October 20, 2014 at 1:13 pm

    • It’s not there. You can File -> Open Quickly… in Xcode and load WKWebView.h to check.


      October 31, 2014 at 6:59 pm

      • Hi Shazron, do you have any suggestions for a temporary fix to this? Our app is dependant on IndexedDB and UIWebView doesn’t support IndexedDB (in ios8), but WKWebView does. Would rather not have to swap out IndexedDB with another solution.

        8.1.1 beta is out today, but it will take a while for to support 8.1.1?


        November 4, 2014 at 9:00 pm

  37. Using phone gap 3.4.0 and the camera plugin either installed from repository – 0.3.2 –, or directly from GitHub – On iOS 8.0.2, nothing happens when you do getPicture. I did units and install of the plugin in these two ways using phone gap command line : phone gap local add plugin

    Yoram Kornatzky

    October 22, 2014 at 5:23 pm

    • You probably did something wrong. It does work. Post your sample code.


      October 31, 2014 at 7:00 pm

  38. I upgraded to IOS 8.1(12B410) on my iPad2,Yosemite 10.10 on my Mac, Cordova 3.6.3, jQuery 1.11.1, jQuery Mobile 4.4.3 and added all of the new plugins and I am still getting the error message below in xCode Version 6.1 (6A1052d) console when I click a button in my app to take a photo:

    Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.

    The photo is taken an everything works but I get this error message every time I take a picture. Why am I getting this message? Is it a bug in the Apple’s software? Do I need to worry about this in terms of getting my app in the Apple Store? Am I doing something wrong?

    This is the only error that is preventing me from completing this application. Your help is greatly appreciated.

    Wilfred Sessoms

    October 28, 2014 at 9:38 am

  39. I guess iOS 8.1 is still buggy?

    René Dudfield

    October 28, 2014 at 10:42 am

  40. I’ve found a work around for the local load issue WKWebView has. It is much simpler than the local web server you’ve suggested. Look at


    October 31, 2014 at 6:51 pm

    • I don’t think it’s “simpler” (yes I read your post). In any case, Apple already fixed this by adding a loadFileUrl function for WKWebView (coming soon). That’s simple.
      Adding a local web server is simple as adding a plugin (already done), and modifying one tag.


      October 31, 2014 at 6:57 pm

      • I think a local webserver plugin is going to be fantastic. I’m working on a project where being able to create virtual paths to load items from core data is essential and this seems to be very interesting for stuff like that.


        November 18, 2014 at 1:52 am

  41. Hi guys, anyone experiencing problems with the camera plugin 0.3.3 when dismissing the camera by clicking the cancel button? The app literally crashes on iOS 8.1, cordova 4. Any suggestions?
    XCode shows the following error:

    *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]’

    I’ve googled endlessly but without success… any help would be greatly appreciated!


    November 3, 2014 at 11:14 pm

  42. The cordova 3.6.3 camera plugin doesn’t work in ios 8.1.

    Cam Tullos

    November 9, 2014 at 6:01 pm

    • Hi Cam – what doesn’t work specifically? Would appreciate a bug report at so you can be notified of work done on it.


      November 19, 2014 at 10:41 pm

      • It works when I start a fresh project, but didn’t when I uninstalled the camera plugin and installed the new one. So I guess it’s a non-issue.

        Cam Tullos

        November 19, 2014 at 10:45 pm

  43. […] initial issues that needed to be resolved for PhoneGap/Cordova to be supported with it due to the reasons explained here by resident iOS expert Shazron (essentially an issue with loading local file URLs). Apple has […]

  44. Is there a release date for 3.7.0 ?


    November 19, 2014 at 8:20 am

  45. Hello, I have a problem when trying to run my app in iso8, I found in the logs some issue with registerForRemoteNotificationTypes, I’m using the statusbar plugin and the splashscreen. My cordova version is 3.3.
    Could you tell me what should I do? Upgrade to cordova 3.6 or 3.7 or just update the statusbar plugin.
    This is not my area of expertise so the question might sound a bit dump.

  46. What are the version numbers of the plugins that contain the fixes for ios8 ?
    For camera, phonegap build user 0.3.2 – is that up-to-date ?


    December 15, 2014 at 11:41 am

    • Sorry if that was a dumb question – the docs of 0.3.2 seem to suggest the fixes are in there. Its just that ‘CameraUsesGeolocation’ preference doesnt seem to do a thing on my ios8 tester devices (running phonegap, iow vs 0.3.2). Where exactly does that preference go ?


      January 30, 2015 at 5:24 pm

      • Ah – that wasnt obvious. In order to have the camera use geolocation on ios8, you need to have the geolocation plugin installed, too. Well, it sounds very obvious 🙂 But that wasn’t required in ios7.


        January 30, 2015 at 6:07 pm

  47. […] Nitro Javascript engine accessible to Hybrid applications on iOS.  At the moment there is a bug in WkWebView which is why PhoneGap does not yet support it directly.   The bug has been fixed in WebKit, but […]

  48. Hi Shazron, Thanks for the article. Strangely, I am able to load file:// URLs just fine on iOS 8, but I can no longer access the value stored in document.referrer. Is this related?


    January 19, 2015 at 6:16 am

    • That’s impossible, are you using WKWebView and not loading from tmp? It’s a known verified bug, confirmed by Apple. Try my sample app. Not sure what’s going on with your document.referrer.


      January 19, 2015 at 7:56 pm

  49. Status bar still displays no matter the config.xml setting or settings in xcode

    James Wagoner

    April 23, 2015 at 9:38 pm

  50. Hi Shazron,

    I have two problem when i am trying to run my app in iso8,
    First is the app crashes many time at startup. I am unable to find reason why it is crashing.
    Second is I have used Device plugin for getting device uuid. App sometime gives window.device.uuid as undefined and some times it gives an object with device uuid info. I have uninstalled/reinstalled the device plugin, but it is still inconsistent in getting device uuid.
    My cordova version is 4.2.0 and phonegap version is 4.2.0-0.26.0.

    Please suggest.



    May 12, 2015 at 12:57 pm

    • This is not an issue tracker. This is more suited for Stack Overflow, or the PhoneGap Google Groups. If you can reproduced this in a new fresh project, file an issue at


      May 12, 2015 at 8:54 pm

      • Ohk Thanks for your suggestion!
        I just want to know that is the cordova device plugin still works perfectly with iOS8 or it has any limitation in IOS8.


        May 13, 2015 at 5:49 am

  51. […] which was the only webview class available until iOS8 was released. Due to reasons discussed here, Cordova was unable to support the WKWebView fully and cleanly until this latest release. In […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: