作者:假面的告白1993_931 | 来源:互联网 | 2023-08-19 15:48
翻译自cordova官方文档(如果需要链接,请自行对照原文链接进行查看):https:cordova.apache.orgdocsenlatestplugin_refspec.
翻译自cordova官方文档(如果需要链接,请自行对照原文链接进行查看):
https://cordova.apache.org/docs/en/latest/plugin_ref/spec.html
Plugin.xml
Plugin.xml是用于设置你得插件,他包含很多元素为你的插件提供详细的设置。
<pluginxmlns="http://apache.org/cordova/ns/plugins/1.0"id="cordova-plugin-splashscreen"version="3.2.0"><name>Splashscreenname><description>Cordova Splashscreen Plugindescription><license>Apache 2.0license><keywords>cordova,splashscreenkeywords><author>Foo plugin authorauthor><assetsrc="www/new-foo.js"target="js/experimental/foo.js" /><repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.gitrepo><issue>https://issues.apache.org/jira/browse/CB/component/12320653issue><dependencyid="cordova-plugin-someplugin"url="https://github.com/myuser/someplugin"commit="428931ada3891801"subdir="some/path/here" /><dependencyid="cordova-plugin-someplugin"version="1.0.1"><engines><enginename="cordova-android"version=">=3.6.0" />engines><js-modulesrc="www/splashscreen.js"name="SplashScreen"><clobberstarget="navigator.splashscreen" />js-module><platformname="android"><config-filetarget="res/xml/config.xml"parent="/*"><featurename="SplashScreen"><paramname="android-package"value="org.apache.cordova.splashscreen.SplashScreen"/><paramname="onload"value="true"/>feature>config-file><source-filesrc="src/android/SplashScreen.java"target-dir="src/org/apache/cordova/splashscreen" />platform><platformname="ios"><config-filetarget="config.xml"parent="/*"><featurename="SplashScreen"><paramname="ios-package"value="CDVSplashScreen"/><paramname="onload"value="true"/>feature>config-file><config-filetarget="helloworld-Info.plist"parent="CFBundleURLTypes"><array><dict><key>PackageNamekey><string>$PACKAGE_NAMEstring>dict>array>config-file><header-filesrc="src/ios/CDVSplashScreen.h" /><source-filesrc="src/ios/CDVSplashScreen.m" /><header-filesrc="src/ios/CDVViewController+SplashScreen.h" /><source-filesrc="src/ios/CDVViewController+SplashScreen.m" /><frameworksrc="CoreGraphics.framework" />platform>plugin>