-
Notifications
You must be signed in to change notification settings - Fork 5
/
plugin.xml
101 lines (92 loc) · 4.85 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 id="cordova-plugin-gaode-location" version="1.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-gaode-location</name>
<preference name="ANDROIDKEY" />
<preference name="IOSKEY" />
<js-module name="cordova-plugin-gaode-location" src="www/cordova-plugin-gaode-location.js">
<clobbers target="GaodeLocation" />
</js-module>
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="GaodeLocation">
<param name="android-package" value="daihere.cordova.plugin.GaodeLocation"/>
</feature>
<preference name="ANDROIDKEY" value="$ANDROIDKEY" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:name="com.amap.api.location.APSService"></service>
<meta-data android:name="com.amap.api.v2.apikey" android:value="$ANDROIDKEY"></meta-data>
</config-file>
<!-- Plugin souce code -->
<source-file src="src/android/GaodeLocation.java" target-dir="src/daihere/cordova/plugin" />
<!-- Gaode skd -->
<source-file src="src/android/libs/Gaode_Location_SDK_V3.5.0.jar" target-dir="libs"/>
</platform>
<!-- iOS -->
<platform name="ios">
<config-file parent="/*" target="config.xml">
<feature name="GaodeLocation">
<param name="ios-package" value="CDVGaodeLocation"/>
<param name="onload" value="true"/>
</feature>
<preference name="GAODEKEY" value="gaode$IOSKEY" />
</config-file>
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleURLName</key>
<string>GAODEKEY</string>
<key>CFBundleURLSchemes</key>
<array>
<string>gaode$IOSKEY</string>
</array>
</dict>
</array>
</config-file>
<preference name="LOCATION_ALWAYS_USAGE_DESCRIPTION" default="请选择'始终允许'以保证应用的正常运行" />
<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>$LOCATION_ALWAYS_USAGE_DESCRIPTION</string>
</config-file>
<preference name="LOCATION_WHEN_IN_USAGE_DESCRIPTION" default="请选择'始终允许'以保证应用的正常运行" />
<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string>$LOCATION_WHEN_IN_USAGE_DESCRIPTION</string>
</config-file>
<preference name="LOCATION_ALWAYS_AND_WHEN_IN_USAGE_DESCRIPTION" default="请选择'始终允许'以保证应用的正常运行" />
<config-file target="*-Info.plist" parent="NSLocationAlwaysAndWhenInUseUsageDescription">
<string>$LOCATION_ALWAYS_AND_WHEN_IN_USAGE_DESCRIPTION</string>
</config-file>
<config-file target="*-Info.plist" parent="NSAppTransportSecurity">
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</config-file>
<!-- Plugin source code -->
<header-file src="src/ios/CDVGaodeLocation.h" />
<source-file src="src/ios/CDVGaodeLocation.m" />
<!-- Gaode sdk -->
<framework src="src/ios/libs/AMapLocationKit.framework" custom="true" />
<framework src="src/ios/libs/AMapFoundationKit.framework" custom="true" />
<!-- System framework -->
<framework src="SystemConfiguration.framework" />
<framework src="CoreTelephony.framework" />
<framework src="libz.tbd" />
<framework src="libstdc++.6.0.9.tbd" />
<framework src="libc++.tbd" />
<framework src="JavaScriptcore.framework" />
<framework src="SystemConfiguration.framework"/>
<framework src="CoreLocation.framework"/>
<framework src="Security.framework"/>
</platform>
</plugin>