forked from jefflinwood/cordova-plugin-twiliovoicesdk
-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugin.xml
158 lines (131 loc) · 6.46 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-twiliovoicesdk"
version="6.0.3">
<name>TwilioVoice</name>
<description>Use the Twilio Voice SDK for iOS or Android with Cordova/PhoneGap. Successor to Twilio Client Plugin</description>
<author>Jeff Linwood/Stevie Graham/Lyle Pratt</author>
<license>MIT</license>
<js-module name="CordovaCall" src="www/TwilioVoicePlugin.js">
<clobbers target="TwilioPlugin.TwilioVoiceClient" />
</js-module>
<engines>
<engine name="cordova" version=">=10.0.0"/>
<engine name="cordova-android" version=">=9.0.0"/>
<engine name="cordova-ios" version=">=6.1.0"/>
</engines>
<!-- Necessary to set app name for incoming call notifications on Android and CallKit on iOS -->
<preference name="INCOMING_CALL_APP_NAME" default=""/>
<!-- Necessary to enable CallKit on iOS -->
<preference name="ENABLE_CALL_KIT" default="false"/>
<!-- Option to mask the incoming phone number for privacy -->
<preference name="MASK_INCOMING_PHONE_NUMBER" default="false"/>
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="TwilioVoicePlugin">
<param name="android-package" value="com.phonegap.plugins.twiliovoice.TwilioVoicePlugin"/>
</feature>
</config-file>
<dependency id="cordova-plugin-device"/>
<dependency id="cordova-plugin-android-permissions"/>
<config-file target="AndroidManifest.xml" parent="/manifest/application" android:exported="false">
<!-- [START fcm_listener] -->
<!-- <service -->
<!-- android:exported="true" -->
<!-- android:name="com.phonegap.plugins.twiliovoice.fcm.VoiceFirebaseMessagingService"> -->
<!-- <intent-filter> -->
<!-- <action android:name="com.google.firebase.MESSAGING_EVENT" /> -->
<!-- </intent-filter> -->
<!-- </service> -->
<!-- [END fcm_listener] -->
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</config-file>
<config-file target="res/xml/config.xml" parent="/widget">
<feature name="TwilioVoicePlugin">
<param name="android-package" value="com.phonegap.plugins.twiliovoice.TwilioVoicePlugin"/>
</feature>
</config-file>
<config-file target="res/values/strings.xml" parent="/resources">
<string name="incoming_call_app_name" translatable="false">$INCOMING_CALL_APP_NAME</string>
</config-file>
<framework src="com.google.gms:google-services:4.3.4" />
<framework src="com.google.firebase:firebase-messaging:23.1.1" />
<framework src="com.twilio:voice-android:6.0.7"/>
<source-file src="src/android/com/phonegap/plugins/twiliovoice/TwilioVoicePlugin.java"
target-dir="src/com/phonegap/plugins/twiliovoice" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/SoundPoolManager.java"
target-dir="src/com/phonegap/plugins/twiliovoice" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/fcm/VoiceFirebaseMessagingService.java"
target-dir="src/com/phonegap/plugins/twiliovoice/fcm" />
<resource-file src="sounds/ringing.wav" target="res/raw/ringing.wav"/>
<resource-file src="src/android/res/drawable/ic_call_black_24dp.xml" target="res/drawable/ic_call_black_24dp.xml"/>
</platform>
<!-- ios -->
<platform name="ios">
<!-- Add the Twilio Voice plugin to the iOS app's config.xml -->
<config-file target="config.xml" parent="widget">
<feature name="TwilioVoicePlugin">
<param name="ios-package"
value="TwilioVoicePlugin"/>
</feature>
</config-file>
<framework src="SystemConfiguration.framework" />
<framework src="AudioToolbox.framework" />
<framework src="AVFoundation.framework" />
<framework src="CoreTelephony.framework" />
<framework src="PushKit.framework" />
<framework src="CallKit.framework" />
<!-- Add support for background VOIP and audio to the plist -->
<config-file target="*-Info.plist" parent="UIBackgroundModes">
<array>
<string>voip</string>
<string>audio</string>
</array>
</config-file>
<!-- Add Privacy Description for Microphone Usage -->
<config-file target="*-Info.plist" parent="NSMicrophoneUsageDescription">
<string>The app uses the microphone for voice calls</string>
</config-file>
<!-- Add Incoming Call App Name for CallKit -->
<config-file target="*-Info.plist" parent="TVPIncomingCallAppName">
<string>$INCOMING_CALL_APP_NAME</string>
</config-file>
<!-- Add Enable CallKit Preference to plist -->
<config-file target="*-Info.plist" parent="TVPEnableCallKit">
<string>$ENABLE_CALL_KIT</string>
</config-file>
<!-- Add Mask Incoming Phone Number Preference to plist -->
<config-file target="*-Info.plist" parent="TVPMaskIncomingPhoneNumber">
<string>$MASK_INCOMING_PHONE_NUMBER</string>
</config-file>
<!-- Add Debug Twilio to plist -->
<config-file target="*-Info.plist" parent="TVPEnableDebugging">
<string>$DEBUG_TWILIO</string>
</config-file>
<!-- Add push entitlements -->
<config-file target="*-Debug.plist" parent="aps-environment">
<string>development</string>
</config-file>
<config-file target="*-Release.plist" parent="aps-environment">
<string>production</string>
</config-file>
<header-file src="src/ios/TwilioVoicePlugin.h" />
<source-file src="src/ios/TwilioVoicePlugin.m" />
<resource-file src="sounds/ringing.wav" />
<resource-file src="sounds/traditionalring.mp3" />
<info>
</info>
<podspec>
<config>
<source url="https://cdn.cocoapods.org/"/>
</config>
<pods use-frameworks="true">
<pod name="TwilioVoice" spec="~> 6.2.2" />
</pods>
</podspec>
</platform>
</plugin>