Javascript 如何在phonegap站点提交插件?

Javascript 如何在phonegap站点提交插件?,javascript,android,ios,cordova,phonegap-build,Javascript,Android,Ios,Cordova,Phonegap Build,我正在Phonegap中创建我的第一个应用程序。我制作了一些插件,比如FileOpener、Downloader和stausBarNotification。插件如下所示: FileOpener.js是这样的: cordova.define("cordova/plugin/fileopener", function(require, exports, module) { var exec = require("cordova/exec");

我正在Phonegap中创建我的第一个应用程序。我制作了一些插件,比如FileOpener、Downloader和stausBarNotification。插件如下所示:

FileOpener.js是这样的:

cordova.define("cordova/plugin/fileopener",
          function(require, exports, module) {
            var exec = require("cordova/exec");
            var FileOpener = function () {};

        FileOpener.prototype.open = function(url) {
            exec(null, null, "FileOpener", "openFile", [url]);
        };

        var fileOpener = new FileOpener();
            module.exports = fileOpener;

        });
        /**
         * Load Plugin
         */
        if (!window.plugins) {
            window.plugins = {};
        }
        if (!window.plugins.fileOpener) {
            window.plugins.fileOpener = cordova.require("cordova/plugin/fileopener");
        }
Downloader.js是这样的:

cordova.define("cordova/plugin/downloader",
  function(require, exports, module) {
    var exec = require("cordova/exec");
    var Downloader = function () {};

Downloader.prototype.downloadFile = function(fileUrl, dirName, fileName, overwrite, win, fail) {
    navigator.notification.alert('url: '+fileUrl+' to dir: '+dirName + ' to file: '+fileName);
    if (overwrite == false)
        overwrite = "false";
    else
        overwrite = "true";
    exec(win, fail, "Downloader", "downloadFile", [ fileUrl, dirName, fileName, overwrite ]);

};
var downloader = new Downloader();
    module.exports = downloader;

});
if (!window.plugins) {
    window.plugins = {};
}
if (!window.plugins.downloader) {
    window.plugins.downloader = cordova.require("cordova/plugin/downloader");
}
<gap:plugin name="FileOpener" value="com.phonegap.plugins.fileOpener.FileOpener"/>  
<gap:plugin name="Downloader" value="com.phonegap.plugins.downloader.Downloader"/>
<gap:plugin name="StatusBarNotification" value="com.phonegap.plugins.statusBarNotification.StatusBarNotification"/>
我还制作了一些java文件来实现is。现在,它在安卓设备上按预期运行。但现在我想要一个同样的ios项目,我想build.phonegap.com会为我做这件事

我已经在config.xml中包含了如下插件:

cordova.define("cordova/plugin/downloader",
  function(require, exports, module) {
    var exec = require("cordova/exec");
    var Downloader = function () {};

Downloader.prototype.downloadFile = function(fileUrl, dirName, fileName, overwrite, win, fail) {
    navigator.notification.alert('url: '+fileUrl+' to dir: '+dirName + ' to file: '+fileName);
    if (overwrite == false)
        overwrite = "false";
    else
        overwrite = "true";
    exec(win, fail, "Downloader", "downloadFile", [ fileUrl, dirName, fileName, overwrite ]);

};
var downloader = new Downloader();
    module.exports = downloader;

});
if (!window.plugins) {
    window.plugins = {};
}
if (!window.plugins.downloader) {
    window.plugins.downloader = cordova.require("cordova/plugin/downloader");
}
<gap:plugin name="FileOpener" value="com.phonegap.plugins.fileOpener.FileOpener"/>  
<gap:plugin name="Downloader" value="com.phonegap.plugins.downloader.Downloader"/>
<gap:plugin name="StatusBarNotification" value="com.phonegap.plugins.statusBarNotification.StatusBarNotification"/>


现在我们该怎么办?我读过一些文章,这些文章告诉我将插件提交到phonegap.com,我将如何做到这一点?该项目的运行方式是否与iPhone中的android设备相同?提前感谢您的帮助。

要提交您的插件,请按照位于的文档进行操作。一旦提交,将进行审查并向公众提供。您可以在上看到可用插件的列表