IOS7 upgrade to IOS8, Baidu map IOS SDK positioning function is not available, to the vast number of developers brought inconvenience, here to share a way to solve the sub-problem. (The official adaptation is still in progress and will meet with the developers soon)
1. Add in Info.plist:
Nslocationalwaysusagedescription=yes
Nslocationwheninuseusagedescription=yes
2, before calling the Baidu map IOS SDK positioning, run the following code:
if ([[[Uidevice currentdevice].systemversion Floatvalue] >= 8) { //due to a change in the authorization mechanism located in IOS8 requires manual authorization Cllocationmanager *locationmanager = [[Cllocationmanager alloc] init]; Obtaining Authorization for Certification [Locationmanager requestalwaysauthorization]; [Locationmanager requestwheninuseauthorization];}
IOS8 Location Failure problem