I am developing a Cordova plugin that uses a custom ios SDK framework. The framework depends on two binary libraries: libcurl.a
and boost.a
. Right now during development I install the plugin in a test application like this:
cordova platform add ios
cordova plugin add my.cool.plugin
The binaries are included in the framework and get copied to the project that installs the plugin. However, some linker options are missing. To get the project to build, I have to open xcode and perform two additional manual step:
open platforms/ios/MyCoolProject.xcodeproj/
First, I have to add the two libraries to Link Binary With Libraries section in Build Phases:
Second, I have to add two linker flags (-lz -lstdc++
) to Other linker flags section of the project default target.
I certainly would like a cordova add plugin my.cool.plugin
to be sufficient to install the plugin. So my question is, how can I automatically perform these tasks when the plugin gets installed?
for -lz -lstdc++ just add this in the plugin xml and it will work.
<framework src="libstdc++.dylib" />
<framework src="libz.dylib" />
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