forked from freshworks/hotline-phonegap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.xml
130 lines (103 loc) · 5.94 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns = "http://www.phonegap.com/ns/plugins/1.0"
id = "cordova-plugin-hotline"
version = "0.5.2">
<!-- Meta -->
<name>Hotline plugin for Phonegap</name>
<description>Plugin for integrating the Hotline SDK into a Phonegap/Cordova project</description>
<keywords>freshdesk,hotline</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/hotline_plugin.js" name="Hotline">
<clobbers target="Hotline" />
</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/HotlinePlugin.java" target-dir="src/com/freshdesk/hotline/android" />
<source-file src="src/android/HotlineGcmListenerService.java" target-dir="src/com/freshdesk/hotline/android" />
<source-file src="src/android/HotlineGcmRegistrationService.java" target-dir="src/com/freshdesk/hotline/android" />
<source-file src="src/android/HotlineInstanceIDListenerService.java" target-dir="src/com/freshdesk/hotline/android" />
<framework src="com.google.android.gms:play-services-gcm:8.+" />
<!-- 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="HotlinePlugin" >
<param name="android-package" value="com.freshdesk.hotline.android.HotlinePlugin"/>
<param name="onload" value="true" />
</feature>
</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" />
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<!-- GCM Listener Service -->
<service
android:name="com.freshdesk.hotline.android.HotlineGcmListenerService"
android:exported="false" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- GCM Receiver -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="$PACKAGE_NAME" />
</intent-filter>
</receiver>
<!-- InstanceIDListenerService -->
<service
android:name="com.freshdesk.hotline.android.HotlineInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<service
android:name="com.freshdesk.hotline.android.HotlineGcmRegistrationService"
android:exported="false" />
</config-file>
<!-- Including the HotlineSDK(which is included as such) as a framework -->
<!-- The custom parameter makes Cordova look for the SDK in a relative location rather than the Android SDK -->
<framework src="src/android/Hotline" custom="true" />
</platform>
<platform name="ios">
<config-file target="config.xml" parent="/*">
<feature name="HotlinePlugin">
<param name="ios-package" value="HotlinePlugin" />
<param name="onload" value="true" />
</feature>
</config-file>
<!-- PLUGIN HEADER AND SOURCE FILES -->
<header-file src="src/ios/HotlinePlugin.h" target-dir="HotlineiOSPlugin"/>
<source-file src="src/ios/HotlinePlugin.m" target-dir="HotlineiOSPlugin"/>
<header-file src="src/ios/Appdelegate+HotlinePush.h" target-dir="HotlineiOSPlugin"/>
<source-file src="src/ios/Appdelegate+HotlinePush.m" target-dir="HotlineiOSPlugin"/>
<!-- HOTLINE SDK -->
<!-- Headers -->
<header-file src="src/ios/HotlineSDK/Hotline.h" target-dir="HotlineiOSPlugin"/>
<!-- Resources -->
<resource-file src="src/ios/HotlineSDK/KonotorModels.bundle" target-dir="HotlineiOSPlugin"/>
<resource-file src="src/ios/HotlineSDK/HLResources.bundle" target-dir="HotlineiOSPlugin"/>
<resource-file src="src/ios/HotlineSDK/HLLocalization.bundle" target-dir="HotlineiOSPlugin"/>
<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"/>
<source-file src="src/ios/HotlineSDK/libFDHotlineSDK.a" target-dir="HotlineiOSPlugin" framework="true"/>
</platform>
</plugin>