Geolocation is not working in iOS 8 simulator

前端 未结 2 1197
南笙
南笙 2021-01-15 15:20

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

http://shazronatadobe.wordpress.com/2014/09/18/cordova-ios-an

相关标签:
2条回答
  • 2021-01-15 15:35

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

    0 讨论(0)
  • 2021-01-15 15:46

    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 regards Schreda

    0 讨论(0)
提交回复
热议问题