plugin.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?xml version='1.0' encoding='utf-8'?>
  2. <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. id="cordova-plugin-customurlscheme"
  5. version="5.0.2">
  6. <name>Custom URL scheme</name>
  7. <description>
  8. Launch your app by using this URL: mycoolapp://
  9. You can add a path and even pass params like this: mycoolerapp://somepath?foo=bar
  10. </description>
  11. <author>Eddy Verbruggen</author>
  12. <license>MIT</license>
  13. <keywords>Custom URL Scheme, URLscheme, URL scheme, Custom URL, Launch My App, Launch App</keywords>
  14. <repo>https://github.com/EddyVerbruggen/Custom-URL-scheme.git</repo>
  15. <issue>https://github.com/EddyVerbruggen/Custom-URL-scheme/issues</issue>
  16. <preference name="URL_SCHEME" />
  17. <engines>
  18. <engine name="cordova" version=">=3.0.0"/>
  19. </engines>
  20. <!-- ios -->
  21. <platform name="ios">
  22. <js-module src="www/ios/LaunchMyApp.js" name="LaunchMyApp">
  23. <clobbers target="window.plugins.launchmyapp" />
  24. </js-module>
  25. <config-file target="*-Info.plist" parent="CFBundleURLTypes">
  26. <array>
  27. <dict>
  28. <key>CFBundleURLSchemes</key>
  29. <array>
  30. <string>$URL_SCHEME</string>
  31. </array>
  32. </dict>
  33. </array>
  34. </config-file>
  35. </platform>
  36. <!-- android -->
  37. <platform name="android">
  38. <preference name="ANDROID_SCHEME" default=" " />
  39. <preference name="ANDROID_HOST" default=" " />
  40. <preference name="ANDROID_PATHPREFIX" default="/" />
  41. <js-module src="www/android/LaunchMyApp.js" name="LaunchMyApp">
  42. <clobbers target="window.plugins.launchmyapp" />
  43. </js-module>
  44. <config-file target="res/xml/config.xml" parent="/*">
  45. <feature name="LaunchMyApp">
  46. <param name="android-package" value="nl.xservices.plugins.LaunchMyApp"/>
  47. </feature>
  48. </config-file>
  49. <source-file src="src/android/nl/xservices/plugins/LaunchMyApp.java" target-dir="src/nl/xservices/plugins"/>
  50. <config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
  51. <intent-filter>
  52. <action android:name="android.intent.action.VIEW" />
  53. <category android:name="android.intent.category.DEFAULT" />
  54. <category android:name="android.intent.category.BROWSABLE" />
  55. <data android:scheme="$URL_SCHEME"/>
  56. </intent-filter>
  57. <intent-filter>
  58. <action android:name="android.intent.action.VIEW" />
  59. <category android:name="android.intent.category.DEFAULT" />
  60. <category android:name="android.intent.category.BROWSABLE" />
  61. <data android:scheme="$ANDROID_SCHEME"
  62. android:host="$ANDROID_HOST"
  63. android:pathPrefix="$ANDROID_PATHPREFIX" />
  64. </intent-filter>
  65. </config-file>
  66. </platform>
  67. <!-- windows8 -->
  68. <platform name="windows8">
  69. <preference name="WINDOWS_START_PAGE" default="www/index.html" />
  70. <config-file target="package.appxmanifest" parent="/Package/Applications/Application/Extensions">
  71. <Extension Category="windows.protocol" StartPage="$WINDOWS_START_PAGE">
  72. <Protocol Name="$URL_SCHEME" />
  73. </Extension>
  74. </config-file>
  75. <js-module src="www/windows/LaunchMyApp.js" name="LaunchMyApp">
  76. <clobbers target="window.plugins.launchmyapp" />
  77. </js-module>
  78. </platform>
  79. <!-- windows -->
  80. <platform name="windows">
  81. <preference name="WINDOWS_START_PAGE" default="www/index.html" />
  82. <config-file target="package.windows.appxmanifest" parent="/Package/Applications/Application/Extensions">
  83. <uap:Extension Category="windows.protocol" StartPage="$WINDOWS_START_PAGE">
  84. <uap:Protocol Name="$URL_SCHEME" />
  85. </uap:Extension>
  86. </config-file>
  87. <config-file target="package.windows10.appxmanifest" parent="/Package/Applications/Application/Extensions">
  88. <uap:Extension Category="windows.protocol" StartPage="$WINDOWS_START_PAGE">
  89. <uap:Protocol Name="$URL_SCHEME" />
  90. </uap:Extension>
  91. </config-file>
  92. <config-file target="package.phone.appxmanifest" parent="/Package/Applications/Application/Extensions">
  93. <uap:Extension Category="windows.protocol" StartPage="$WINDOWS_START_PAGE">
  94. <uap:Protocol Name="$URL_SCHEME" />
  95. </uap:Extension>
  96. </config-file>
  97. <js-module src="www/windows/LaunchMyApp.js" name="LaunchMyApp">
  98. <clobbers target="window.plugins.launchmyapp" />
  99. </js-module>
  100. </platform>
  101. <!-- wp8 -->
  102. <platform name="wp8">
  103. <config-file target="config.xml" parent="/*">
  104. <feature name="CustomUriMapperCommand">
  105. <param name="wp-package" value="CustomUriMapperCommand"/>
  106. <param name="onload" value="true" />
  107. </feature>
  108. </config-file>
  109. <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App" after="Tokens">
  110. <Extensions>
  111. <Protocol Name="$URL_SCHEME" NavUriFragment="encodedLaunchUri=%s" TaskID="_default" />
  112. </Extensions>
  113. </config-file>
  114. <source-file src="src/wp8/CompositeUriMapper.cs" />
  115. <source-file src="src/wp8/ICustomUriMapper.cs" />
  116. <source-file src="src/wp8/CustomUriMapperCommand.cs" />
  117. <js-module src="www/wp8/LaunchMyApp.js" name="LaunchMyApp">
  118. <clobbers target="window.plugins.launchmyapp" />
  119. </js-module>
  120. <hook type="after_plugin_install" src="src/wp8/hooks/add-uri-mapper.js" />
  121. </platform>
  122. </plugin>