Running Ionic 3 app on iPhone throws error: 2 duplicate symbols for architecture arm64

后端 未结 5 2287
太阳男子
太阳男子 2020-12-15 19:22

I am opening .xcworkspace of my Ionic 3 project and trying to run it on my device but I suddenly get the following error in Xcode:

Ld /Users/man         


        
相关标签:
5条回答
  • 2020-12-15 19:38

    The problem here is cordova-ios@latest.

    And we could fixed this issues with:

    • Uninstall cordova-ios first, with npm uninstall cordova-ios
    • Install cordova-ios with npm install cordova-ios@4.4.0
    • After that we should add platform with ionic cordova platform add ios@4.4.0
    • The last one, run ionic cordova build ios, that open with xcode and build with your settings.
    0 讨论(0)
  • 2020-12-15 19:41

    Since duplicate symbols are there, just removed "-ObjC" from both Targets and Project:

    Build Settings -> Linking -> Other linker flags.

    also try to remove any unwanted libraries from

    Targets -> Build Phases -> Link Binary with Libraries

    0 讨论(0)
  • 2020-12-15 19:48

    Since cordova IOS 4.5 they are including cordova-plugin-console, which results in the plugin being duplicated.
    To fix just run:

    cordova plugin rm cordova-plugin-console
    
    0 讨论(0)
  • 2020-12-15 19:50

    To solve the problem please have a look over this blog post from Cordova iOS 4.5. http://cordova.apache.org/announcements/2017/09/08/ios-release.html

    You need to remove plugin "cordova-plugin-console" that is installed by default when generating a new Ionic project. Now this is in core part of cordova for iOS.

    0 讨论(0)
  • 2020-12-15 19:51

    The solution @arunraj414 worked for me, from xcode you can solve it this way:

    Delete either one

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