Recently playing Baidu Map API, during the encounter a lot of problems, can only show me stupid. Now a record down, later use can come back to review.
- Download the iOS SDK for: http://developer.baidu.com/map/index.php?title=iossdk/sdkiosdev-download
- New project, get Bundle identifier, for example: Com.winson.test. cstest Notice the gray cstest, is to be handwritten in (very important);
- Back to Baidu Map API home page, if you are not a developer, registered as a developer, and then open the "console"
- Create an app, apply the type "for mobile", and the security code for your project bundle identifier.
- The app was created successfully and got ' AK '. For example:
- Back to the project, drag and drop 3 files from the first download SDK into your project.
- are divided into two types:
- (Real machine test)
- (simulator) What do you choose for yourself?
- After the introduction of Inc , mapapi.bundle and LIBBAIDUMAPAPI.A into the project, to import some of the frameworks used, the framework I have temporarily imported has these:
- Setting: Target, Build settings, lingking, other Linker Flags, Debug, any architecture| Any sdk:-all_load
- Change APPDELEGETE.M file to appdelegate.mm
- Code Show:
AppDelegate.h
appdelegate.mm
AaViewController.h
Aaviewcontroller.m
Here, a simple map application is done, is it very simple??? A lot of practical features, look carefully at sdk!
Run:
iOS integrates a simple Baidu Map SDK into the project