0

My app works fine in Chrome/Safari web browsers but when I try to run it from Xcode I get an error. I only started getting this error once I added the cordova plugin Network Information via cordova plugin add https://github.com/apache/cordova-plugin-network-information

Also, I'm on cordova 4.3.0 and Xcode 6.3.1. Is there any way to get past this currently?

Xcode error

Ld /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Products/Debug-iphoneos/blankApp.app/blankApp normal arm64
    cd "/Users/Default/Sites/MyAppƒ/blankApp/platforms/ios"
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Products/Debug-iphoneos -F/Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Products/Debug-iphoneos -filelist /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/blankApp.LinkFileList -dead_strip -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -ObjC -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=6.0 -framework AssetsLibrary /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Products/Debug-iphoneos/libCordova.a -framework CoreGraphics -framework MobileCoreServices -framework CoreMotion -framework CoreLocation -weak_framework SystemConfiguration -Xlinker -dependency_info -Xlinker /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/blankApp_dependency_info.dat -o /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Products/Debug-iphoneos/blankApp.app/blankApp

duplicate symbol _OBJC_IVAR_$_CDVConnection._callbackId in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-1CADCF0E5137048B.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-8352C031B56FFD70.o
duplicate symbol _OBJC_IVAR_$_CDVConnection.connectionType in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-1CADCF0E5137048B.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-8352C031B56FFD70.o
duplicate symbol _OBJC_IVAR_$_CDVConnection.internetReach in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-1CADCF0E5137048B.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-8352C031B56FFD70.o
duplicate symbol _OBJC_IVAR_$_CDVConnection.type in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-1CADCF0E5137048B.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-8352C031B56FFD70.o
duplicate symbol _OBJC_METACLASS_$_CDVConnection in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-1CADCF0E5137048B.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-8352C031B56FFD70.o
duplicate symbol _OBJC_CLASS_$_CDVConnection in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-1CADCF0E5137048B.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVConnection-8352C031B56FFD70.o
duplicate symbol _OBJC_IVAR_$_CDVReachability.reachabilityRef in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-20459C55ECAAB2A7.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-A1ACF8C458D4507A.o
duplicate symbol _OBJC_IVAR_$_CDVReachability.localWiFiRef in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-20459C55ECAAB2A7.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-A1ACF8C458D4507A.o
duplicate symbol _OBJC_CLASS_$_CDVReachability in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-20459C55ECAAB2A7.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-A1ACF8C458D4507A.o
duplicate symbol _OBJC_METACLASS_$_CDVReachability in:
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-20459C55ECAAB2A7.o
    /Users/Default/Library/Developer/Xcode/DerivedData/blankApp-hkvrfpembsxtsxdafnzhlomraujc/Build/Intermediates/blankApp.build/Debug-iphoneos/blankApp.build/Objects-normal/arm64/CDVReachability-A1ACF8C458D4507A.o
ld: 10 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Solution

Here's what worked for me:

  1. $ ./platforms/ios/cordova/clean
  2. $ sudo ionic plug remove cordova-plugin-network-information
  3. $ sudo ionic plugin add https://github.com/apache/cordova-plugin-network-information
  4. $ sudo ionic build ios
1
  • 1
    Have you tried running a clean in xcode? Commented May 26, 2015 at 21:49

1 Answer 1

1

When you add some plugins , ios build start failing for no apparent reason. Most of the time this is nothing to do with the plugin.

Removing the platform and adding it back again worked for me all the time.

try removing and adding the platform(s) again

ionic platform remove ios

ionic platform add ios

read here about the same king of an issue and the solutions

HTH

Sign up to request clarification or add additional context in comments.

2 Comments

I removed, added, cleaned, and built. I'm getting the same error but oddly enough now it's complaining about duplicate symbols for x86_64 instead of arm64.
Worked after: 1) $ ./platforms/ios/cordova/clean 2) $ sudo ionic plug remove cordova-plugin-network-information 3) $ sudo ionic plugin add https://github.com/apache/cordova-plugin-network-information 4) $ sudo ionic build ios

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.