javascript - How to configure plugin.xml for IOS plugin upgrade from 2.x to 3.0 in cordova / phonegap -
i trying use phonegap 2.9 plugin in 3.0 . making plugin.xml comply plugman. apart adding header , source file in plugin.xml (.m & .h ) instructions old plugin following (after jump) . question put in plugin.xml create outputlibrary folder mentioned below containing .a file
ensure outputlibrary folder exists in folder structure under plugins. outputlibrary in xcode, must select “create folder references added folders” shown in figure 6.
figure 6: adding outputlibrary plugins folder in xcode
- ensure include folder exists under outputlibrary folder in plugins. if not there add it, example, outputlibrary/include.
 8. add following native file include folder under outputlibrary shown in figure 5. libattiosphonegapplugin.a
first of all, on cordova 3.0 can still install plugins same way did on phonegap 2.9, manually.
second, link plugin might help.
about plugin.xml, add .a file should use framework option:
<source-file src="pathtothelibfile/libattiosphonegapplugin.a" framework="true" />
but afaik, can't specify “create folder references added folders” option on config.xml, manual install did on 2.9
edit:
looking @ plugin doesn't seem need “create folder references added folders” option. try creating plugin.xml this:
<?xml version="1.0" encoding="utf-8"?> <plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="org.att.phonegap.plugin.attplugin" version="1.0.0"> <name>attplugin</name> <author>at&t</author> <description> at&t plugin </description> <license>at&t license</license> <js-module src="plugins/ios/js/lib/att.js" name="attplugin"> <clobbers target="attplugin" /> </js-module> <engines> <engine name="cordova" version=">=3.0.0" /> </engines> <platform name="ios"> <config-file target="config.xml" parent="/*"> <feature name="attplugin"> <param name="ios-package" value="org.att.phonegap.plugin.attplugin"/> </feature> </config-file> <source-file src="plugins/ios/nativeplugin/attphonegaphelper.m" /> <source-file src="plugins/ios/nativeplugin/outputlibrary/libattiosphonegapplugin.a" framework="true" /> <header-file src="plugins/ios/nativeplugin/outputlibrary/include/attiosphonegapplugin/attpluginhttprequest.h" /> <header-file src="plugins/ios/nativeplugin/outputlibrary/include/attiosphonegapplugin/attiosphonegapplugin.h" /> <header-file src="plugins/ios/nativeplugin/outputlibrary/include/attiosphonegapplugin/inappmessageplugin.h" /> <header-file src="plugins/ios/nativeplugin/outputlibrary/include/attiosphonegapplugin/mmsplugin.h" /> <header-file src="plugins/ios/nativeplugin/outputlibrary/include/attiosphonegapplugin/speechplugin.h" /> <header-file src="plugins/ios/nativeplugin/outputlibrary/include/attiosphonegapplugin/ttsplugin.h" /> <header-file src="plugins/ios/nativeplugin/attphonegaphelper.h" /> </platform> </plugin>
not sure part because might need add other js files
<js-module src="plugins/ios/js/lib/att.js" name="attplugin"> <clobbers target="attplugin" /> </js-module>
Comments
Post a Comment