plugin.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?xml version='1.0.9' encoding='utf-8'?>
  2. <plugin id="cordova-plugin-dingxin-sso" version="1.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
  3. <name>SSOPlugin</name>
  4. <description>Southern power grid Cordova SSO Plugin</description>
  5. <keywords>cordova,sso</keywords>
  6. <repo>http://120.78.83.172/mobility/cordova-plugin/yi-dong-ying-yong.git</repo>
  7. <!--
  8. 动态设置url scheme。启动传参一定要实现该配置
  9. 请在项目的config.xml添加
  10. `
  11. <plugin name="cordova-plugin-dingxin-sso" spec="./myplugins/yi-dong-ying-yong">
  12. <variable name="URL_SCHEME" value="加密后的字符串" />
  13. </plugin>
  14. `
  15. 注意如果使用了 'cordova-plugin-inappbroswerwithheader' 插件,需要将value保持一致
  16. -->
  17. <preference name="URL_SCHEME" default="weixin.wuxiyi.com"/>
  18. <engines>
  19. <engine name="cordova" version=">=6.4.0"/>
  20. <engine name="cordova-android" version=">=6.0.0" />
  21. <engine name="cordova-ios" version=">=4.3.0" />
  22. </engines>
  23. <js-module name="SSOLoginPlugin" src="www/SSOLoginPlugin.js">
  24. <clobbers target="cordova.dingxin.sso" />
  25. </js-module>
  26. <!-- Android-->
  27. <platform name="android">
  28. <config-file target="res/xml/config.xml" parent="/*">
  29. <feature name="SSO">
  30. <param name="android-package" value="com.dingxin.cordova.SSOLoginPlugin" />
  31. </feature>
  32. </config-file>
  33. <config-file target="AndroidManifest.xml" parent="/*">
  34. <uses-permission android:name="android.permission.GET_TASKS" />
  35. <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
  36. <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
  37. <uses-permission android:name="android.permission.WAKE_LOCK" />
  38. <uses-permission android:name="android.permission.READ_CALENDAR" />
  39. <uses-permission android:name="android.permission.WRITE_CALENDAR" />
  40. <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  41. <uses-permission android:name="android.permission.INTERNET" />
  42. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  43. <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
  44. <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
  45. <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
  46. <uses-permission android:name="android.permission.VIBRATE" />
  47. <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />>
  48. <uses-permission android:name="android.intent.action.USER_PRESENT" />
  49. <uses-permission android:name="android.permission.RESTART_PACKAGES" />
  50. <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
  51. <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  52. <uses-permission android:name="android.permission.READ_LOGS" />
  53. <uses-permission android:name="android.permission.WRITE_SETTINGS" />
  54. </config-file>
  55. <lib-file src="src/android/appstore_sso-1.1.1.aar" target-dir="libs"/>
  56. <config-file target="AndroidManifest.xml" parent="application">
  57. <activity android:name="com.dingxin.cordova.SSOLoginPlugin"/>
  58. </config-file>
  59. <framework src="com.android.support:appcompat-v7:24.1.1"/>
  60. <!--需要Java7-->
  61. <source-file src="src/android/SSOLoginPlugin.java" target-dir="src/com/dingxin/cordova"/>
  62. </platform>
  63. <!-- iOS-->
  64. <platform name="ios">
  65. <config-file parent="/*" target="config.xml">
  66. <feature name="SSO">
  67. <param name="ios-package" value="SSOLoginPlugin" />
  68. </feature>
  69. </config-file>
  70. <header-file src="src/ios/SSOParameter.h" /> <!-- target-dir="src/com/dingxin/cordova" -->
  71. <source-file src="src/ios/SSOParameter.m" />
  72. <header-file src="src/ios/SSOLoginPlugin.h" />
  73. <source-file src="src/ios/SSOLoginPlugin.m" />
  74. <!--4A登录库-->
  75. <framework src="src/ios/Login4ASDK.framework" custom="true" />
  76. <framework src="UIKit.framework" />
  77. <framework src="Foundation.framework" />
  78. <framework src="CFNetwork.framework" />
  79. <framework src="CoreGraphics.framework" />
  80. <framework src="CoreTelephony.framework" />
  81. <framework src="MobileCoreServices.framework" />
  82. <framework src="Security.framework" />
  83. <framework src="SystemConfiguration.framework" />
  84. <framework src="libsqlite3.tbd" />
  85. <framework src="libsqlite3.0.tbd" />
  86. <framework src="libxml2.tbd" />
  87. <framework src="libz.1.tbd" />
  88. <framework src="libz.1.2.5.tbd" />
  89. <!-- info.Plist配置 -->
  90. <config-file platform="ios" target="*-Info.plist" parent="UIBackgroundModes"><!-- 后台 -->
  91. <array>
  92. <string>location</string>
  93. </array>
  94. </config-file>
  95. <!-- 手动设置 bundle id
  96. <config-file platform="ios" target="*-Info.plist" parent="CFBundleIdentifier">
  97. <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  98. </config-file>-->
  99. <!-- info配置,ssv1需要配置url scheme-->
  100. <config-file platform="ios" target="*-Info.plist" parent="CFBundleURLTypes">
  101. <array>
  102. <dict>
  103. <key>CFBundleTypeRole</key>
  104. <string>Editor</string>
  105. <key>CFBundleURLSchemes</key>
  106. <array>
  107. <string>$URL_SCHEME</string>
  108. </array>
  109. </dict>
  110. </array>
  111. </config-file>
  112. </platform>
  113. </plugin>