cordova-plugin-appice 2.0.7 → 2.0.8

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.
Files changed (35) hide show
  1. package/README.md +122 -122
  2. package/example/config.xml +59 -59
  3. package/example/package.json +38 -38
  4. package/example/res/ai_android.pem +40 -40
  5. package/example/www/css/index.css +116 -116
  6. package/example/www/index.html +62 -62
  7. package/example/www/js/index.js +102 -102
  8. package/libcordova/android-release-aar.gradle +62 -62
  9. package/libcordova/build.gradle +50 -50
  10. package/libcordova/proguard-rules.pro +21 -21
  11. package/libcordova/src/main/AndroidManifest.xml +24 -24
  12. package/libcordova/src/main/java/com/appice/cordova/AppICEPlugin.java +968 -968
  13. package/libcordova/src/main/java/com/appice/cordova/CampaignCampsReceiver.java +95 -95
  14. package/libcordova/src/main/java/com/appice/cordova/NotificationEventService.java +55 -55
  15. package/libcordova/src/main/res/values/strings.xml +3 -3
  16. package/package.json +26 -26
  17. package/plugin.xml +128 -129
  18. package/scripts/BeforeAndroidBuilt.js +126 -112
  19. package/scripts/BeforeIosBuilt.js +38 -38
  20. package/scripts/androidAfterPluginAdd.js +159 -159
  21. package/scripts/androidAfterPluginRm.js +195 -195
  22. package/scripts/iOSAfterPluginAdd.js +98 -98
  23. package/scripts/iOSAfterPluginRm.js +74 -74
  24. package/src/build.gradle +14 -5
  25. package/src/firebase/modified/android/FirebasePluginMessagingService.java +356 -356
  26. package/src/firebase/modified/ios/AppDelegate+FirebasePlugin.m +529 -529
  27. package/src/firebase/modified/modified.iml +10 -10
  28. package/src/firebase/original/android/FirebasePluginMessagingService.java +348 -348
  29. package/src/firebase/original/ios/AppDelegate+FirebasePlugin.m +519 -519
  30. package/src/firebase/original/original.iml +10 -10
  31. package/src/ios/AppDelegate+AppICEPlugin.h +8 -8
  32. package/src/ios/AppDelegate+AppICEPlugin.m +191 -259
  33. package/src/ios/AppICEPlugin.h +90 -90
  34. package/src/ios/AppICEPlugin.m +1062 -1087
  35. package/www/AppICE.js +283 -283
@@ -1,75 +1,75 @@
1
- #!/usr/bin/env node
2
-
3
- module.exports = function(context) {
4
-
5
- var fs = require('fs');
6
- var path = require('path');
7
- var shell = require('shelljs');
8
-
9
- const cordovaCommon = context.requireCordovaModule('cordova-common');
10
- const appConfig = new cordovaCommon.ConfigParser('config.xml');
11
- var appName = appConfig.name();
12
-
13
- var platformRoot = path.join(context.opts.projectRoot, 'platforms/ios');
14
- var pluginsFirebaseRoot = path.join(context.opts.projectRoot, 'plugins/cordova-plugin-firebasex');
15
- var pluginsAppiceRoot = path.join(context.opts.projectRoot, 'plugins/cordova-plugin-appice');
16
- var APPICE_FIREBASE_UPDATE = appConfig.getPlatformPreference("APPICE_FIREBASE_UPDATE", "ios");
17
- var APPICE_APPLICATIONCLASS_INCLUDE= appConfig.getPlatformPreference("APPICE_APPLICATIONCLASS_INCLUDE", "ios");
18
- var SSL_PINNING=appConfig.getPlatformPreference("SSL_PINNING", "ios");
19
-
20
- var firebaseFile1 = path.join(platformRoot, '/'+appName+'/Plugins/cordova-plugin-firebasex/AppDelegate+FirebasePlugin.m');
21
- if (fs.existsSync(firebaseFile1)) {
22
- try {
23
- shell.rm('-Rf', firebaseFile1);
24
- } catch(err) {
25
- }
26
- }
27
-
28
- var modifiedFile1 = path.join(pluginsAppiceRoot, '/src/firebase/original/ios/AppDelegate+FirebasePlugin.m');
29
- try {
30
- shell.cp('-f', modifiedFile1, firebaseFile1);
31
- } catch(err) {
32
- }
33
-
34
- var firebaseFile2 = path.join(pluginsFirebaseRoot, '/src/ios/AppDelegate+FirebasePlugin.m');
35
- if (fs.existsSync(firebaseFile2)) {
36
- try {
37
- shell.rm('-Rf', firebaseFile2);
38
- } catch(err) {
39
- }
40
- }
41
-
42
- try {
43
- shell.cp('-f', modifiedFile1, firebaseFile2);
44
- } catch(err) {
45
- }
46
-
47
- if(SSL_PINNING === "true"){
48
- console.log("appName : "+appName);
49
- var get_info_plist=path.join(platformRoot,appName+ '/'+appName+'-Info.plist');
50
- if(fs.existsSync(get_info_plist)){
51
- console.log("ssl");
52
- try{
53
- fs.readFile(get_info_plist, 'utf8', function (err,data) {
54
- if (err) {
55
- throw new Error('Unable to find Plist: ' + err);
56
- }
57
- ///for removing SSL pinning
58
- var SSL_PINNING_key = '<key>APPICE_SSL_PINNING</key>\n<true/>';
59
- if (data.indexOf(SSL_PINNING_key) == -1) {
60
- var result = data.replace('APPICE_SSL_PINNING','');
61
- fs.writeFile(get_info_plist, result, 'utf8', function (err) {
62
- if (err) {
63
- throw new Error('Unable to write into Plist: ' + err);
64
- }
65
- });
66
-
67
- }
68
- });
69
- }
70
- catch(err) {
71
- }
72
- }
73
-
74
- }
1
+ #!/usr/bin/env node
2
+
3
+ module.exports = function(context) {
4
+
5
+ var fs = require('fs');
6
+ var path = require('path');
7
+ var shell = require('shelljs');
8
+
9
+ const cordovaCommon = context.requireCordovaModule('cordova-common');
10
+ const appConfig = new cordovaCommon.ConfigParser('config.xml');
11
+ var appName = appConfig.name();
12
+
13
+ var platformRoot = path.join(context.opts.projectRoot, 'platforms/ios');
14
+ var pluginsFirebaseRoot = path.join(context.opts.projectRoot, 'plugins/cordova-plugin-firebasex');
15
+ var pluginsAppiceRoot = path.join(context.opts.projectRoot, 'plugins/cordova-plugin-appice');
16
+ var APPICE_FIREBASE_UPDATE = appConfig.getPlatformPreference("APPICE_FIREBASE_UPDATE", "ios");
17
+ var APPICE_APPLICATIONCLASS_INCLUDE= appConfig.getPlatformPreference("APPICE_APPLICATIONCLASS_INCLUDE", "ios");
18
+ var SSL_PINNING=appConfig.getPlatformPreference("SSL_PINNING", "ios");
19
+
20
+ var firebaseFile1 = path.join(platformRoot, '/'+appName+'/Plugins/cordova-plugin-firebasex/AppDelegate+FirebasePlugin.m');
21
+ if (fs.existsSync(firebaseFile1)) {
22
+ try {
23
+ shell.rm('-Rf', firebaseFile1);
24
+ } catch(err) {
25
+ }
26
+ }
27
+
28
+ var modifiedFile1 = path.join(pluginsAppiceRoot, '/src/firebase/original/ios/AppDelegate+FirebasePlugin.m');
29
+ try {
30
+ shell.cp('-f', modifiedFile1, firebaseFile1);
31
+ } catch(err) {
32
+ }
33
+
34
+ var firebaseFile2 = path.join(pluginsFirebaseRoot, '/src/ios/AppDelegate+FirebasePlugin.m');
35
+ if (fs.existsSync(firebaseFile2)) {
36
+ try {
37
+ shell.rm('-Rf', firebaseFile2);
38
+ } catch(err) {
39
+ }
40
+ }
41
+
42
+ try {
43
+ shell.cp('-f', modifiedFile1, firebaseFile2);
44
+ } catch(err) {
45
+ }
46
+
47
+ if(SSL_PINNING === "true"){
48
+ console.log("appName : "+appName);
49
+ var get_info_plist=path.join(platformRoot,appName+ '/'+appName+'-Info.plist');
50
+ if(fs.existsSync(get_info_plist)){
51
+ console.log("ssl");
52
+ try{
53
+ fs.readFile(get_info_plist, 'utf8', function (err,data) {
54
+ if (err) {
55
+ throw new Error('Unable to find Plist: ' + err);
56
+ }
57
+ ///for removing SSL pinning
58
+ var SSL_PINNING_key = '<key>APPICE_SSL_PINNING</key>\n<true/>';
59
+ if (data.indexOf(SSL_PINNING_key) == -1) {
60
+ var result = data.replace('APPICE_SSL_PINNING','');
61
+ fs.writeFile(get_info_plist, result, 'utf8', function (err) {
62
+ if (err) {
63
+ throw new Error('Unable to write into Plist: ' + err);
64
+ }
65
+ });
66
+
67
+ }
68
+ });
69
+ }
70
+ catch(err) {
71
+ }
72
+ }
73
+
74
+ }
75
75
  }
package/src/build.gradle CHANGED
@@ -1,6 +1,15 @@
1
- allprojects {
2
- apply from: 'repositories.gradle'
3
- repositories {
4
- maven { url "https://jitpack.io" }
5
- }
1
+ allprojects {
2
+ apply from: 'repositories.gradle'
3
+ repositories {
4
+ maven {
5
+ url "https://gitlab.com/api/v4/projects/10636887/packages/maven"
6
+ credentials(HttpHeaderCredentials) {
7
+ name = "Deploy-Token"
8
+ value = ""
9
+ }
10
+ authentication {
11
+ header(HttpHeaderAuthentication)
12
+ }
13
+ }
14
+ }
6
15
  }