iOS make static package duplicate symbol solution

Source: Internet
Author: User

Original link http://stackoverflow.com/questions/41217839/ Duplicate-symbols-when-integrating-firebase-and-google-sign-in-sdks-manually-wit

When making a static package we are likely to introduce third-party libraries, which can easily occur when our static packages and the third-party libraries introduced by the main project have the same library, in order to solve the problem above the link gives the solution.

1, first make a static package.

2. Use Lipo-info to see if this static package is a FAT file, and if it is a FAT file, it will be split into a x86_64.a,i386.a package of multiple models.

3. Execute Ar-x i386.a When we get a file that is not fat files This command can split this static library into multiple. o files, and each. o file is the compiled output of all. m files in our project. At this point, select the. o file of the third-party library we are referencing to delete all. And then the rest is our code.

4. Add all of our own. o Files together to generate a new. A file: lipo-static *.o-output i386_new.a This form

5, using the above method will all the above generated arm_64.a,i386.a,x86_64.a generated a copy of *_NEW.A this file

6, re-synthesis: Lipo Create ARM_64_NEW.A I386_new.a-output xx.a

7, the synthesis of xx.a is what we want to remove the third-party library of the final static package, add to your main project, if it is loaded pod, the other linker flag-framework Delete and then pod update

->xcode run.

iOS make static package duplicate symbol solution

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.