How to fix this error
duplicate symbol _OBJC_METACLASS_$_CDVLogger in: /Users/nazarkalituk/Library/Developer/Xcode/DerivedData/MYAPP-emnjcrdbcjgsjvblqcxjuovvzffs/Build/Intermediates.noindex/MYAPP.build/Debug-iphonesimulator/MYAPP.build/Objects-normal/x86_64/CDVLogger.o /Users/nazarkalituk/Library/Developer/Xcode/DerivedData/MYAPP-emnjcrdbcjgsjvblqcxjuovvzffs/Build/Products/Debug-iphonesimulator/libCordova.a(CDVLogger.o) ld: 2 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
The error implies you have two copies of CDVLogger
in your project.
This likely because you have cordova-plugin-console installed which contains these files - you can check with cordova plugin ls
- and you also have cordova-ios@4.5.0
(or greater) in your project, which now contains these files also - check your platform version with cordova platform ls
.
To remedy the problem, remove cordova-plugin-console
from your project:
cordova plugin rm cordova-plugin-console
You may also need to remove/re-add the iOS platform to rebuild the project:
cordova platform rm ios --nosave && cordova platform add ios --nosave