react-native-notifyvisitors 4.6.3 → 4.8.0
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/android/.settings/org.eclipse.buildship.core.prefs +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/rn_notifyvisitors/RNNotifyvisitorsModule.java +130 -46
- package/index.d.ts +15 -0
- package/index.js +16 -1
- package/ios/RNNotifyvisitors/RNNotifyvisitors.m +1 -1
- package/ios/RNNotifyvisitors.xcodeproj/project.pbxproj +4 -4
- package/ios/notifyvisitors.xcframework/Info.plist +9 -9
- package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/Assets.car +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/Info.plist +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/_CodeSignature/CodeResources +3 -3
- package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/notifyvisitors +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-maccatalyst/notifyvisitors.framework/Versions/A/Resources/Assets.car +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-maccatalyst/notifyvisitors.framework/Versions/A/Resources/Info.plist +9 -9
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-maccatalyst/notifyvisitors.framework/Versions/A/_CodeSignature/CodeResources +4 -4
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-maccatalyst/notifyvisitors.framework/Versions/A/notifyvisitors +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/Assets.car +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/Info.plist +0 -0
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/_CodeSignature/CodeResources +3 -3
- package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/notifyvisitors +0 -0
- package/package.json +1 -1
- package/react-native-notifyvisitors.podspec +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
arguments=--init-script /var/folders/tw/px__qvrn1sg589qgm6l8jxqr0000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/tw/px__qvrn1sg589qgm6l8jxqr0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
|
|
1
|
+
arguments=--init-script /var/folders/tw/px__qvrn1sg589qgm6l8jxqr0000gn/T/db3b08fc4a9ef609cb16b96b200fa13e563f396e9bb1ed0905fdab7bc3bc513b.gradle --init-script /var/folders/tw/px__qvrn1sg589qgm6l8jxqr0000gn/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle --init-script /var/folders/tw/px__qvrn1sg589qgm6l8jxqr0000gn/T/861a75667e10803d304a058d833cb7404195ca44013d0d61d3b653eb084379b8.gradle --init-script /var/folders/tw/px__qvrn1sg589qgm6l8jxqr0000gn/T/68eb1b6516fe21c6fbba58e63c99c3207ccfc918360613709367eecde56fa77f.gradle
|
|
2
2
|
auto.sync=false
|
|
3
3
|
build.scans.enabled=false
|
|
4
4
|
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(8.9))
|
package/android/build.gradle
CHANGED
|
@@ -35,8 +35,8 @@ android {
|
|
|
35
35
|
dependencies {
|
|
36
36
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
37
37
|
implementation 'com.facebook.react:react-native:+'
|
|
38
|
-
implementation('com.notifyvisitors.notifyvisitors:notifyvisitors:v5.
|
|
39
|
-
implementation("com.notifyvisitors.nudges:notifyvisitors-nudges:v0.0.
|
|
38
|
+
implementation('com.notifyvisitors.notifyvisitors:notifyvisitors:v5.8.1')
|
|
39
|
+
implementation("com.notifyvisitors.nudges:notifyvisitors-nudges:v0.0.9")
|
|
40
40
|
implementation platform('com.google.firebase:firebase-bom:33.16.0')
|
|
41
41
|
implementation ('com.google.firebase:firebase-messaging')
|
|
42
42
|
implementation ('com.google.android.gms:play-services-location')
|
|
@@ -44,13 +44,14 @@ import java.util.Set;
|
|
|
44
44
|
import java.util.Timer;
|
|
45
45
|
import java.util.TimerTask;
|
|
46
46
|
import java.util.Iterator;
|
|
47
|
+
import java.util.concurrent.atomic.AtomicBoolean;
|
|
47
48
|
|
|
48
49
|
|
|
49
50
|
public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implements ActivityEventListener {
|
|
50
51
|
|
|
51
52
|
private final ReactApplicationContext reactContext;
|
|
52
53
|
private static final String TAG = "RN-NotifyVisitors";
|
|
53
|
-
private static final String PLUGIN_VERSION = "4.
|
|
54
|
+
private static final String PLUGIN_VERSION = "4.8.0";
|
|
54
55
|
|
|
55
56
|
private String PUSH_BANNER_CLICK_EVENT = "nv_push_banner_click";
|
|
56
57
|
private String CHAT_BOT_BUTTON_CLICK = "nv_chat_bot_button_click";
|
|
@@ -145,6 +146,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
/* 1 - Survey, InApp Banners */
|
|
149
|
+
@Deprecated
|
|
148
150
|
@ReactMethod
|
|
149
151
|
public void show(ReadableMap tokens, ReadableMap customObjects, final String fragmentName, Callback callback) {
|
|
150
152
|
try {
|
|
@@ -335,6 +337,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
335
337
|
}
|
|
336
338
|
|
|
337
339
|
/* 2 - Notification Center */
|
|
340
|
+
@Deprecated
|
|
338
341
|
@ReactMethod
|
|
339
342
|
public void showNotifications(ReadableMap mAppInboxInfo, final int dismissValue) {
|
|
340
343
|
Log.i(TAG, "SHOW NOTIFICATIONS !!");
|
|
@@ -711,6 +714,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
711
714
|
}
|
|
712
715
|
|
|
713
716
|
/* 4 - Login User */
|
|
717
|
+
@Deprecated
|
|
714
718
|
@ReactMethod
|
|
715
719
|
public void userIdentifier(String userID, ReadableMap attributes) {
|
|
716
720
|
try {
|
|
@@ -1033,7 +1037,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1033
1037
|
config.setSecondTabDetail(tab2Label, tab2Name);
|
|
1034
1038
|
config.setThirdTabDetail(tab3Label, tab3Name);
|
|
1035
1039
|
|
|
1036
|
-
|
|
1040
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1037
1041
|
mActivity = reactContext.getCurrentActivity();
|
|
1038
1042
|
if (mActivity != null) {
|
|
1039
1043
|
mActivity.runOnUiThread(new Runnable() {
|
|
@@ -1042,12 +1046,22 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1042
1046
|
NotifyVisitorsApi.getInstance(reactContext).getNotificationCenterCount(new OnCenterCountListener() {
|
|
1043
1047
|
@Override
|
|
1044
1048
|
public void getCount(JSONObject tabCount) {
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
} else {
|
|
1049
|
-
Log.i(TAG, "GETTING NULL COUNT OBJECT !!");
|
|
1049
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1050
|
+
Log.w(TAG, "GET NOTIFICATION CENTER COUNT callback called multiple times - ignoring");
|
|
1051
|
+
return;
|
|
1050
1052
|
}
|
|
1053
|
+
Log.i(TAG, "Tab Counts : " + tabCount);
|
|
1054
|
+
final String response = (tabCount != null) ? tabCount.toString() : "{}";
|
|
1055
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1056
|
+
@Override
|
|
1057
|
+
public void run() {
|
|
1058
|
+
try {
|
|
1059
|
+
callback.invoke(response);
|
|
1060
|
+
} catch (Exception invokeError) {
|
|
1061
|
+
Log.i(TAG, "GET NOTIFICATION CENTER COUNT CALLBACK INVOKE ERROR : " + invokeError);
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
});
|
|
1051
1065
|
}
|
|
1052
1066
|
}, config);
|
|
1053
1067
|
}
|
|
@@ -1058,6 +1072,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1058
1072
|
|
|
1059
1073
|
} else {
|
|
1060
1074
|
Log.i(TAG, "INFO IS NULL GOING FOR STANDARD NOTIFICATION CENTER COUNT !!");
|
|
1075
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1061
1076
|
mActivity = reactContext.getCurrentActivity();
|
|
1062
1077
|
if (mActivity != null) {
|
|
1063
1078
|
mActivity.runOnUiThread(new Runnable() {
|
|
@@ -1066,12 +1081,22 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1066
1081
|
NotifyVisitorsApi.getInstance(reactContext).getNotificationCenterCount(new OnCenterCountListener() {
|
|
1067
1082
|
@Override
|
|
1068
1083
|
public void getCount(JSONObject tabCount) {
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
} else {
|
|
1073
|
-
Log.i(TAG, "GETTING NULL COUNT OBJECT !!");
|
|
1084
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1085
|
+
Log.w(TAG, "GET NOTIFICATION CENTER COUNT callback called multiple times - ignoring");
|
|
1086
|
+
return;
|
|
1074
1087
|
}
|
|
1088
|
+
Log.i(TAG, "Tab Counts : " + tabCount);
|
|
1089
|
+
final String response = (tabCount != null) ? tabCount.toString() : "{}";
|
|
1090
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1091
|
+
@Override
|
|
1092
|
+
public void run() {
|
|
1093
|
+
try {
|
|
1094
|
+
callback.invoke(response);
|
|
1095
|
+
} catch (Exception invokeError) {
|
|
1096
|
+
Log.i(TAG, "GET NOTIFICATION CENTER COUNT CALLBACK INVOKE ERROR : " + invokeError);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
});
|
|
1075
1100
|
}
|
|
1076
1101
|
}, null);
|
|
1077
1102
|
}
|
|
@@ -1100,6 +1125,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1100
1125
|
|
|
1101
1126
|
} catch (Exception e) {
|
|
1102
1127
|
Log.i(TAG, "GET NOTIFICATION CENTER COUNT ERROR : " + e);
|
|
1128
|
+
callback.invoke("unavailable");
|
|
1103
1129
|
}
|
|
1104
1130
|
}
|
|
1105
1131
|
|
|
@@ -1192,11 +1218,13 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1192
1218
|
}
|
|
1193
1219
|
|
|
1194
1220
|
/* 16 - JSon Data For Custom Notification Center */
|
|
1221
|
+
@Deprecated
|
|
1195
1222
|
@ReactMethod
|
|
1196
1223
|
public void getNotificationDataListener(final Callback callback) {
|
|
1197
1224
|
try {
|
|
1198
1225
|
Log.i(TAG, "GET NOTIFICATION DATA LISTENER !!");
|
|
1199
1226
|
mActivity = reactContext.getCurrentActivity();
|
|
1227
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1200
1228
|
if (mActivity != null) {
|
|
1201
1229
|
mActivity.runOnUiThread(new Runnable() {
|
|
1202
1230
|
@Override
|
|
@@ -1205,12 +1233,23 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1205
1233
|
@Override
|
|
1206
1234
|
public void getNotificationData(JSONArray notificationListResponse) {
|
|
1207
1235
|
try {
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
} else {
|
|
1212
|
-
callback.invoke("[]"); // Return empty array if null
|
|
1236
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1237
|
+
Log.w(TAG, "GET NOTIFICATION DATA LISTENER callback called multiple times - ignoring");
|
|
1238
|
+
return;
|
|
1213
1239
|
}
|
|
1240
|
+
|
|
1241
|
+
//Log.i(TAG, "RESPONSE : " + notificationListResponse);
|
|
1242
|
+
final String response = (notificationListResponse != null) ? notificationListResponse.toString() : "[]";
|
|
1243
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1244
|
+
@Override
|
|
1245
|
+
public void run() {
|
|
1246
|
+
try {
|
|
1247
|
+
callback.invoke(response);
|
|
1248
|
+
} catch (Exception invokeError) {
|
|
1249
|
+
Log.i(TAG, "GET NOTIFICATION DATA LISTENER CALLBACK INVOKE ERROR : " + invokeError);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1214
1253
|
} catch (Exception e) {
|
|
1215
1254
|
Log.i(TAG, "GET NOTIFICATION DATA LISTENER ERROR 2 : " + e);
|
|
1216
1255
|
}
|
|
@@ -1229,20 +1268,34 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1229
1268
|
@ReactMethod
|
|
1230
1269
|
public void getNotificationCenterData(final Callback callback) {
|
|
1231
1270
|
try {
|
|
1232
|
-
Log.i(TAG, "GET NOTIFICATION DATA
|
|
1271
|
+
Log.i(TAG, "GET NOTIFICATION CENTER DATA !!");
|
|
1233
1272
|
mActivity = reactContext.getCurrentActivity();
|
|
1273
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1234
1274
|
if (mActivity != null) {
|
|
1235
1275
|
mActivity.runOnUiThread(new Runnable() {
|
|
1236
1276
|
@Override
|
|
1237
1277
|
public void run() {
|
|
1238
|
-
NotifyVisitorsApi.getInstance(
|
|
1278
|
+
NotifyVisitorsApi.getInstance(reactContext).getNotificationCenterData(new OnCenterDataListener() {
|
|
1239
1279
|
@Override
|
|
1240
1280
|
public void getData(JSONObject jsonObject) {
|
|
1241
1281
|
try {
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1282
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1283
|
+
Log.w(TAG, "GET NOTIFICATION CENTER DATA callback called multiple times - ignoring");
|
|
1284
|
+
return;
|
|
1245
1285
|
}
|
|
1286
|
+
|
|
1287
|
+
//Log.i(TAG, "RESPONSE : " + jsonObject);
|
|
1288
|
+
final String response = (jsonObject != null) ? jsonObject.toString() : "{}";
|
|
1289
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1290
|
+
@Override
|
|
1291
|
+
public void run() {
|
|
1292
|
+
try {
|
|
1293
|
+
callback.invoke(response);
|
|
1294
|
+
} catch (Exception invokeError) {
|
|
1295
|
+
Log.i(TAG, "GET NOTIFICATION CENTER DATA CALLBACK INVOKE ERROR : " + invokeError);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1246
1299
|
} catch (Exception e) {
|
|
1247
1300
|
Log.i(TAG, "GET NOTIFICATION CENTER DATA ERROR 2 : " + e);
|
|
1248
1301
|
}
|
|
@@ -1345,23 +1398,36 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1345
1398
|
}
|
|
1346
1399
|
|
|
1347
1400
|
/* 22 - Depricated Function For Notification Count */
|
|
1401
|
+
@Deprecated
|
|
1348
1402
|
@ReactMethod
|
|
1349
1403
|
public void getNotificationCount(final Callback callback) {
|
|
1350
1404
|
try {
|
|
1351
1405
|
Log.i(TAG, "GET NOTIFICATION COUNT !!");
|
|
1406
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1352
1407
|
NotifyVisitorsApi.getInstance(reactContext).getNotificationCount(new NotificationCountInterface() {
|
|
1353
1408
|
@Override
|
|
1354
1409
|
public void getCount(int count) {
|
|
1355
|
-
|
|
1356
|
-
Log.
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1410
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1411
|
+
Log.w(TAG, "GET NOTIFICATION COUNT callback called multiple times - ignoring");
|
|
1412
|
+
return;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
Log.i(TAG, "COUNT : " + count);
|
|
1416
|
+
String strI = String.valueOf(count);
|
|
1417
|
+
if (strI == null || strI.isEmpty()) {
|
|
1418
|
+
strI = "0";
|
|
1364
1419
|
}
|
|
1420
|
+
final String response = strI;
|
|
1421
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1422
|
+
@Override
|
|
1423
|
+
public void run() {
|
|
1424
|
+
try {
|
|
1425
|
+
callback.invoke(response);
|
|
1426
|
+
} catch (Exception invokeError) {
|
|
1427
|
+
Log.i(TAG, "GET NOTIFICATION COUNT CALLBACK INVOKE ERROR : " + invokeError);
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
});
|
|
1365
1431
|
}
|
|
1366
1432
|
});
|
|
1367
1433
|
} catch (Exception e) {
|
|
@@ -1411,6 +1477,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1411
1477
|
design.setNumberOfSessions(Integer.parseInt(numberOfSessions));
|
|
1412
1478
|
design.setResumeInDays(Integer.parseInt(resumeInDays));
|
|
1413
1479
|
design.setNumberOfTimesPerSession(Integer.parseInt(numberOfTimesPerSession));
|
|
1480
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1414
1481
|
mActivity = reactContext.getCurrentActivity();
|
|
1415
1482
|
if (mActivity != null) {
|
|
1416
1483
|
mActivity.runOnUiThread(new Runnable() {
|
|
@@ -1419,16 +1486,23 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1419
1486
|
NotifyVisitorsApi.getInstance(mActivity).activatePushPermissionPopup(design, new OnPushRuntimePermission() {
|
|
1420
1487
|
@Override
|
|
1421
1488
|
public void getPopupInfo(JSONObject result) {
|
|
1422
|
-
|
|
1423
|
-
Log.
|
|
1424
|
-
|
|
1425
|
-
callback.invoke(result.toString());
|
|
1426
|
-
}
|
|
1427
|
-
} catch (Exception e) {
|
|
1428
|
-
Log.i(TAG, "PUSH PERMISSION PROMPT ERROR 2 : " + e);
|
|
1489
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1490
|
+
Log.w(TAG, "PUSH PERMISSION PROMPT callback called multiple times - ignoring");
|
|
1491
|
+
return;
|
|
1429
1492
|
}
|
|
1430
1493
|
|
|
1431
|
-
|
|
1494
|
+
//Log.i(TAG, "Popup Response => " + result);
|
|
1495
|
+
final String response = (result != null) ? result.toString() : "{}";
|
|
1496
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1497
|
+
@Override
|
|
1498
|
+
public void run() {
|
|
1499
|
+
try {
|
|
1500
|
+
callback.invoke(response);
|
|
1501
|
+
} catch (Exception invokeError) {
|
|
1502
|
+
Log.i(TAG, "PUSH PERMISSION PROMPT CALLBACK INVOKE ERROR : " + invokeError);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
});
|
|
1432
1506
|
}
|
|
1433
1507
|
});
|
|
1434
1508
|
}
|
|
@@ -1470,6 +1544,7 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1470
1544
|
try {
|
|
1471
1545
|
Log.i(TAG, "Check Native Push Permission Prompt !!");
|
|
1472
1546
|
|
|
1547
|
+
final AtomicBoolean callbackInvoked = new AtomicBoolean(false);
|
|
1473
1548
|
mActivity = reactContext.getCurrentActivity();
|
|
1474
1549
|
if (mActivity != null) {
|
|
1475
1550
|
mActivity.runOnUiThread(new Runnable() {
|
|
@@ -1478,14 +1553,23 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
1478
1553
|
NotifyVisitorsApi.getInstance(mActivity).nativePushPermissionPrompt(new OnPushRuntimePermission() {
|
|
1479
1554
|
@Override
|
|
1480
1555
|
public void getPopupInfo(JSONObject result) {
|
|
1481
|
-
|
|
1482
|
-
Log.
|
|
1483
|
-
|
|
1484
|
-
callback.invoke(result.toString());
|
|
1485
|
-
}
|
|
1486
|
-
} catch (Exception e) {
|
|
1487
|
-
Log.i(TAG, "NATIVE PUSH PERMISSION PROMPT ERROR 2 : " + e);
|
|
1556
|
+
if (!callbackInvoked.compareAndSet(false, true)) {
|
|
1557
|
+
Log.w(TAG, "NATIVE PUSH PERMISSION PROMPT callback called multiple times - ignoring");
|
|
1558
|
+
return;
|
|
1488
1559
|
}
|
|
1560
|
+
|
|
1561
|
+
//Log.i(TAG, "Popup Response => " + result);
|
|
1562
|
+
final String response = (result != null) ? result.toString() : "{}";
|
|
1563
|
+
reactContext.runOnUiQueueThread(new Runnable() {
|
|
1564
|
+
@Override
|
|
1565
|
+
public void run() {
|
|
1566
|
+
try {
|
|
1567
|
+
callback.invoke(response);
|
|
1568
|
+
} catch (Exception invokeError) {
|
|
1569
|
+
Log.i(TAG, "NATIVE PUSH PERMISSION PROMPT CALLBACK INVOKE ERROR : " + invokeError);
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1489
1573
|
}
|
|
1490
1574
|
});
|
|
1491
1575
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export default class Notifyvisitors {
|
|
2
2
|
/* 1 - inApp-Banner & inApp-Surveys */
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use showInAppMessage(tokens, customObjects, fragmentName, nvCallback) instead.
|
|
5
|
+
*/
|
|
3
6
|
static show(
|
|
4
7
|
tokens: any,
|
|
5
8
|
customObjects: any,
|
|
@@ -23,10 +26,19 @@ export default class Notifyvisitors {
|
|
|
23
26
|
dismissValue: any,
|
|
24
27
|
callback: any
|
|
25
28
|
): void;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Use openNotificationCenter(mAppInboxInfo, dismissValue, callback) instead.
|
|
31
|
+
*/
|
|
26
32
|
static showNotifications(mAppInboxInfo: any, dismissValue: any): void;
|
|
27
33
|
static getNotificationCenterData(callback: any): void;
|
|
28
34
|
static getNotificationCenterCount(tabCountInfo: any, callback: any): void;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use getNotificationCenterData(callback) instead.
|
|
37
|
+
*/
|
|
29
38
|
static getNotificationDataListener(callback: any): void;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use getNotificationCenterCount(tabCountInfo, callback) instead.
|
|
41
|
+
*/
|
|
30
42
|
static getNotificationCount(callback: any): void;
|
|
31
43
|
|
|
32
44
|
/* 3 - Track Events */
|
|
@@ -53,6 +65,9 @@ export default class Notifyvisitors {
|
|
|
53
65
|
static getRegistrationToken(nvCallback: any): void;
|
|
54
66
|
|
|
55
67
|
/* 5 - Track User */
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated Use setUserIdentifier(sJsonObject, callback) instead.
|
|
70
|
+
*/
|
|
56
71
|
static userIdentifier(userID: any, sJsonObject: any): void;
|
|
57
72
|
static setUserIdentifier(sJsonObject: any, callback: any): void;
|
|
58
73
|
static getNvUID(callback: any): void;
|
package/index.js
CHANGED
|
@@ -48,6 +48,10 @@ addListeners();
|
|
|
48
48
|
|
|
49
49
|
/* Native SDK Bridge Class */
|
|
50
50
|
export default class Notifyvisitors {
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use showInAppMessage(tokens, customObjects, fragmentName, nvCallback) instead.
|
|
54
|
+
*/
|
|
51
55
|
/* 1 - Survery, InApp Banners */
|
|
52
56
|
static show(tokens, customObjects, fragmentName, nvCallback) {
|
|
53
57
|
console.log("NV- Show !!");
|
|
@@ -74,6 +78,9 @@ export default class Notifyvisitors {
|
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
80
|
|
|
81
|
+
/**
|
|
82
|
+
* @deprecated Use openNotificationCenter(mAppInboxInfo, dismissValue, callback) instead.
|
|
83
|
+
*/
|
|
77
84
|
/* 2 - Notification Center */
|
|
78
85
|
static showNotifications(mAppInboxInfo, dismissValue) {
|
|
79
86
|
console.log("NV- Show Notifications !!");
|
|
@@ -138,6 +145,9 @@ export default class Notifyvisitors {
|
|
|
138
145
|
}
|
|
139
146
|
}
|
|
140
147
|
|
|
148
|
+
/**
|
|
149
|
+
* @deprecated Use setUserIdentifier(sJsonObject, callback) instead.
|
|
150
|
+
*/
|
|
141
151
|
/* 4 - Login User */
|
|
142
152
|
static userIdentifier(userID, sJsonObject) {
|
|
143
153
|
console.log("NV- User Identifier !!");
|
|
@@ -304,7 +314,9 @@ export default class Notifyvisitors {
|
|
|
304
314
|
}
|
|
305
315
|
|
|
306
316
|
/* 16 - JSon Data For Custom Notification Center */
|
|
307
|
-
|
|
317
|
+
/**
|
|
318
|
+
* @deprecated Use getNotificationCenterData(callback) instead.
|
|
319
|
+
*/
|
|
308
320
|
static getNotificationDataListener(callback) {
|
|
309
321
|
console.log("NV- Get Notification Data Listener !!");
|
|
310
322
|
try {
|
|
@@ -389,6 +401,9 @@ export default class Notifyvisitors {
|
|
|
389
401
|
}
|
|
390
402
|
}
|
|
391
403
|
|
|
404
|
+
/**
|
|
405
|
+
* @deprecated Use getNotificationCenterCount(tabCountInfo,callback) instead.
|
|
406
|
+
*/
|
|
392
407
|
/* 22 - Depricated Function For Notification Count */
|
|
393
408
|
static getNotificationCount(callback) {
|
|
394
409
|
console.log("NV- Get Notification Count !!");
|
|
@@ -23,7 +23,7 @@ int nvCheckPushClickTimeCounter = 0;
|
|
|
23
23
|
|
|
24
24
|
@implementation RNNotifyvisitors
|
|
25
25
|
|
|
26
|
-
static NSString *const kNVPluginVersion = @"4.
|
|
26
|
+
static NSString *const kNVPluginVersion = @"4.8.0";
|
|
27
27
|
|
|
28
28
|
- (dispatch_queue_t)methodQueue{
|
|
29
29
|
return dispatch_get_main_queue();
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
138AE09F22A7ACA600F403E1 /* RNNVExtensionService.m in Sources */ = {isa = PBXBuildFile; fileRef = 138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */; };
|
|
11
11
|
13B25F2D22BA35B000C4D0B7 /* RCTNVEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */; };
|
|
12
12
|
3587FCE02EC3530C00067AB0 /* notifyvisitorsNudges.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3587FCDF2EC3530C00067AB0 /* notifyvisitorsNudges.xcframework */; };
|
|
13
|
-
|
|
13
|
+
35E588C22F6DA696006F6B11 /* notifyvisitors.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 35E588C12F6DA696006F6B11 /* notifyvisitors.xcframework */; };
|
|
14
14
|
B3E7B58A1CC2AC0600A0062D /* RNNotifyvisitors.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */; };
|
|
15
15
|
DC31F4E523BC9CC900AAB2DB /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC31F4E423BC9CC900AAB2DB /* SystemConfiguration.framework */; };
|
|
16
16
|
/* End PBXBuildFile section */
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
13B25F2B22BA35B000C4D0B7 /* RCTNVEventEmitter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTNVEventEmitter.h; sourceTree = "<group>"; };
|
|
35
35
|
13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTNVEventEmitter.m; sourceTree = "<group>"; };
|
|
36
36
|
3587FCDF2EC3530C00067AB0 /* notifyvisitorsNudges.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = notifyvisitorsNudges.xcframework; sourceTree = "<group>"; };
|
|
37
|
-
|
|
37
|
+
35E588C12F6DA696006F6B11 /* notifyvisitors.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = notifyvisitors.xcframework; sourceTree = "<group>"; };
|
|
38
38
|
B3E7B5881CC2AC0600A0062D /* RNNotifyvisitors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNotifyvisitors.h; sourceTree = "<group>"; };
|
|
39
39
|
B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNotifyvisitors.m; sourceTree = "<group>"; };
|
|
40
40
|
DC31F4E423BC9CC900AAB2DB /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/SystemConfiguration.framework; sourceTree = DEVELOPER_DIR; };
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
files = (
|
|
48
48
|
DC31F4E523BC9CC900AAB2DB /* SystemConfiguration.framework in Frameworks */,
|
|
49
49
|
3587FCE02EC3530C00067AB0 /* notifyvisitorsNudges.xcframework in Frameworks */,
|
|
50
|
-
|
|
50
|
+
35E588C22F6DA696006F6B11 /* notifyvisitors.xcframework in Frameworks */,
|
|
51
51
|
);
|
|
52
52
|
runOnlyForDeploymentPostprocessing = 0;
|
|
53
53
|
};
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
58B511D21A9E6C8500147676 = {
|
|
66
66
|
isa = PBXGroup;
|
|
67
67
|
children = (
|
|
68
|
-
|
|
68
|
+
35E588C12F6DA696006F6B11 /* notifyvisitors.xcframework */,
|
|
69
69
|
3587FCDF2EC3530C00067AB0 /* notifyvisitorsNudges.xcframework */,
|
|
70
70
|
DC4962D123BE131B005E63F5 /* RNNotifyvisitors */,
|
|
71
71
|
134814211AA4EA7D00B7C361 /* Products */,
|
|
@@ -6,40 +6,40 @@
|
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
8
|
<key>BinaryPath</key>
|
|
9
|
-
<string>notifyvisitors.framework/
|
|
9
|
+
<string>notifyvisitors.framework/notifyvisitors</string>
|
|
10
10
|
<key>LibraryIdentifier</key>
|
|
11
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64</string>
|
|
12
12
|
<key>LibraryPath</key>
|
|
13
13
|
<string>notifyvisitors.framework</string>
|
|
14
14
|
<key>SupportedArchitectures</key>
|
|
15
15
|
<array>
|
|
16
16
|
<string>arm64</string>
|
|
17
|
-
<string>x86_64</string>
|
|
18
17
|
</array>
|
|
19
18
|
<key>SupportedPlatform</key>
|
|
20
19
|
<string>ios</string>
|
|
21
|
-
<key>SupportedPlatformVariant</key>
|
|
22
|
-
<string>maccatalyst</string>
|
|
23
20
|
</dict>
|
|
24
21
|
<dict>
|
|
25
22
|
<key>BinaryPath</key>
|
|
26
23
|
<string>notifyvisitors.framework/notifyvisitors</string>
|
|
27
24
|
<key>LibraryIdentifier</key>
|
|
28
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
29
26
|
<key>LibraryPath</key>
|
|
30
27
|
<string>notifyvisitors.framework</string>
|
|
31
28
|
<key>SupportedArchitectures</key>
|
|
32
29
|
<array>
|
|
33
30
|
<string>arm64</string>
|
|
31
|
+
<string>x86_64</string>
|
|
34
32
|
</array>
|
|
35
33
|
<key>SupportedPlatform</key>
|
|
36
34
|
<string>ios</string>
|
|
35
|
+
<key>SupportedPlatformVariant</key>
|
|
36
|
+
<string>simulator</string>
|
|
37
37
|
</dict>
|
|
38
38
|
<dict>
|
|
39
39
|
<key>BinaryPath</key>
|
|
40
|
-
<string>notifyvisitors.framework/notifyvisitors</string>
|
|
40
|
+
<string>notifyvisitors.framework/Versions/A/notifyvisitors</string>
|
|
41
41
|
<key>LibraryIdentifier</key>
|
|
42
|
-
<string>ios-arm64_x86_64-
|
|
42
|
+
<string>ios-arm64_x86_64-maccatalyst</string>
|
|
43
43
|
<key>LibraryPath</key>
|
|
44
44
|
<string>notifyvisitors.framework</string>
|
|
45
45
|
<key>SupportedArchitectures</key>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<key>SupportedPlatform</key>
|
|
51
51
|
<string>ios</string>
|
|
52
52
|
<key>SupportedPlatformVariant</key>
|
|
53
|
-
<string>
|
|
53
|
+
<string>maccatalyst</string>
|
|
54
54
|
</dict>
|
|
55
55
|
</array>
|
|
56
56
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Assets.car</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
NuDSr4FomVX27OVl1lxOEfmjsdo=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/notifyvisitors.h</key>
|
|
12
12
|
<data>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
nVezoXAWEOxsBnqexKtBhOtLvrc=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/module.modulemap</key>
|
|
20
20
|
<data>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<dict>
|
|
32
32
|
<key>hash2</key>
|
|
33
33
|
<data>
|
|
34
|
-
|
|
34
|
+
I0hh75wp26VfhghbCPsgfd6F7qRmWj/7LoiXc3C+p1s=
|
|
35
35
|
</data>
|
|
36
36
|
</dict>
|
|
37
37
|
<key>Headers/notifyvisitors.h</key>
|
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<plist version="1.0">
|
|
4
4
|
<dict>
|
|
5
5
|
<key>BuildMachineOSBuild</key>
|
|
6
|
-
<string>
|
|
6
|
+
<string>25B78</string>
|
|
7
7
|
<key>CFBundleDevelopmentRegion</key>
|
|
8
8
|
<string>en</string>
|
|
9
9
|
<key>CFBundleExecutable</key>
|
|
@@ -17,29 +17,29 @@
|
|
|
17
17
|
<key>CFBundlePackageType</key>
|
|
18
18
|
<string>FMWK</string>
|
|
19
19
|
<key>CFBundleShortVersionString</key>
|
|
20
|
-
<string>7.3.
|
|
20
|
+
<string>7.3.4</string>
|
|
21
21
|
<key>CFBundleSupportedPlatforms</key>
|
|
22
22
|
<array>
|
|
23
23
|
<string>MacOSX</string>
|
|
24
24
|
</array>
|
|
25
25
|
<key>CFBundleVersion</key>
|
|
26
|
-
<string>7.3.
|
|
26
|
+
<string>7.3.4</string>
|
|
27
27
|
<key>DTCompiler</key>
|
|
28
28
|
<string>com.apple.compilers.llvm.clang.1_0</string>
|
|
29
29
|
<key>DTPlatformBuild</key>
|
|
30
|
-
<string>
|
|
30
|
+
<string>25C58</string>
|
|
31
31
|
<key>DTPlatformName</key>
|
|
32
32
|
<string>macosx</string>
|
|
33
33
|
<key>DTPlatformVersion</key>
|
|
34
|
-
<string>
|
|
34
|
+
<string>26.2</string>
|
|
35
35
|
<key>DTSDKBuild</key>
|
|
36
|
-
<string>
|
|
36
|
+
<string>25C58</string>
|
|
37
37
|
<key>DTSDKName</key>
|
|
38
|
-
<string>
|
|
38
|
+
<string>macosx26.2</string>
|
|
39
39
|
<key>DTXcode</key>
|
|
40
|
-
<string>
|
|
40
|
+
<string>2630</string>
|
|
41
41
|
<key>DTXcodeBuild</key>
|
|
42
|
-
<string>
|
|
42
|
+
<string>17C529</string>
|
|
43
43
|
<key>LSMinimumSystemVersion</key>
|
|
44
44
|
<string>10.15</string>
|
|
45
45
|
<key>UIDeviceFamily</key>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Resources/Assets.car</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
fD/VlZOHAu522nyhp3kbE/qL7AM=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Resources/Info.plist</key>
|
|
12
12
|
<data>
|
|
13
|
-
|
|
13
|
+
U8j+thihhr3RX4IUARtBvs5nu+Y=
|
|
14
14
|
</data>
|
|
15
15
|
<key>Resources/PrivacyInfo.xcprivacy</key>
|
|
16
16
|
<data>
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
<dict>
|
|
38
38
|
<key>hash2</key>
|
|
39
39
|
<data>
|
|
40
|
-
/
|
|
40
|
+
8yQ1WmFEBemWeaBrJNZ3E+UX6aaFXw9/shN6aBWTbvo=
|
|
41
41
|
</data>
|
|
42
42
|
</dict>
|
|
43
43
|
<key>Resources/Info.plist</key>
|
|
44
44
|
<dict>
|
|
45
45
|
<key>hash2</key>
|
|
46
46
|
<data>
|
|
47
|
-
|
|
47
|
+
QWrg3ANnoveHwOfx8XwwnbJzF16mh3YwbZ4xISUer/M=
|
|
48
48
|
</data>
|
|
49
49
|
</dict>
|
|
50
50
|
<key>Resources/PrivacyInfo.xcprivacy</key>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<dict>
|
|
7
7
|
<key>Assets.car</key>
|
|
8
8
|
<data>
|
|
9
|
-
|
|
9
|
+
NuDSr4FomVX27OVl1lxOEfmjsdo=
|
|
10
10
|
</data>
|
|
11
11
|
<key>Headers/notifyvisitors.h</key>
|
|
12
12
|
<data>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</data>
|
|
15
15
|
<key>Info.plist</key>
|
|
16
16
|
<data>
|
|
17
|
-
|
|
17
|
+
C0oj6/SMLX4Hxjg3DiIf+77vRI8=
|
|
18
18
|
</data>
|
|
19
19
|
<key>Modules/module.modulemap</key>
|
|
20
20
|
<data>
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<dict>
|
|
32
32
|
<key>hash2</key>
|
|
33
33
|
<data>
|
|
34
|
-
|
|
34
|
+
I0hh75wp26VfhghbCPsgfd6F7qRmWj/7LoiXc3C+p1s=
|
|
35
35
|
</data>
|
|
36
36
|
</dict>
|
|
37
37
|
<key>Headers/notifyvisitors.h</key>
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -23,7 +23,7 @@ Pod::Spec.new do |s|
|
|
|
23
23
|
# pod 'React', :path => '../node_modules/react-native/'
|
|
24
24
|
|
|
25
25
|
# The Native Notifyvisitors-iOS-SDK from cocoapods.
|
|
26
|
-
s.dependency 'notifyvisitors', '7.3.
|
|
26
|
+
s.dependency 'notifyvisitors', '7.3.4'
|
|
27
27
|
s.dependency 'notifyvisitorsNudges', '0.0.3'
|
|
28
28
|
|
|
29
29
|
end
|