1

I have a problem building my ionic project on iOS with xcode, the sources get compiled correctly (or atleast it seems so) but when "Apple Mach-O Linker" try to link my obj files, I get an error saying 256 duplicate symbols for architecture arm64 and then I do not manage to understand the logs (logs below) since it refer to cordova generated files from the typescript ionic project

Here is what i tried :

  • Creating a new ionic blank project to see if it was a problem with XCode configuration itself (it works with a blank project)
  • Cleaning up the whole DerivedData folder
  • Pod deintegrate and install
  • cordova clean ios && cordova platform remove ios && cordova platform add ios
  • Opening explicitely .xcworkspace file
  • Changing enable bitcode from YES to NO
  • Changing the build path to somewhere else than DerivedData
  • Changing "Build Active Architectures Only" to YES

None of them worked and I feel like i'm out of solutions and energy, is there anyone with other solutions or ideas ?

here is the error log : https://codepaste.net/d2qzh2

I didn't put the whole log there (only the beginning, the end, and a small part at the middle because the whole middle is kind of the same)

here is my package.json that may help aswell : https://codepaste.net/4ckbha

Thanks for your time

UPDATE

Found out that my problem isn't linked to console (even tho i shouldn't have console) but to cordova-plugin-add-swift-support so that when cordova platform add ios build the xcode project, it build it with swift conversion, and then i have the same problem described upper, followed all of the answers on the possible duplicate question but nothing worked out

Rakiah
  • 240
  • 2
  • 15
  • Possible duplicate of [Running Ionic 3 app on iPhone throws error: 2 duplicate symbols for architecture arm64](https://stackoverflow.com/questions/46173762/running-ionic-3-app-on-iphone-throws-error-2-duplicate-symbols-for-architecture) – Suraj Rao Oct 17 '17 at 04:29
  • remove "cordova-plugin-console": "^1.0.7", plugin – Suraj Rao Oct 17 '17 at 04:29
  • Thank you for your time ! i did removed the cordova plugin console, however (thank you for this anyways, i can only benefit from removing garbages :D) this is not the reason why i can not build, but good news, i managed to isolate the problem, i have a package (cordova-plugin-ionic) that have dependencies to cordova-plugin-add-swift-support), when i manage to cordova platform add ios without swift support, i can build correctly and everything is fine, so my problem is that the xcode project won't build with swift, do you have an idea about that ? – Rakiah Oct 19 '17 at 01:35

1 Answers1

2

Managed to fix it, I had two plugins colliding with each other, my solution to find the problem was to create a blank project and re-add my plugins one by one until i see which one was in fault and then do the same backward to find the other one in fault

the two plugins were ionic-deploy and cordova-plugin-ionic which is obvious now that i think of it

Rakiah
  • 240
  • 2
  • 15