Ionic Error: Apple Mach-O Linker Error - Have tried so much already

I am getting an error running my Ionic app on ios via xcode due to the error “Apple Mach-O Linker (id) Error. Linker command failed with exit code 1 (use -v to see invocation)”. I have tried every solution indicated on the other forum posts, with no luck.

  1. I have tried opening .xcworkspace instead of .xcodeproj
  2. I am not using push notifications plugin. The only plugin I have added is the camera.
  3. I have tried looking in Build Phases to remove the “pods” reference, but there is no reference to pods.
  4. I have tried rebooting
  5. I have tried installing, removing platforms/plugins, reading plugin, rebuilding, opening .xcworkspace.

This is not a complicated app, basically created a new blank app, added camera plugin, called getPicture on button click, and display the picture in an img component. That’s it.
Any help would be greatly appreciated, as this has already consumed hours and hours.
Thanks Bob

What is your ionic info output?

Can you compile and run a new, blank app with no modifications?

Have you tried removing and re-adding the iOS platform on your project?

2 posts were split to a new topic: Ionic Error: Apple Mach-O Linker Error

Can you ionic cordova build ios or ionic cordova run ios?
How exactly are you building in Xcode?
What exactly is the complete error you are getting?

I solved the problem, but not in a very useful way. I found that when I attempted to deploy the same code on a different Mac it worked great. Since my OS was already in need of a fresh start, I simply started over from scratch. After that, after installing Xcode, Ionic/Cordova, the source built and deployed perfectly without issue.

1 Like

I tried about everything to figure out what the issue was with my environment, but couldn’t figure it out. After wasting enough time, I just wiped and reloaded MacOS and things are now working great. Not very helpful for you unfortunately, unless you are also in the position to reload.

1 Like

@robertlair Were you experimenting with cordova-ios 4.5.0 by chance?