forked from xu-li/cordova-plugin-wechat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugin.xml
101 lines (89 loc) · 4.01 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="xu.li.cordova.wechat"
version="0.8.0">
<name>Wechat</name>
<description>A cordova plugin, a JS version of Wechat SDK</description>
<license>MIT</license>
<keywords>cordova,wechat,weixin,share</keywords>
<repo>https://github.com/xu-li/cordova-plugin-wechat.git</repo>
<issue>https://github.com/xu-li/cordova-plugin-wechat/issues</issue>
<!-- add this to your config.xml -->
<!-- <preference name="WECHATAPPID" value="YOUR_WECHAT_APP_ID_HERE" /> -->
<preference name="WECHATAPPID" />
<!--require cordova version -->
<engines>
<engine name="cordova" version=">=3.5.0" />
</engines>
<!-- js module-->
<js-module src="www/wechat.js" name="Wechat">
<clobbers target="Wechat" />
</js-module>
<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="Wechat">
<param name="ios-package" value="CDVWechat"/>
<param name="onload" value="true" />
</feature>
<preference name="WECHATAPPID" value="$WECHATAPPID"/>
</config-file>
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>wechat</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$WECHATAPPID</string>
</array>
</dict>
</array>
</config-file>
<!-- Plugin source code -->
<header-file src="src/ios/CDVWechat.h" />
<source-file src="src/ios/CDVWechat.m" />
<!-- Wechat Official -->
<header-file src="src/ios/libs/WeChatSDK_1.5/WeChatSDK_1.5/WXApi.h" />
<header-file src="src/ios/libs/WeChatSDK_1.5/WeChatSDK_1.5/WXApiObject.h" />
<source-file src="src/ios/libs/WeChatSDK_1.5/WeChatSDK_1.5/libWeChatSDK.a" framework="true" />
<!-- Other required frameworks -->
<framework src="libz.dylib" />
<framework src="libsqlite3.0.dylib" />
<framework src="SystemConfiguration.framework" />
<framework src="Security.framework" />
<framework src="libstdc++.6.dylib" />
</platform>
<!-- android -->
<platform name="android">
<hook type="after_plugin_add" src="scripts/android-install.js" />
<hook type="after_plugin_install" src="scripts/android-install.js" />
<hook type="before_plugin_rm" src="scripts/android-install.js" />
<hook type="before_plugin_uninstall" src="scripts/android-install.js" />
<config-file target="res/xml/config.xml" parent="/*">
<feature name="Wechat">
<param name="android-package" value="xu.li.cordova.wechat.Wechat"/>
</feature>
<preference name="WECHATAPPID" value="$WECHATAPPID"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<activity
android:name=".wxapi.WXEntryActivity"
android:label="@string/launcher_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="$WECHATAPPID"/>
</intent-filter>
</activity>
</config-file>
<source-file src="src/android/Wechat.java" target-dir="src/xu/li/cordova/wechat" />
<source-file src="src/android/Util.java" target-dir="src/xu/li/cordova/wechat" />
<source-file src="src/android/libammsdk.jar" target-dir="libs" />
</platform>
</plugin>