Notes on the application of Baidu SDK added to the project projects, need to pay attention to
1. When applying for key (key), select the iOS SDKin the app type and provide the bundle Identifier for the project.
2. In the info of the targets item, the name of the bundle display name and value cannot be null to add key.
3, in the Appdelegate class of the program entry out, need to register the application key, used to detect the success of the authorization. (Failure will not show Baidu map)
_mapmanager = [[Bmkmapmanager alloc]init]; = [_mapmanager start:@ "pfszn6qgblchkirfh2bzw7e3psmiwbpk" generaldelegate:self];
4, in the project has at least one point mm suffix (Baidu SDK written in C + +), or can be in the build phases declaration of an object C + +.
5, in the Project Appdelegate class implementation Agent Bmkgeneraldelegate:
- (void) Ongetnetworkstate: (int) ierror{if(0==ierror) {NSLog (@"Networking Success"); } Else{NSLog (@"Ongetnetworkstate%d", Ierror); } }- (void) Ongetpermissionstate: (int) ierror{if(0==ierror) {NSLog (@"Authorized Success"); } Else{NSLog (@"Ongetpermissionstate%d", Ierror); }}
iOS development Reference Baidu Map SDK (ii)