Reputation: 43
I am making a Cordova plugin which is basically a wrapper for native iOS framework, and a test app in AngularJS as a demo app for the plugin. So there are three components:
- Angular JS application
- Cordova plugin, and
- iOS native framework.
I get compilation error in xcode 8.3.3 when plugin is added. The error log ends with message:
'Undefined symbol(s) for architecture arm64
Clang: error: linker command failed with exit code 1 (use -v to see invocation)'
I tried changing various build settings (valid architectures, paths, disabling and enabling bitcode) and nothing helped. The same framework works fine when added to native app. The Angular JS test app also works fine when built without the plugin. So I suppose the problem should be in Cordova itself.
Edit
Framework inside plugin had few previous versions which all worked fine. This last version unlike any previous has additional smma.framework. I found what it is on http://www.swig.org/ . How this smma.framework should be implemented inside Cordova plugin? I just copied it inside src directory, added 'framework src="src/ios/libs/smma.framework" custom="true" /' line to plugin.xml and added the plugin to the app as usual with 'ionic cordova plugin add '.
Upvotes: 0
Views: 288
Reputation: 314
just a suggestion I was adding a c++ staticlib to a plugin had a similar error.
in xcode adding -objC -lstdc++ to 'other linker flags' made it build for me.
try it out.
Upvotes: 0