-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathplugin.xml
executable file
·108 lines (82 loc) · 4.98 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
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns = "http://www.phonegap.com/ns/plugins/1.0"
id = "cordova-plugin-freshchat"
version = "1.2.0">
<!-- Meta -->
<name>Freshchat plugin for Phonegap</name>
<description>Plugin for integrating the Freshchat SDK into a Phonegap/Cordova project</description>
<keywords>freshdesk,hotline,freshchat</keywords>
<engines>
<engine name="cordova-android" version=">=4.0.0" />
<engine name="cordova-ios" version=">=3.8.0"/>
</engines>
<!-- Make the javascript wrapper inject at loadtime as <script> -->
<!-- The clobbers tag makes the module.exports of the js module available at window.<target-value> -->
<js-module src="www/freshchat_plugin.js" name="Freshchat">
<clobbers target="Freshchat" />
</js-module>
<!-- Stuff to do only on android platforms -->
<platform name="android">
<!-- Move the Java wrapper class to specified location(which corresponds with the Class's pakage name) -->
<source-file src="src/android/freshchatPlugin.java" target-dir="src/com/freshdesk/freshchat/android" />
<!-- Pushing <feature> tag into android platform's config.xml -->
<!-- This is needed for Cordova to recognize the plugin and for using the Java Class globally -->
<config-file target="res/xml/config.xml" parent="/*">
<feature name="freshchatPlugin" >
<param name="android-package" value="com.freshdesk.freshchat.android.freshchatPlugin"/>
<param name="onload" value="true" />
</feature>
</config-file>
<config-file target="res/values/strings.xml" parent="/*">
<string name="freshchat_file_provider_authority">$PACKAGE_NAME.provider</string>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" />
<permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="android.permission.CAMERA" android:required="false"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="application" mode="merge">
<provider
android:name="com.techaffinity.phonegap.plugins.FileProvider" android:authorities="${applicationId}.provider" android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/freshchat_phonegap_provider_paths" />
</provider>
</config-file>
<!-- Including the HotlineSDK(which is included as such) as a framework -->
<!-- The custom parameter makes Cordova look for the gradle file in a relative location rather than the Android SDK -->
<framework src="src/android/Freshchat/build.gradle" custom="true" type="gradleReference" />
<source-file src="src/android/xml/freshchat_phonegap_provider_paths.xml" target-dir="res/xml" />
<source-file src="src/android/FileProvider.java" target-dir="src/com/techaffinity/phonegap/plugins" />
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="FreshchatPlugin">
<param name="ios-package" value="FreshchatPlugin" />
<param name="onload" value="true" />
</feature>
</config-file>
<!-- PLUGIN HEADER AND SOURCE FILES -->
<header-file src="src/ios/FreshchatPlugin.h" target-dir="FreshchatiOSPlugin"/>
<source-file src="src/ios/FreshchatPlugin.m" target-dir="FreshchatiOSPlugin"/>
<!-- Freshchat SDK -->
<!-- Headers -->
<!-- <header-file src="src/ios/FreshchatSDK/Freshchat.h" target-dir="FreshchatiOSPlugin"/> -->
<!-- Resources -->
<!-- <resource-file src="src/ios/FreshchatSDK/FreshchatModels.bundle" target-dir="FreshchatiOSPlugin"/>
<resource-file src="src/ios/FreshchatSDK/FCResources.bundle" target-dir="FreshchatiOSPlugin"/>
<resource-file src="src/ios/FreshchatSDK/FCLocalization.bundle" target-dir="FreshchatiOSPlugin"/> -->
<framework src="Foundation.framework"/>
<framework src="AVFoundation.framework"/>
<framework src="AudioToolbox.framework"/>
<framework src="CoreMedia.framework"/>
<framework src="CoreData.framework"/>
<framework src="ImageIO.framework"/>
<framework src="SystemConfiguration.framework"/>
<framework src="AdSupport.framework"/>
<framework src="Photos.framework"/>
<framework src="FreshchatSDK" type="podspec" spec="4.1.5"/>
<!-- <source-file src="src/ios/FreshchatSDK/libFDFreshchatSDK.a" target-dir="FreshchatiOSPlugin" framework="true"/> -->
</platform>
</plugin>