This is due to the location permission setting issue caused by the Xcode upgrade.
Upgrade Xcode6, Xcode7 after opening the previous XCODE5 project, the program cannot be located. Project upgrade to Xcode6 or Xcode7 compile requires iOS8 to write their own authorization, or do not have permission to locate.
Workaround:
First, the corresponding default field is added to the Info.plist, the value is set to Yes (foreground position write top field, front and back position write bottom field)
Nslocationwheninuseusagedescription//Allow GPS description to be obtained at the front desk
Nslocationalwaysusagedescription//Allow the description of GPs to be obtained in front and backstage
Diagram of the setting:
Well, if you set it up, go to coding learning, and familiarize yourself with the classes, methods, and properties that Apple provides about location services:
1, Location services and map application Location services: Get the user's current location information, the user's location information to do relevant data processing.
Map application: According to the actual needs of the map and surrounding environment information, based on the user's current location to show the user's attention to the map location information, and for the user navigation.
- Location Services to master:
- Main classes of operations: Cllocationmanager
- Owning Library: corelocation
- Structure: cllocationcoordinate2d (latitude and longitude), Clclocationcoorregion (region)
- The map application needs to be mastered:
- Frame: Mapkit
- Operation class: Mkmapview
2. Location Services
iOS location and positioning system--Getting Started notes