iOS third party Baidu map environment build a

Source: Internet
Author: User

First, follow the official notice to modify the Xcode environment

  1. The static library is implemented in objectc++, so you need to ensure that you have at least one. mm suffix source file in your project (you can rename any. m suffix file to. mm), or specify the compilation method in the project properties, and Edit the Xcode project, Compile Sources as set to "objective-c++", Build-Gcc4.2-language, Active Target

  2. If you use Bmkmapview in the Xib file only, and you do not use Bmkmapview in your code, the compiler does not link the corresponding symbol when linking, and it needs to be explicitly set in the project properties: Edit Active Target in Xcode, project- > Build, linking, and other Linker flags add-OBJC

  3. If you are using XCODE5 to develop a iOS7-based Baidu maps application, add the XCODE5 project, Edit Active Target, Build, linking, and other Linker flags -OBJC "modified to"-all_load "

Second, the official download of the Baidumap_iossdk_v2.3.0_lib library import.

Three

  1. LIBBAIDUMAPAPI.A removed from link Binary with Libraries in build phases in Xcode

  2. setting in the library Search Paths in build in Xcode about the deletion of Baidu maps

  3. Clean up Project

  4. In Xcode, add the link Binary with Libraries in build phases (if you just need simulator debugging) in Release-iphonesimulator LIBBAIDUMAPAPI.A.

    In Xcode in build phases, add the path in the Library Search Paths (if you just need simulator debugging)inrelease-iphonesimulator .

    Note: But I suggest to use the real machine debugging, map, of course, positioning is the first, how to position on the computer =. = Analog location multi-egg pain ... So the suggestion added above is renamed add Release-iphoneos

  5. Clean up Project

  6. Rebuilt a moment project


There is usually no problem with the above operation.


It is strongly recommended that you build the library and write the project first. Already a small partner has been pit =. = Only strange, not statically compiled ... I'll take the time to check and learn.


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.