cordova-plugin-appice 2.0.0 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +120 -120
- package/package.json +27 -27
- package/plugin.xml +131 -132
- package/scripts/BeforeAndroidBuilt.js +3 -4
- package/scripts/BeforeIosBuilt.js +38 -38
- package/scripts/androidAfterPluginAdd.js +159 -159
- package/scripts/androidAfterPluginRm.js +195 -195
- package/scripts/iOSAfterPluginAdd.js +98 -98
- package/scripts/iOSAfterPluginRm.js +74 -74
- package/src/build.gradle +5 -5
- package/src/firebase/modified/android/FirebasePluginMessagingService.java +356 -356
- package/src/firebase/modified/ios/AppDelegate+FirebasePlugin.m +529 -529
- package/src/firebase/original/android/FirebasePluginMessagingService.java +348 -348
- package/src/firebase/original/ios/AppDelegate+FirebasePlugin.m +519 -519
- package/src/ios/AppDelegate+AppICEPlugin.h +8 -8
- package/src/ios/AppDelegate+AppICEPlugin.m +259 -259
- package/src/ios/AppICEPlugin.h +89 -89
- package/src/ios/AppICEPlugin.m +1068 -1068
- package/www/AppICE.js +283 -278
package/README.md
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
```
|
|
2
|
-
// Steps to use plugin
|
|
3
|
-
|
|
4
|
-
// Create sample project or use your own
|
|
5
|
-
if (cordova-plugin) {
|
|
6
|
-
// Use below to create project
|
|
7
|
-
// myfolder : directory under which app to create
|
|
8
|
-
// org.apache.cordova.myApp : app package name
|
|
9
|
-
// myApp : app name
|
|
10
|
-
cordova create myfolder org.apache.cordova.myApp myApp
|
|
11
|
-
}
|
|
12
|
-
else if (ionic-plugin) {
|
|
13
|
-
// Use below to create project
|
|
14
|
-
// myfolder : directory under which app to create
|
|
15
|
-
// sidemenu : ionic framework to use
|
|
16
|
-
ionic start myfolder sidemenu
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Switch to myfolder
|
|
20
|
-
cd myfolder
|
|
21
|
-
|
|
22
|
-
// Add android platform to project
|
|
23
|
-
if (cordova-plugin) {
|
|
24
|
-
// If you are using plugin as cordova wrapper
|
|
25
|
-
cordova platform add android --save
|
|
26
|
-
}
|
|
27
|
-
else if (ionic-plugin) {
|
|
28
|
-
// If you are using plugin as ionic wrapper
|
|
29
|
-
ionic platform add android
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Add appice plugin to project
|
|
33
|
-
if (cordova-plugin) {
|
|
34
|
-
// If you are using plugin from npm install
|
|
35
|
-
cordova plugin add cordova-plugin-appice --variable APPICE_APP_ID="appid" --variable APPICE_API_KEY="apikey" --variable APPICE_APP_KEY="appkey"
|
|
36
|
-
|
|
37
|
-
// If you are using plugin from github install
|
|
38
|
-
cordova plugin add https://github.com/AppICEIO/cordova-plugin-appice.git --variable APPICE_APP_ID="appid" --variable APPICE_API_KEY="apikey" --variable APPICE_APP_KEY="appkey"
|
|
39
|
-
|
|
40
|
-
// If you are using plugin from local file system
|
|
41
|
-
cordova plugin add /Volumes/Data/workspace_Appice/cordova-plugin-appice --variable APPICE_APP_ID="appid" --variable APPICE_API_KEY="apikey" --variable APPICE_APP_KEY="appkey"
|
|
42
|
-
}
|
|
43
|
-
else if (ionic-plugin) {
|
|
44
|
-
// If you are using plugin as ionic wrapper
|
|
45
|
-
cordova plugin add https://github.com/AppICEIO/cordova-plugin-appice.git
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// Sync project with plugin and platform
|
|
49
|
-
if (cordova-plugin) {
|
|
50
|
-
// If you are using plugin as cordova wrapper
|
|
51
|
-
cordova prepare
|
|
52
|
-
}
|
|
53
|
-
else if (ionic-plugin) {
|
|
54
|
-
// If you are using plugin as ionic wrapper
|
|
55
|
-
ionic prepare
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// To validation integration process
|
|
59
|
-
AppICE.validateIntegration(function(success) {
|
|
60
|
-
console.log("Integration Success");
|
|
61
|
-
}, function(error) {
|
|
62
|
-
console.error("Ingetration Error : " + error);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// To handle notification click handling
|
|
66
|
-
AppICE.onNotificationOpen(function(notification) {
|
|
67
|
-
console.log("Notification Data : " + JSON.stringify(notification));
|
|
68
|
-
}, function(error) {
|
|
69
|
-
console.error("Notification Error : " + error);
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// To use appice in your project
|
|
73
|
-
// Custom gcm-id for already existing gcm being used
|
|
74
|
-
AppICE.initSdk("<app_id>","<app_key>","<api_key>","<Custom gcm id to use>","region","baseUrl");
|
|
75
|
-
|
|
76
|
-
// To send events via appice - only key
|
|
77
|
-
AppICE.tagEvent("<Key of event>");
|
|
78
|
-
|
|
79
|
-
// To send events via appice - with key and data
|
|
80
|
-
var dataObj = {
|
|
81
|
-
"key1":"val1"
|
|
82
|
-
};
|
|
83
|
-
AppICE.tagEvent("<Key of event>", dataObj);
|
|
84
|
-
|
|
85
|
-
// To set custom variables
|
|
86
|
-
AppICE.setCustomVariable("<variable name>", "<variable value>");
|
|
87
|
-
|
|
88
|
-
// To set user info
|
|
89
|
-
AppICE.setUser("<user-name>", "<user-phone>", "<user-email>");
|
|
90
|
-
|
|
91
|
-
// Build project and run
|
|
92
|
-
if (cordova-plugin) {
|
|
93
|
-
// If you are using plugin as cordova wrapper
|
|
94
|
-
cordova build android
|
|
95
|
-
cordova run android
|
|
96
|
-
}
|
|
97
|
-
else if (ionic-plugin) {
|
|
98
|
-
// If you are using plugin as ionic wrapper
|
|
99
|
-
ionic run android -l -c
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
=========================================
|
|
103
|
-
//using MFP
|
|
104
|
-
<preference name="APPICE_FIREBASE_UPDATE" value="false" />
|
|
105
|
-
<preference name="APPICE_APPLICATIONCLASS_INCLUDE" value="false" />
|
|
106
|
-
<preference name="MFP_PUSH" value="true" />
|
|
107
|
-
<preference name="SSL_PINNING" value="true" />
|
|
108
|
-
|
|
109
|
-
//using FCM
|
|
110
|
-
<preference name="APPICE_FIREBASE_UPDATE" value="true" />
|
|
111
|
-
<preference name="APPICE_APPLICATIONCLASS_INCLUDE" value="true" />
|
|
112
|
-
<preference name="MFP_PUSH" value="false" />
|
|
113
|
-
<preference name="SSL_PINNING" value="false" />
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
//////////////for ssl pinning
|
|
117
|
-
create "res" folder in root and add certs:
|
|
118
|
-
1.ai_ios.der for ios
|
|
119
|
-
2.ai_android.pem for android
|
|
120
|
-
```
|
|
1
|
+
```
|
|
2
|
+
// Steps to use plugin
|
|
3
|
+
|
|
4
|
+
// Create sample project or use your own
|
|
5
|
+
if (cordova-plugin) {
|
|
6
|
+
// Use below to create project
|
|
7
|
+
// myfolder : directory under which app to create
|
|
8
|
+
// org.apache.cordova.myApp : app package name
|
|
9
|
+
// myApp : app name
|
|
10
|
+
cordova create myfolder org.apache.cordova.myApp myApp
|
|
11
|
+
}
|
|
12
|
+
else if (ionic-plugin) {
|
|
13
|
+
// Use below to create project
|
|
14
|
+
// myfolder : directory under which app to create
|
|
15
|
+
// sidemenu : ionic framework to use
|
|
16
|
+
ionic start myfolder sidemenu
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Switch to myfolder
|
|
20
|
+
cd myfolder
|
|
21
|
+
|
|
22
|
+
// Add android platform to project
|
|
23
|
+
if (cordova-plugin) {
|
|
24
|
+
// If you are using plugin as cordova wrapper
|
|
25
|
+
cordova platform add android --save
|
|
26
|
+
}
|
|
27
|
+
else if (ionic-plugin) {
|
|
28
|
+
// If you are using plugin as ionic wrapper
|
|
29
|
+
ionic platform add android
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Add appice plugin to project
|
|
33
|
+
if (cordova-plugin) {
|
|
34
|
+
// If you are using plugin from npm install
|
|
35
|
+
cordova plugin add cordova-plugin-appice --variable APPICE_APP_ID="appid" --variable APPICE_API_KEY="apikey" --variable APPICE_APP_KEY="appkey"
|
|
36
|
+
|
|
37
|
+
// If you are using plugin from github install
|
|
38
|
+
cordova plugin add https://github.com/AppICEIO/cordova-plugin-appice.git --variable APPICE_APP_ID="appid" --variable APPICE_API_KEY="apikey" --variable APPICE_APP_KEY="appkey"
|
|
39
|
+
|
|
40
|
+
// If you are using plugin from local file system
|
|
41
|
+
cordova plugin add /Volumes/Data/workspace_Appice/cordova-plugin-appice --variable APPICE_APP_ID="appid" --variable APPICE_API_KEY="apikey" --variable APPICE_APP_KEY="appkey"
|
|
42
|
+
}
|
|
43
|
+
else if (ionic-plugin) {
|
|
44
|
+
// If you are using plugin as ionic wrapper
|
|
45
|
+
cordova plugin add https://github.com/AppICEIO/cordova-plugin-appice.git
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Sync project with plugin and platform
|
|
49
|
+
if (cordova-plugin) {
|
|
50
|
+
// If you are using plugin as cordova wrapper
|
|
51
|
+
cordova prepare
|
|
52
|
+
}
|
|
53
|
+
else if (ionic-plugin) {
|
|
54
|
+
// If you are using plugin as ionic wrapper
|
|
55
|
+
ionic prepare
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// To validation integration process
|
|
59
|
+
AppICE.validateIntegration(function(success) {
|
|
60
|
+
console.log("Integration Success");
|
|
61
|
+
}, function(error) {
|
|
62
|
+
console.error("Ingetration Error : " + error);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// To handle notification click handling
|
|
66
|
+
AppICE.onNotificationOpen(function(notification) {
|
|
67
|
+
console.log("Notification Data : " + JSON.stringify(notification));
|
|
68
|
+
}, function(error) {
|
|
69
|
+
console.error("Notification Error : " + error);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// To use appice in your project
|
|
73
|
+
// Custom gcm-id for already existing gcm being used
|
|
74
|
+
AppICE.initSdk("<app_id>","<app_key>","<api_key>","<Custom gcm id to use>","region","baseUrl");
|
|
75
|
+
|
|
76
|
+
// To send events via appice - only key
|
|
77
|
+
AppICE.tagEvent("<Key of event>");
|
|
78
|
+
|
|
79
|
+
// To send events via appice - with key and data
|
|
80
|
+
var dataObj = {
|
|
81
|
+
"key1":"val1"
|
|
82
|
+
};
|
|
83
|
+
AppICE.tagEvent("<Key of event>", dataObj);
|
|
84
|
+
|
|
85
|
+
// To set custom variables
|
|
86
|
+
AppICE.setCustomVariable("<variable name>", "<variable value>");
|
|
87
|
+
|
|
88
|
+
// To set user info
|
|
89
|
+
AppICE.setUser("<user-name>", "<user-phone>", "<user-email>");
|
|
90
|
+
|
|
91
|
+
// Build project and run
|
|
92
|
+
if (cordova-plugin) {
|
|
93
|
+
// If you are using plugin as cordova wrapper
|
|
94
|
+
cordova build android
|
|
95
|
+
cordova run android
|
|
96
|
+
}
|
|
97
|
+
else if (ionic-plugin) {
|
|
98
|
+
// If you are using plugin as ionic wrapper
|
|
99
|
+
ionic run android -l -c
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
=========================================
|
|
103
|
+
//using MFP
|
|
104
|
+
<preference name="APPICE_FIREBASE_UPDATE" value="false" />
|
|
105
|
+
<preference name="APPICE_APPLICATIONCLASS_INCLUDE" value="false" />
|
|
106
|
+
<preference name="MFP_PUSH" value="true" />
|
|
107
|
+
<preference name="SSL_PINNING" value="true" />
|
|
108
|
+
|
|
109
|
+
//using FCM
|
|
110
|
+
<preference name="APPICE_FIREBASE_UPDATE" value="true" />
|
|
111
|
+
<preference name="APPICE_APPLICATIONCLASS_INCLUDE" value="true" />
|
|
112
|
+
<preference name="MFP_PUSH" value="false" />
|
|
113
|
+
<preference name="SSL_PINNING" value="false" />
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
//////////////for ssl pinning
|
|
117
|
+
create "res" folder in root and add certs:
|
|
118
|
+
1.ai_ios.der for ios
|
|
119
|
+
2.ai_android.pem for android
|
|
120
|
+
```
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cordova-plugin-appice",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "AppICE Plugin for Cordova/PhoneGap",
|
|
5
|
-
"cordova": {
|
|
6
|
-
"id": "cordova-plugin-appice",
|
|
7
|
-
"platforms": [
|
|
8
|
-
"ios",
|
|
9
|
-
"android"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"keywords": [
|
|
13
|
-
"AppICE",
|
|
14
|
-
"ecosystem:cordova",
|
|
15
|
-
"cordova-ios",
|
|
16
|
-
"cordova-android"
|
|
17
|
-
],
|
|
18
|
-
"author": "AppICE",
|
|
19
|
-
"license": "
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "cordova-plugin-appice",
|
|
3
|
+
"version": "2.0.03",
|
|
4
|
+
"description": "AppICE Plugin for Cordova/PhoneGap",
|
|
5
|
+
"cordova": {
|
|
6
|
+
"id": "cordova-plugin-appice",
|
|
7
|
+
"platforms": [
|
|
8
|
+
"ios",
|
|
9
|
+
"android"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"AppICE",
|
|
14
|
+
"ecosystem:cordova",
|
|
15
|
+
"cordova-ios",
|
|
16
|
+
"cordova-android"
|
|
17
|
+
],
|
|
18
|
+
"author": "AppICE",
|
|
19
|
+
"license": "Commercial",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/AppICEIO/cordova-plugin-appice/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/AppICEIO/cordova-plugin-appice#readme",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"shelljs": "^0.8.4"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/plugin.xml
CHANGED
|
@@ -1,132 +1,131 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-appice" version="2.0.
|
|
3
|
-
<name>AppICE</name>
|
|
4
|
-
<description>AppICE Plugin for Cordova/PhoneGap</description>
|
|
5
|
-
<license>Commercial</license>
|
|
6
|
-
<keywords>AppICE</keywords>
|
|
7
|
-
|
|
8
|
-
<js-module src="www/AppICE.js" name="AppICE">
|
|
9
|
-
<clobbers target="AppICE" />
|
|
10
|
-
</js-module>
|
|
11
|
-
|
|
12
|
-
<engines>
|
|
13
|
-
<engine name="cordova" version=">=3.0.0" />
|
|
14
|
-
</engines>
|
|
15
|
-
|
|
16
|
-
<preference name="APPICE_APP_ID" />
|
|
17
|
-
<preference name="APPICE_APP_KEY" />
|
|
18
|
-
<preference name="APPICE_API_KEY" />
|
|
19
|
-
|
|
20
|
-
<platform name="ios">
|
|
21
|
-
<config-file target="*-Info.plist" parent="AppICEAppID">
|
|
22
|
-
<string>$APPICE_APP_ID</string>
|
|
23
|
-
</config-file>
|
|
24
|
-
|
|
25
|
-
<config-file target="*-Info.plist" parent="AppICEAppKey">
|
|
26
|
-
<string>$APPICE_APP_KEY</string>
|
|
27
|
-
</config-file>
|
|
28
|
-
|
|
29
|
-
<config-file target="*-Info.plist" parent="AppICEApiKey">
|
|
30
|
-
<string>$APPICE_API_KEY</string>
|
|
31
|
-
</config-file>
|
|
32
|
-
|
|
33
|
-
<config-file parent="aps-environment" target="*/Entitlements-Debug.plist">
|
|
34
|
-
<string>development</string>
|
|
35
|
-
</config-file>
|
|
36
|
-
<config-file parent="aps-environment" target="*/Entitlements-Release.plist">
|
|
37
|
-
<string>production</string>
|
|
38
|
-
</config-file>
|
|
39
|
-
|
|
40
|
-
<podspec>
|
|
41
|
-
<pods>
|
|
42
|
-
<pod name="AppICE-IOS-SDK"/>
|
|
43
|
-
</pods>
|
|
44
|
-
</podspec>
|
|
45
|
-
|
|
46
|
-
<config-file target="config.xml" parent="/*">
|
|
47
|
-
<feature name="AppICEPlugin">
|
|
48
|
-
<param name="ios-package" value="AppICEPlugin"/>
|
|
49
|
-
<param name="onload" value="true" />
|
|
50
|
-
</feature>
|
|
51
|
-
</config-file>
|
|
52
|
-
|
|
53
|
-
<header-file src="src/ios/AppDelegate+AppICEPlugin.h" />
|
|
54
|
-
<source-file src="src/ios/AppDelegate+AppICEPlugin.m" />
|
|
55
|
-
<header-file src="src/ios/AppICEPlugin.h" />
|
|
56
|
-
<source-file src="src/ios/AppICEPlugin.m" />
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<framework src="NotificationCenter.framework" />
|
|
60
|
-
<framework src="UserNotificationsUI.framework" weak="true"/>
|
|
61
|
-
<framework src="UserNotifications.framework" />
|
|
62
|
-
<framework src="Security.framework" />
|
|
63
|
-
<framework src="CoreFoundation.framework" />
|
|
64
|
-
<framework src="CFNetwork.framework" />
|
|
65
|
-
<framework src="AVFoundation.framework" />
|
|
66
|
-
<framework src="QuartzCore.framework" />
|
|
67
|
-
<framework src="ImageIO.framework" />
|
|
68
|
-
<framework src="AssetsLibrary.framework" />
|
|
69
|
-
<framework src="SystemConfiguration.framework" />
|
|
70
|
-
<framework src="CoreData.framework" />
|
|
71
|
-
<framework src="CoreTelephony.framework" />
|
|
72
|
-
<framework src="CoreGraphics.framework" />
|
|
73
|
-
<framework src="UIKit.framework" />
|
|
74
|
-
<framework src="Foundation.framework" />
|
|
75
|
-
<framework src="CoreServices.framework" />
|
|
76
|
-
<framework src="libc++.tbd" />
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<hook type="after_plugin_install" src="scripts/iOSAfterPluginAdd.js" />
|
|
80
|
-
<hook type="before_plugin_uninstall" src="scripts/iOSAfterPluginRm.js" />
|
|
81
|
-
<hook type="before_build" src="scripts/BeforeIosBuilt.js" />
|
|
82
|
-
</platform>
|
|
83
|
-
|
|
84
|
-
<platform name="android">
|
|
85
|
-
|
|
86
|
-
<!-- <config-file>
|
|
87
|
-
<access origin="*.appice.io" />
|
|
88
|
-
</config-file> -->
|
|
89
|
-
|
|
90
|
-
<config-file target="config.xml" parent="/*">
|
|
91
|
-
<feature name="AppICEPlugin">
|
|
92
|
-
<param name="android-package" value="com.appice.cordova.AppICEPlugin" />
|
|
93
|
-
<param name="onload" value="true" />
|
|
94
|
-
</feature>
|
|
95
|
-
</config-file>
|
|
96
|
-
|
|
97
|
-
<config-file target="AndroidManifest.xml" parent="/manifest">
|
|
98
|
-
<uses-permission android:name="android.permission.INTERNET"/>
|
|
99
|
-
<permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
|
|
100
|
-
<uses-permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"/>
|
|
101
|
-
</config-file>
|
|
102
|
-
|
|
103
|
-
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
|
104
|
-
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
|
|
105
|
-
<meta-data android:name="com.semusi.analytics.appid" android:value="$APPICE_APP_ID"/>
|
|
106
|
-
<meta-data android:name="com.semusi.analytics.appkey" android:value="$APPICE_APP_KEY"/>
|
|
107
|
-
<meta-data android:name="com.semusi.analytics.apikey" android:value="$APPICE_API_KEY"/>
|
|
108
|
-
|
|
109
|
-
</config-file>
|
|
110
|
-
|
|
111
|
-
<framework src="com.google.android.gms:play-services-ads:16.0.0" />
|
|
112
|
-
<framework src="com.google.android.gms:play-services-location:
|
|
113
|
-
|
|
114
|
-
<framework src="com.google.firebase:firebase-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
</plugin>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="cordova-plugin-appice" version="2.0.03">
|
|
3
|
+
<name>AppICE</name>
|
|
4
|
+
<description>AppICE Plugin for Cordova/PhoneGap</description>
|
|
5
|
+
<license>Commercial</license>
|
|
6
|
+
<keywords>AppICE</keywords>
|
|
7
|
+
|
|
8
|
+
<js-module src="www/AppICE.js" name="AppICE">
|
|
9
|
+
<clobbers target="AppICE" />
|
|
10
|
+
</js-module>
|
|
11
|
+
|
|
12
|
+
<engines>
|
|
13
|
+
<engine name="cordova" version=">=3.0.0" />
|
|
14
|
+
</engines>
|
|
15
|
+
|
|
16
|
+
<preference name="APPICE_APP_ID" />
|
|
17
|
+
<preference name="APPICE_APP_KEY" />
|
|
18
|
+
<preference name="APPICE_API_KEY" />
|
|
19
|
+
|
|
20
|
+
<platform name="ios">
|
|
21
|
+
<config-file target="*-Info.plist" parent="AppICEAppID">
|
|
22
|
+
<string>$APPICE_APP_ID</string>
|
|
23
|
+
</config-file>
|
|
24
|
+
|
|
25
|
+
<config-file target="*-Info.plist" parent="AppICEAppKey">
|
|
26
|
+
<string>$APPICE_APP_KEY</string>
|
|
27
|
+
</config-file>
|
|
28
|
+
|
|
29
|
+
<config-file target="*-Info.plist" parent="AppICEApiKey">
|
|
30
|
+
<string>$APPICE_API_KEY</string>
|
|
31
|
+
</config-file>
|
|
32
|
+
|
|
33
|
+
<config-file parent="aps-environment" target="*/Entitlements-Debug.plist">
|
|
34
|
+
<string>development</string>
|
|
35
|
+
</config-file>
|
|
36
|
+
<config-file parent="aps-environment" target="*/Entitlements-Release.plist">
|
|
37
|
+
<string>production</string>
|
|
38
|
+
</config-file>
|
|
39
|
+
|
|
40
|
+
<podspec>
|
|
41
|
+
<pods>
|
|
42
|
+
<pod name="AppICE-IOS-SDK"/>
|
|
43
|
+
</pods>
|
|
44
|
+
</podspec>
|
|
45
|
+
|
|
46
|
+
<config-file target="config.xml" parent="/*">
|
|
47
|
+
<feature name="AppICEPlugin">
|
|
48
|
+
<param name="ios-package" value="AppICEPlugin"/>
|
|
49
|
+
<param name="onload" value="true" />
|
|
50
|
+
</feature>
|
|
51
|
+
</config-file>
|
|
52
|
+
|
|
53
|
+
<header-file src="src/ios/AppDelegate+AppICEPlugin.h" />
|
|
54
|
+
<source-file src="src/ios/AppDelegate+AppICEPlugin.m" />
|
|
55
|
+
<header-file src="src/ios/AppICEPlugin.h" />
|
|
56
|
+
<source-file src="src/ios/AppICEPlugin.m" />
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<framework src="NotificationCenter.framework" />
|
|
60
|
+
<framework src="UserNotificationsUI.framework" weak="true"/>
|
|
61
|
+
<framework src="UserNotifications.framework" />
|
|
62
|
+
<framework src="Security.framework" />
|
|
63
|
+
<framework src="CoreFoundation.framework" />
|
|
64
|
+
<framework src="CFNetwork.framework" />
|
|
65
|
+
<framework src="AVFoundation.framework" />
|
|
66
|
+
<framework src="QuartzCore.framework" />
|
|
67
|
+
<framework src="ImageIO.framework" />
|
|
68
|
+
<framework src="AssetsLibrary.framework" />
|
|
69
|
+
<framework src="SystemConfiguration.framework" />
|
|
70
|
+
<framework src="CoreData.framework" />
|
|
71
|
+
<framework src="CoreTelephony.framework" />
|
|
72
|
+
<framework src="CoreGraphics.framework" />
|
|
73
|
+
<framework src="UIKit.framework" />
|
|
74
|
+
<framework src="Foundation.framework" />
|
|
75
|
+
<framework src="CoreServices.framework" />
|
|
76
|
+
<framework src="libc++.tbd" />
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
<hook type="after_plugin_install" src="scripts/iOSAfterPluginAdd.js" />
|
|
80
|
+
<hook type="before_plugin_uninstall" src="scripts/iOSAfterPluginRm.js" />
|
|
81
|
+
<hook type="before_build" src="scripts/BeforeIosBuilt.js" />
|
|
82
|
+
</platform>
|
|
83
|
+
|
|
84
|
+
<platform name="android">
|
|
85
|
+
|
|
86
|
+
<!-- <config-file>
|
|
87
|
+
<access origin="*.appice.io" />
|
|
88
|
+
</config-file> -->
|
|
89
|
+
|
|
90
|
+
<config-file target="config.xml" parent="/*">
|
|
91
|
+
<feature name="AppICEPlugin">
|
|
92
|
+
<param name="android-package" value="com.appice.cordova.AppICEPlugin" />
|
|
93
|
+
<param name="onload" value="true" />
|
|
94
|
+
</feature>
|
|
95
|
+
</config-file>
|
|
96
|
+
|
|
97
|
+
<config-file target="AndroidManifest.xml" parent="/manifest">
|
|
98
|
+
<uses-permission android:name="android.permission.INTERNET"/>
|
|
99
|
+
<permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
|
|
100
|
+
<uses-permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE"/>
|
|
101
|
+
</config-file>
|
|
102
|
+
|
|
103
|
+
<config-file target="AndroidManifest.xml" parent="/manifest/application">
|
|
104
|
+
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
|
|
105
|
+
<meta-data android:name="com.semusi.analytics.appid" android:value="$APPICE_APP_ID"/>
|
|
106
|
+
<meta-data android:name="com.semusi.analytics.appkey" android:value="$APPICE_APP_KEY"/>
|
|
107
|
+
<meta-data android:name="com.semusi.analytics.apikey" android:value="$APPICE_API_KEY"/>
|
|
108
|
+
|
|
109
|
+
</config-file>
|
|
110
|
+
|
|
111
|
+
<framework src="com.google.android.gms:play-services-ads:16.0.0" />
|
|
112
|
+
<framework src="com.google.android.gms:play-services-location:21.0.1" />
|
|
113
|
+
<framework src="com.google.firebase:firebase-iid:20.0.0" />
|
|
114
|
+
<framework src="com.google.firebase:firebase-messaging:20.0.0" />
|
|
115
|
+
<framework src="com.google.firebase:firebase-core:16.0.9" />
|
|
116
|
+
<framework src="com.android.support:support-v4:+" />
|
|
117
|
+
<framework src="appice.io.android:cordova:1.1.1" />
|
|
118
|
+
<framework src="src/build.gradle" custom="true" type="gradleReference" />
|
|
119
|
+
|
|
120
|
+
<framework src="com.gitlab.grp_appice.src_android_appice-sdk:sdk:2.5.07"/>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
<!--to add modified firebasex files,includes appice classin
|
|
124
|
+
manifest,when SSL pinning enabled adds tag to manifest -->
|
|
125
|
+
<hook type="after_plugin_install" src="scripts/androidAfterPluginAdd.js" />
|
|
126
|
+
<!-- undo all changes -->
|
|
127
|
+
<hook type="before_plugin_uninstall" src="scripts/androidAfterPluginRm.js" />
|
|
128
|
+
<!--if MFP PUSH ENABLED then doing changes in manifest and project.properties -->
|
|
129
|
+
<hook type="before_build" src="scripts/BeforeAndroidBuilt.js" />
|
|
130
|
+
</platform>
|
|
131
|
+
</plugin>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = function(context) {
|
|
2
2
|
var fs =require ('fs');
|
|
3
3
|
var path = require('path');
|
|
4
|
-
var shell = require('
|
|
4
|
+
var shell = require('shelljs');
|
|
5
5
|
|
|
6
6
|
var platformRoot = path.join(context.opts.projectRoot, 'platforms/android');
|
|
7
7
|
var platformRootios = path.join(context.opts.projectRoot, 'platforms/ios');
|
|
@@ -34,8 +34,7 @@ const appName = appConfig.name();
|
|
|
34
34
|
var serviceTag='<service android:exported="true" android:name="com.appice.appicemfppush.AppICEMFPPush">';
|
|
35
35
|
|
|
36
36
|
if (data.indexOf(serviceTag) == -1) {
|
|
37
|
-
|
|
38
|
-
var result = data.replace(/<service android:exported="false" android:name="com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPushNewIntentService">/g,serviceTag);
|
|
37
|
+
var result = data.replace(/<service android:exported="false" android:name="com.ibm.fcmtest.myIntentService">/g,serviceTag);
|
|
39
38
|
fs.writeFile(manifestFileNew, result, 'utf8', function (err) {
|
|
40
39
|
if (err) {
|
|
41
40
|
throw new Error('Unable to write into AndroidManifest.xml: ' + err);
|
|
@@ -57,7 +56,7 @@ const appName = appConfig.name();
|
|
|
57
56
|
var serviceTag='<service android:exported="true" android:name="com.appice.appicemfppush.AppICEMFPPush">';
|
|
58
57
|
|
|
59
58
|
if (data.indexOf(serviceTag) == -1) {
|
|
60
|
-
var result = data.replace(/<service android:exported="false" android:name="com.ibm.
|
|
59
|
+
var result = data.replace(/<service android:exported="false" android:name="com.ibm.fcmtest.myIntentService">/g,serviceTag);
|
|
61
60
|
fs.writeFile(manifestFileNewRoot, result, 'utf8', function (err) {
|
|
62
61
|
if (err) {
|
|
63
62
|
throw new Error('Unable to write into AndroidManifest.xml: ' + err);
|