I'm building an ionic 2 app, and I can build the app with ionic build ios and I get no erros, but on xcode when I build my application I get the following error.
Apple Mach-O Linker (id) Error Linker command failed with exit code 1 (use -v to see invocation).
How can I fix this?
Here is my system information
Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.0
OS: macOS Sierra
Node Version: v6.9.4
Xcode Version: Xcode 8.3 Build version 8E162
You are probably opening the .xcodeproj
on Xcode, try opening the .xcworkspace
. This fixed this error for me.
Had the same issue, spent almost a day trying to figure out what was causing it. For me the following solved it. Everything was working fine on [email protected], but on 4.5.3, I got this annoying error.
Check if this plugin "cordova-plugin-console" is there in the plugins folder. If it is there, remove it. Then it started building without any errors.
ionic cordova plugin remove cordova-plugin-console
Look for a file named libPods-AppName.a
in Frameworks
directory
where AppName
is your app name.
Deleting it fixes it in most cases.
Take a look at the screenshot for reference.
Quick Fix
Disclaimer: My project uses Ionic v1
I had the same error and, once I had added a Android-only plugin, I thought that it was the cause of the error - I was wrong (so, ignore this cause if you think the same as I).
After some search I found the truly cause of the error: the cordova-ios version (4.5). I followed the steps suggested here and I solve this issue.
Steps:
ionic cordova platform remove ios
ionic cordova platform add [email protected]
ionic cordova platform
Last step is used to check if [email protected] is actually the installed version.
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With