duplicate symbols for architecture arm64 after Xcode 8.0 update

前端 未结 10 1389
再見小時候
再見小時候 2020-12-31 08:46

I get duplicate symbols error after I updated my Xcode. (find the code down) Does anybody get this too? And how could be solved?

I tried to remove

相关标签:
10条回答
  • 2020-12-31 09:00

    I understand most people are solving this by either the No Common Blocks or the Dead Code setting, but that is actually a workaround for the real issue. In my case, I was using a Pod file that was adding the same libraries I already had linked, so basically I removed the duplicate files in my Build Phases link libraries that were already compiled in my Pod file and the Archive feature worked.

    0 讨论(0)
  • 2020-12-31 09:00

    In your Xcode 9 project you will see left hand side 3 column search icon click that then search for: -Objc in the search bar and then you will see a pod config file open that. Now remove the -ObjC from the inherited it will solve the issue.

    0 讨论(0)
  • 2020-12-31 09:04

    The solution is in this post. You're not up to date with this, but at least it solves the problem for now and at least in my scenario I don't have any problems with that version.

    0 讨论(0)
  • 2020-12-31 09:04

    These are the steps that I took to resolve this issue:

    1. Select the first duplicated compiled source … Search for something in the error message like: CDVWKWebViewEngine or EventSliderCell.o in your case;
    2. Select your project in XCODE (top left) then select Build Phases;
    3. In the filter text field enter the compile source that has been reported as duplicated (e.g. CDVWKWebViewEngine);
    4. You should receive at least 2 results for that source - one in cordova-plugin-ionic-… and another in cordova-plugin-wkwebview-...;
    5. Select the cordova-plugin-wkwebview-… one and click on the “-“ sign (bottom left);
    6. Now try to build again and do this for all the compile sources that are duplicated.
    0 讨论(0)
  • 2020-12-31 09:07

    for my case, Xcode 9 , we were declaring constants in some header file

    Constants.h

    static NSString *const kSomeString = @"SomeString";
    

    so importing Constants.h in multiple .m files causes the duplicated symbols

    Solution:

    Constants.h

    extern NSString * const kSomeString;
    

    Constants.m

    NSString *const kSomeString = @"SomeString";
    
    0 讨论(0)
  • 2020-12-31 09:07

    I did not want to change any of these settings since no one really knows what other side effects these may have. So I iust globally searched for that variable name, replaced the name the caused the conflict in one class to variable_Classname.

    That solved the issue for me without changing any setting

    0 讨论(0)
提交回复
热议问题