I'm trying to create a cordova plugin with a third party framework (in this case AdColony.framework) https://github.com/AdColony/AdColony-iOS-SDK. I'm having trouble figuring out how to add this framework using the plugin.xml (Plugin Specification).
I tried to include the file as a framework through
<framework src="src/ios/libs/AdColony.framework" />
OR
<source-file src="src/ios/libs/AdColony.framework" framework="true" />
But both didn't worked. Please help me to figure this out. Any suggestions and response will be greatly appreciated. Thanks.
The plugin element is the plugin manifest's top-level element. The plugin namespace, http://apache.org/cordova/ns/plugins/1.0 . If the document contains XML from other namespaces, such as tags to be added to the AndroidManifest. xml file in the case of Android, those namespaces should also be included in the element.
Custom frameworks work with Cordova 3.4
<framework src="relative/path/to/my.framework" custom="true" />
This answer suggests it is not possible: How to copy a custom ios framework using plugin.xml on Phonegap 3 which suggests converting the framework into a static library and using that.
This thread might be useful to you: http://osdir.com/ml/phonegap/2013-11/msg00176.html
And you might want to follow along with this bug: https://issues.apache.org/jira/browse/CB-5238 , which appears to address what you want and was recently merged (so might make it into 3.2 or 3.3). It also has a workaround:
1. a <resource-file> tag to copy the .framework folder and include in Xcode
2. a <framework> tag to add it to the "Link Binary with Libraries" section of the Build Phases of the project
(You can include default frameworks with the framework
tag (of course, that is not what you are asking).)
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