Geolocation is not working in iOS 8 simulator

I have upgraded the geolocation plugin in cordova 3.5 to fix the issue in iOS 8 by following this post.

  • cordova 3.4 with xcode 5.1 won´t build with latest file-transfer plugin
  • Error '_BSMachError: port 1607; (os/kern) invalid capability (0x14) “Unable to insert COPY_SEND” in Cordova app on iOS 10
  • Using Stripe Checkout with Cordova ios 4.0.0+
  • How does one get a fixed header to stay at the top of the page?
  • How to uninstall PhoneGap from my project and machine
  • Cordova: Unexpected Machine Code - Your upload contains both bitcode and native machine code
  • After running the app in iOS8 simulator, I am getting the notification ‘Allow “MyApp” to access your location while you use the app?’ But it still shows the error locationManager::didFailWithError (null) after allowing the location service to use the app. I have tried to close the simulator and run it again and again. Also it seems that location service is active (Settings > Privacy > Location services > MyApp > While Using) by checking the settings in the simulator. By running the same app in iOS 7 simulator is working fine and able to detect the lat/lng.

    FYI: I am using Xcode 6 to build the application.

    Any help/suggestion will be helpful.

    2 Solutions Collect From Internet About “Geolocation is not working in iOS 8 simulator”

    it sounds strange but it really works at least on my Xcode 6 Project. Make also sure to add the required Keys to your Projectname-info.plist file (e.g NSLocationWhenInUseUsageDescription -> as a Key)

    Next check your scheme (Product -> Scheme -> Edit Scheme -> Allow Location Simulation)
    If you are using a gpx file you can also mark it as a default location.

    Now you can start your simulator by pressing the run button (play symbol). As soon as your application started you will get notified for the permission.

    The final fix now is to go to iOS Simulator -> Debug -> Location and change the location by choosing one out of the list except the custom location. Wait a little and change it back to custom location if it didnt change back by itself.

    It worked for me,
    hope for you too

    In iOS Simulator -> Debug -> Location, choose one
    that will be alright,