iOS integrates a simple Baidu Map SDK into the project

Source: Internet
Author: User

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.

    1. Download the iOS SDK for: http://developer.baidu.com/map/index.php?title=iossdk/sdkiosdev-download
    2. New project, get Bundle identifier, for example: Com.winson.test. cstest Notice the gray cstest, is to be handwritten in (very important);
    3. Back to Baidu Map API home page, if you are not a developer, registered as a developer, and then open the "console"
    4. Create an app, apply the type "for mobile", and the security code for your project bundle identifier.
    5. The app was created successfully and got ' AK '. For example:
    6. Back to the project, drag and drop 3 files from the first download SDK into your project.
    7. are divided into two types:
      1. (Real machine test)
      2. (simulator) What do you choose for yourself?
    8. 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:
    9. Setting: Target, Build settings, lingking, other Linker Flags, Debug, any architecture| Any sdk:-all_load
    10. Change APPDELEGETE.M file to appdelegate.mm
    11. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.