如何添加尚未在plugins.cordova.io上注册的cordova插件?

2023-12-01

喜欢这些插件

https://github.com/ArchieGoodwin/SilentShot

https://github.com/alongubkin/phonertc

他们没有 tarball 网址

cordova plugin add https://github.com/alongubkin/phonertc.git

我如何添加这样的插件?

meteor add cordova:@https://github.com/alongubkin/phonertc.git

Update
这适用于 Meteor 1.2 和 1.3-beta:
meteor add cordova:pluginID@gitUrl#commithash

所以对于actionsheet插件:
meteor add cordova:cordova-plugin-actionsheet@https://github.com/EddyVerbruggen/cordova-plugin-actionsheet.git#b93aef15ce4d70c3f9ddf3e4413e68e2ff0c4811

您也可以简单地复制 .meteor/cordova-plugins 文件中的该行,而不使用“meteor add cordova”前缀,然后为 ios/android 重新运行。


原答案
要将第 3 方 cordova 插件添加到尚不在plugins.cordova.io 注册表中的meteor,以下方法应该始终有效: 例如,要添加https://github.com/EddyVerbruggen/cordova-plugin-actionsheet

(分解)

  • 流星添加科尔多瓦:
  • nl.x-services.plugins.actionsheet (拿着它id来自github中的plugin.xml文件)
  • @https://github.com/EddyVerbruggen/cordova-plugin-actionsheet (git 仓库)
  • /tarball (只是关键字)
  • /62536f9ee22bfbb8a22ae364d2aaa58bd38e5eb0 (从 gi​​thub 顶部最新提交旁边的小“复制 SHA”图标获取此信息)

所以完整的线路在这里:

meteor add cordova:nl.x-services.plugins.actionsheet@https://github.com/EddyVerbruggen/cordova-plugin-actionsheet/tarball/62536f9ee22bfbb8a22ae364d2aaa58bd38e5eb0

添加插件:https://github.com/ArchieGoodwin/SilentShot

meteor add cordova:biz.incoding.silentshot@https://github.com/ArchieGoodwin/SilentShot/tarball/d123cd881bb211d89c6402d317bfdd3b6302d66b

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何添加尚未在plugins.cordova.io上注册的cordova插件? 的相关文章

随机推荐