ios - Add custom cordova plugin to IBM Worklight 6.1 -


i trying add custom cordova plugin ios platform, , having issues when compare process add plugin on cordova.

the plugin trying use here https://github.com/phonegap-build/statusbarplugin

with cordova used use command line cordova plugin add com.phonegap.plugin.statusbar

first, tried modify in native folder, noticed if so, works erased next time deploy again ios platform. second, tried add files (plugin js file , cordova_plugins.js file.) under apps/myapp/iphone, or apps/myapp/common, causes issue : cordova_plugins.js file format seems become not ok.

instead of having working format:

cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [     {         "file": "plugins/org.apache.cordova.battery-status/www/battery.js",         "id": "org.apache.cordova.battery-status.battery",         "clobbers": [             "navigator.battery"         ]     }, ,     {         "file": "plugins/com.phonegap.plugin.statusbar/www/statusbar.js",         "id": "com.phonegap.plugin.statusbar.statusbar",         "clobbers": [             "window.statusbar"         ]     } ] }); 

it have format not work :

/* javascript content worklight/cordova_plugins.js in js resources */ /* * licensed materials - property of ibm * 5725-i43 (c) copyright ibm corp. 2006, 2013. rights reserved. * government users restricted rights - use, duplication or * disclosure restricted gsa adp schedule contract ibm corp. */ cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [     {         "file": "plugins/org.apache.cordova.battery-status/www/battery.js",         "id": "org.apache.cordova.battery-status.battery",         "clobbers": [             "navigator.battery"         ]     } ] }); /* javascript content worklight/cordova_plugins.js in folder common */  /* javascript content worklight/cordova_plugins.js in js resources */ /* * licensed materials - property of ibm * 5725-i43 (c) copyright ibm corp. 2006, 2013. rights reserved. * government users restricted rights - use, duplication or * disclosure restricted gsa adp schedule contract ibm corp. */ cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [     {         "file": "plugins/org.apache.cordova.battery-status/www/battery.js",         "id": "org.apache.cordova.battery-status.battery",         "clobbers": [             "navigator.battery"         ]     },     {         "file": "plugins/com.phonegap.plugin.statusbar/www/statusbar.js",         "id": "com.phonegap.plugin.statusbar.statusbar",         "clobbers": [             "window.statusbar"         ]     } ] }); 

how should do? should put these file? proper way add custom plugin, if want add ios , not android?

worklight 6.1.0.x not yet support adding pre-made cordova 3.x plug-ins using plugman or other procedure in pure cordova application, including trying edit file you're trying edit. known limitation in current versions of worklight.

what read training material of creating cordova plug-ins in worklight, , take source of plug-in want add , copy over.

there other ways it, none convenient @ time.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -