Geolocation is not working in iOS 8 simulator
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.
- How to add buttons to navigation controller visible after segueing?
- Xcode 6 GM iPhone 6 Simulator - Storyboards not sizing correctly, appear zoomed in
- CVCalendar Setup
- 6.0.1 and Table changes “UILabel? does not have a member named 'text”
- FBSOpenApplicationErrorDomain code =4 error
- Scene size in Xcode 6 / SpriteKit / Swift
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,
- Xcode Interface Builder – “correct” way to delete/rename miswired IBoutlets / IBactions
- Why should we declare variables for @property
- NSCFData isResizable crash?
- NSFetchedResultsController: Fetch in a background thread
- xCode: how to fix Thread 5: EXC_BREAKPOINT (code=1, subcode=0x10025c76c)
- UICollectionView's cell registerClass in Swift
- Get back UIImage data after saving it to photo Library in iOS
- In App Purchases For IOS 7 Simulator Possible?
- Use Swift's Date with CoreData
- Do declared properties require a corresponding instance variable?
- How could I type check CGColor / CGPath?
- Indoor navigation hardware/software requirements for iOS
- UILocalNotification fire when i open the notification tray to see the notification
- Calculating MAX and MIN Latitude and Longitude with distance from Location – Objective C
- Passing closure in swift as parameter to be used by selector in function