Pergunta

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.

Foi útil?

Solução

Custom frameworks work with Cordova 3.4

<framework src="relative/path/to/my.framework" custom="true" />

Outras dicas

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).)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top