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.

  • Autoresizing issue of UICollectionViewCell contentView's frame in Storyboard prototype cell (Xcode 6, iOS 8 SDK) happens when running on iOS 7 only
  • How do I link a .sks file to a .swift file in SpriteKit
  • Creating a Bridging Header
  • How can I delete a “Run Script” build phase in Xcode 6?
  • How to create ipa in xcode 6 without Apple Developer account?
  • How to get textLabel of selected row in swift?
  • 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,