Ionic iOS build failed upon install with following error can't get around it so far


#1

guys i am new to ionic an searched forum did’t find anything similar. may be you can help

/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)

duplicate symbol OBJC_IVAR$_CDVWebViewDelegate._state in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
duplicate symbol OBJC_IVAR$_CDVWebViewDelegate._curLoadToken in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
duplicate symbol OBJC_IVAR$_CDVWebViewDelegate._loadStartPollCount in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
duplicate symbol OBJC_CLASS$_CDVWebViewDelegate in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
duplicate symbol OBJC_METACLASS$_CDVWebViewDelegate in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVWebViewDelegate.o)
duplicate symbol OBJC_IVAR$_CDVTimerItem._name in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_IVAR$_CDVTimerItem._started in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_IVAR$_CDVTimerItem._ended in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_IVAR$_CDVTimer._items in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_METACLASS$_CDVTimerItem in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_CLASS$_CDVTimerItem in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_CLASS$_CDVTimer in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
duplicate symbol OBJC_METACLASS$_CDVTimer in:
/private/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
/var/root/myApp/platforms/ios/build/emulator/libCordova.a(CDVTimer.o)
ld: 114 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
Ld /private/var/root/myApp/platforms/ios/build/emulator/myApp.app/myApp normal i386
(1 failure)
Error: /var/root/myApp/platforms/ios/cordova/build: Command failed with exit code 65
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Mahtab-Haiders-MacBook-Pro:myApp root# ionic emulate ios
add to body class: platform-ios
Running command: /var/root/myApp/platforms/ios/cordova/run --emulator
Error: ios-sim was not found. Please download, build and install version 1.7 or greater from https://github.com/phonegap/ios-sim into your path. Or ‘npm install -g ios-sim’ using node.js: http://nodejs.org/
Error: /var/root/myApp/platforms/ios/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
Mahtab-Haiders-MacBook-Pro:myApp root# cd myApp


#2

I have exactly the same issue…


#3

I’m getting 10 duplicates in xcode resulting in build failure. This didn’t start happening only I manually added the connection plugin

cordova plugin add https://github.com/apache/cordova-plugin-network-information

** If I remove the plugin then it works again but I need this plugin :persevere:


#4

What version of cordova are you using. I know that a lot of plugins broke between 4-5 because of the new updates and most plugins haven’t had a chance to update. But that being one of their plugins it should work… If you haven’ yet, I’d also search outside of this forum. We are just a tiny portion of the people who use Cordova and you’ll probably find more answers


#5

I’m personally using cordova 4.3 and xcode 6.3.1. So far I haven’t found much else on the web about this issue. I’ll post something on stackoverflow.com as well.


#6

So what you’re going to want to do is try cleaning the project before and after you remove and add the plugin. Sometimes the files get jumbled up and this will wipe out any old configuration that might be causing a double platform issue

./platforms/ios/cordova/clean

in your terminal when you’re in the directory should do the job. There’s also an Xcode short cut but I can’t remember what it is. So remove the plugin, do that, make sure it runs. Add the plugin, do that, make sure it runs. If it doesn’t then it’s most definitely a plugin issue and you probably will have to figure out a new way to use the plugin.


#7

Thanks for your help NNC, this worked after:

  1. $ ./platforms/ios/cordova/clean
  2. $ sudo ionic plugin remove cordova-plugin-network-information
  3. $ sudo ionic plugin add https://github.com/apache/cordova-plugin-network-information
  4. $ sudo ionic build ios

#8

I’m very glad, I program a lot of native stuff and run into stuff like this every once in a while. It’s hard if you’re not constantly in the native side of things for sure. Happy I could help