react-native-notifyvisitors 4.1.9 → 4.2.1
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/build.gradle +23 -5
- package/android/src/main/AndroidManifest.xml +8 -1
- package/android/src/main/java/com/rn_notifyvisitors/RNNotifyvisitorsModule.java +99 -15
- package/index.d.ts +77 -25
- package/index.js +194 -154
- package/ios/Assets/empty.png +0 -0
- package/ios/Assets/nv_NotificationCenterBg.png +0 -0
- package/ios/Assets/nv_NotificationCenterBg@2x.png +0 -0
- package/ios/Assets/nv_NotificationCenterBg@3x.png +0 -0
- package/ios/Assets/nv_deleteIcon.png +0 -0
- package/ios/Assets/nv_deleteIcon@2x.png +0 -0
- package/ios/Assets/slider_bar.png +0 -0
- package/ios/Assets/slider_barHead.png +0 -0
- package/ios/RNNotifyvisitors/RNNotifyvisitors.m +2 -2
- package/ios/RNNotifyvisitors.xcodeproj/project.pbxproj +28 -28
- package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcuserdata/neeraj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/libnotifyvisitors_6_4_4.a +0 -0
- package/ios/notifyvisitors.h +9 -18
- package/package.json +24 -24
- package/react-native-notifyvisitors.podspec +1 -1
- package/ios/libnotifyvisitors_6_4_0.a +0 -0
package/android/build.gradle
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
apply plugin: 'com.android.library'
|
|
2
2
|
|
|
3
|
+
def safeExtGet(prop, fallback) {
|
|
4
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
buildscript {
|
|
4
8
|
repositories {
|
|
5
9
|
google()
|
|
@@ -8,22 +12,36 @@ buildscript {
|
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
android {
|
|
11
|
-
compileSdk
|
|
15
|
+
compileSdk safeExtGet('compileSdk', 33)
|
|
16
|
+
|
|
12
17
|
defaultConfig {
|
|
13
|
-
minSdkVersion 19
|
|
14
|
-
targetSdkVersion
|
|
18
|
+
minSdkVersion safeExtGet('minSdkVersion', 19)
|
|
19
|
+
targetSdkVersion safeExtGet('targetSdkVersion', 33)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
buildTypes {
|
|
23
|
+
release {
|
|
24
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
compileOptions {
|
|
29
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
30
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
15
31
|
}
|
|
16
32
|
}
|
|
17
33
|
|
|
18
34
|
dependencies {
|
|
19
35
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
20
36
|
implementation 'com.facebook.react:react-native:+'
|
|
21
|
-
implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:
|
|
37
|
+
implementation 'com.notifyvisitors.notifyvisitors:notifyvisitors:v5.4.0'
|
|
22
38
|
|
|
23
39
|
implementation platform('com.google.firebase:firebase-bom:30.3.1')
|
|
24
40
|
implementation ('com.google.firebase:firebase-messaging')
|
|
25
41
|
implementation ('com.google.android.gms:play-services-location')
|
|
26
|
-
implementation 'com.google.firebase:firebase-core
|
|
42
|
+
implementation ('com.google.firebase:firebase-core')
|
|
43
|
+
|
|
44
|
+
//implementation 'com.google.firebase:firebase-core:17.2.2'
|
|
27
45
|
}
|
|
28
46
|
|
|
29
47
|
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
<uses-permission android:name="android.permission.INTERNET" />
|
|
5
5
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
|
6
|
+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
|
7
|
+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
8
|
+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
|
9
|
+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
|
10
|
+
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
|
|
11
|
+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
|
12
|
+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
6
13
|
|
|
7
14
|
<application>
|
|
8
15
|
<service
|
|
@@ -13,4 +20,4 @@
|
|
|
13
20
|
</intent-filter>
|
|
14
21
|
</service>
|
|
15
22
|
</application>
|
|
16
|
-
</manifest>
|
|
23
|
+
</manifest>
|
|
@@ -4,31 +4,44 @@ import android.app.Activity;
|
|
|
4
4
|
import android.app.Application;
|
|
5
5
|
import android.content.Context;
|
|
6
6
|
import android.content.Intent;
|
|
7
|
+
import android.graphics.Color;
|
|
8
|
+
import android.net.Uri;
|
|
9
|
+
import android.os.Bundle;
|
|
7
10
|
import android.util.Log;
|
|
11
|
+
|
|
12
|
+
import com.facebook.react.bridge.ActivityEventListener;
|
|
8
13
|
import com.facebook.react.bridge.Callback;
|
|
9
14
|
import com.facebook.react.bridge.ReactApplicationContext;
|
|
15
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
10
16
|
import com.facebook.react.bridge.ReactMethod;
|
|
11
17
|
import com.facebook.react.bridge.ReadableArray;
|
|
12
18
|
import com.facebook.react.bridge.ReadableMap;
|
|
19
|
+
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
13
20
|
import com.notifyvisitors.notifyvisitors.NotifyVisitorsApi;
|
|
14
21
|
import com.notifyvisitors.notifyvisitors.NotifyVisitorsApplication;
|
|
15
22
|
import com.notifyvisitors.notifyvisitors.center.NVCenterStyleConfig;
|
|
23
|
+
import com.notifyvisitors.notifyvisitors.interfaces.NotificationCountInterface;
|
|
24
|
+
import com.notifyvisitors.notifyvisitors.interfaces.NotificationListDetailsCallback;
|
|
25
|
+
import com.notifyvisitors.notifyvisitors.interfaces.OnCenterCountListener;
|
|
16
26
|
import com.notifyvisitors.notifyvisitors.interfaces.OnEventTrackListener;
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
27
|
+
import com.notifyvisitors.notifyvisitors.interfaces.OnNotifyBotClickListener;
|
|
28
|
+
import com.notifyvisitors.notifyvisitors.interfaces.OnPushRuntimePermission;
|
|
29
|
+
import com.notifyvisitors.notifyvisitors.permission.NVPopupDesign;
|
|
30
|
+
import com.notifyvisitors.notifyvisitors.push.NVNotificationChannels;
|
|
31
|
+
|
|
20
32
|
import org.json.JSONArray;
|
|
21
33
|
import org.json.JSONObject;
|
|
22
34
|
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
import java.util.HashMap;
|
|
36
|
+
import java.util.HashSet;
|
|
37
|
+
import java.util.Set;
|
|
25
38
|
|
|
26
39
|
|
|
27
40
|
public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implements ActivityEventListener {
|
|
28
41
|
|
|
29
42
|
private final ReactApplicationContext reactContext;
|
|
30
43
|
private static final String TAG = "RN-NotifyVisitors";
|
|
31
|
-
private static final String PLUGIN_VERSION = "4.1
|
|
44
|
+
private static final String PLUGIN_VERSION = "4.2.1";
|
|
32
45
|
|
|
33
46
|
private String PUSH_BANNER_CLICK_EVENT = "nv_push_banner_click";
|
|
34
47
|
private String CHAT_BOT_BUTTON_CLICK = "nv_chat_bot_button_click";
|
|
@@ -291,13 +304,12 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
291
304
|
config.setUnSelectedTabColor(unSelectedTabColor);
|
|
292
305
|
config.setSelectedTabIndicatorColor(selectedTabIndicatorColor);
|
|
293
306
|
|
|
294
|
-
Log.e(TAG, config.toString());
|
|
295
307
|
mActivity = reactContext.getCurrentActivity();
|
|
296
308
|
if (mActivity != null) {
|
|
297
309
|
mActivity.runOnUiThread(new Runnable() {
|
|
298
310
|
@Override
|
|
299
311
|
public void run() {
|
|
300
|
-
NotifyVisitorsApi.getInstance(
|
|
312
|
+
NotifyVisitorsApi.getInstance(mActivity).showNotifications(dismissValue, config);
|
|
301
313
|
}
|
|
302
314
|
});
|
|
303
315
|
} else {
|
|
@@ -307,7 +319,17 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
307
319
|
|
|
308
320
|
} else {
|
|
309
321
|
Log.i(TAG, "TAB INFO IS NULL !! GOING FOR SIMPLE APP INBOX ");
|
|
310
|
-
|
|
322
|
+
mActivity = reactContext.getCurrentActivity();
|
|
323
|
+
if (mActivity != null) {
|
|
324
|
+
mActivity.runOnUiThread(new Runnable() {
|
|
325
|
+
@Override
|
|
326
|
+
public void run() {
|
|
327
|
+
NotifyVisitorsApi.getInstance(reactContext).showNotifications(dismissValue, null);
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
} else {
|
|
331
|
+
Log.e(TAG, "Getting Null Activity !!");
|
|
332
|
+
}
|
|
311
333
|
}
|
|
312
334
|
} catch (Exception e) {
|
|
313
335
|
Log.i(TAG, "SHOW NOTIFICATIONS ERROR : " + e);
|
|
@@ -679,12 +701,12 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
679
701
|
mActivity.runOnUiThread(new Runnable() {
|
|
680
702
|
@Override
|
|
681
703
|
public void run() {
|
|
682
|
-
NotifyVisitorsApi.getInstance(mActivity).enableGoogleInAppReview(new OnReviewCompleteListener() {
|
|
683
|
-
@Override
|
|
684
|
-
public void onComplete(String reviewStatus) {
|
|
685
|
-
callback.invoke(reviewStatus);
|
|
686
|
-
}
|
|
687
|
-
});
|
|
704
|
+
// NotifyVisitorsApi.getInstance(mActivity).enableGoogleInAppReview(new OnReviewCompleteListener() {
|
|
705
|
+
// @Override
|
|
706
|
+
// public void onComplete(String reviewStatus) {
|
|
707
|
+
// callback.invoke(reviewStatus);
|
|
708
|
+
// }
|
|
709
|
+
// });
|
|
688
710
|
}
|
|
689
711
|
});
|
|
690
712
|
} else {
|
|
@@ -859,6 +881,68 @@ public class RNNotifyvisitorsModule extends ReactContextBaseJavaModule implement
|
|
|
859
881
|
}
|
|
860
882
|
}
|
|
861
883
|
|
|
884
|
+
@ReactMethod
|
|
885
|
+
public void pushPermissionPrompt(ReadableMap campaignInfo, final Callback callback) {
|
|
886
|
+
try {
|
|
887
|
+
Log.i(TAG, "PUSH PERMISSION PROMPT !!");
|
|
888
|
+
String title = campaignInfo.getString("title");
|
|
889
|
+
String titleTextColor = campaignInfo.getString("titleTextColor");
|
|
890
|
+
String description = campaignInfo.getString("description");
|
|
891
|
+
String descriptionTextColor = campaignInfo.getString("descriptionTextColor");
|
|
892
|
+
String backgroundColor = campaignInfo.getString("backgroundColor");
|
|
893
|
+
String buttonOneBorderColor = campaignInfo.getString("buttonOneBorderColor");
|
|
894
|
+
String buttonOneBackgroundColor = campaignInfo.getString("buttonOneBackgroundColor");
|
|
895
|
+
String buttonOneBorderRadius = campaignInfo.getString("buttonOneBorderRadius");
|
|
896
|
+
String buttonOneText = campaignInfo.getString("buttonOneText");
|
|
897
|
+
String buttonOneTextColor = campaignInfo.getString("buttonOneTextColor");
|
|
898
|
+
String buttonTwoText = campaignInfo.getString("buttonTwoText");
|
|
899
|
+
String buttonTwoTextColor = campaignInfo.getString("buttonTwoTextColor");
|
|
900
|
+
String buttonTwoBackgroundColor = campaignInfo.getString("buttonTwoBackgroundColor");
|
|
901
|
+
String buttonTwoBorderColor = campaignInfo.getString("buttonTwoBorderColor");
|
|
902
|
+
String buttonTwoBorderRadius = campaignInfo.getString("buttonTwoBorderRadius");
|
|
903
|
+
String numberOfSessions = campaignInfo.getString("numberOfSessions");
|
|
904
|
+
String resumeInDays = campaignInfo.getString("resumeInDays");
|
|
905
|
+
|
|
906
|
+
NVPopupDesign design = new NVPopupDesign();
|
|
907
|
+
design.setTitle(title);
|
|
908
|
+
design.setTitleTextColor(titleTextColor);
|
|
909
|
+
design.setDescription(description);
|
|
910
|
+
design.setDescriptionTextColor(descriptionTextColor);
|
|
911
|
+
design.setBackgroundColor(backgroundColor);
|
|
912
|
+
design.setButtonOneBorderColor(buttonOneBorderColor);
|
|
913
|
+
design.setButtonOneBackgroundColor(buttonOneBackgroundColor);
|
|
914
|
+
design.setButtonOneBorderRadius(Integer.parseInt(buttonOneBorderRadius));
|
|
915
|
+
design.setButtonOneText(buttonOneText);
|
|
916
|
+
design.setButtonOneTextColor(buttonOneTextColor);
|
|
917
|
+
design.setButtonTwoText(buttonTwoText);
|
|
918
|
+
design.setButtonTwoTextColor(buttonTwoTextColor);
|
|
919
|
+
design.setButtonTwoBackgroundColor(buttonTwoBackgroundColor);
|
|
920
|
+
design.setButtonTwoBorderColor(buttonTwoBorderColor);
|
|
921
|
+
design.setButtonTwoBorderRadius(Integer.parseInt(buttonTwoBorderRadius));
|
|
922
|
+
design.setNumberOfSessions(Integer.parseInt(numberOfSessions));
|
|
923
|
+
design.setResumeInDays(Integer.parseInt(resumeInDays));
|
|
924
|
+
mActivity = reactContext.getCurrentActivity();
|
|
925
|
+
if (mActivity != null) {
|
|
926
|
+
mActivity.runOnUiThread(new Runnable() {
|
|
927
|
+
@Override
|
|
928
|
+
public void run() {
|
|
929
|
+
NotifyVisitorsApi.getInstance(mActivity).activatePushPermissionPopup(design, new OnPushRuntimePermission() {
|
|
930
|
+
@Override
|
|
931
|
+
public void getPopupInfo(JSONObject result) {
|
|
932
|
+
Log.i(TAG, "Popup Response => " + result);
|
|
933
|
+
callback.invoke(result.toString());
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
}
|
|
937
|
+
});
|
|
938
|
+
} else {
|
|
939
|
+
Log.e(TAG, "Getting Null Activity !!");
|
|
940
|
+
}
|
|
941
|
+
} catch (Exception e) {
|
|
942
|
+
Log.i(TAG, "PUSH PERMISSION PROMPT ERROR : " + e);
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
862
946
|
|
|
863
947
|
/* On Activity Result */
|
|
864
948
|
@Override
|
package/index.d.ts
CHANGED
|
@@ -1,26 +1,78 @@
|
|
|
1
1
|
export default class Notifyvisitors {
|
|
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
|
-
|
|
2
|
+
static show(
|
|
3
|
+
tokens: any,
|
|
4
|
+
customObjects: any,
|
|
5
|
+
fragmentName: any,
|
|
6
|
+
nvCallback: any
|
|
7
|
+
): void;
|
|
8
|
+
static showNotifications(mAppInboxInfo: any, dismissValue: any): void;
|
|
9
|
+
static event(
|
|
10
|
+
eventName: any,
|
|
11
|
+
attributes: any,
|
|
12
|
+
ltv: any,
|
|
13
|
+
scope: any,
|
|
14
|
+
nvCallback: any
|
|
15
|
+
): void;
|
|
16
|
+
static userIdentifier(userID: any, sJsonObject: any): void;
|
|
17
|
+
static startChatBot(screenName: any, nvCallback: any): void;
|
|
18
|
+
static createNotificationChannel(
|
|
19
|
+
chId: any,
|
|
20
|
+
chName: any,
|
|
21
|
+
chDescription: any,
|
|
22
|
+
chImportance: any,
|
|
23
|
+
enableLights: any,
|
|
24
|
+
shouldVibrate: any,
|
|
25
|
+
lightColor: any,
|
|
26
|
+
soundFileName: any
|
|
27
|
+
): void;
|
|
28
|
+
static deleteNotificationChannel(channelId: any): void;
|
|
29
|
+
static createNotificationChannelGroup(groupId: any, groupName: any): void;
|
|
30
|
+
static deleteNotificationChannelGroup(groupId: any): void;
|
|
31
|
+
static getNotificationCenterCount(tabCountInfo: any, callback: any): void;
|
|
32
|
+
static getRegistrationToken(nvCallback: any): void;
|
|
33
|
+
static requestInAppReview(nvCallback: any): void;
|
|
34
|
+
static subscribePushCategory(categoryInfo: any, unSubscribe2All: any): void;
|
|
35
|
+
static getLinkInfo(nvCallback: any): void;
|
|
36
|
+
static getNvUID(callback: any): void;
|
|
37
|
+
static getNotificationDataListener(callback: any): void;
|
|
38
|
+
static setAutoStartPermission_android_only(): void;
|
|
39
|
+
static stopNotifications(): void;
|
|
40
|
+
static stopGeofencePushforDateTime(dateTime: any, additionalHours: any): void;
|
|
41
|
+
static scheduleNotification(
|
|
42
|
+
nid: any,
|
|
43
|
+
tag: any,
|
|
44
|
+
time: any,
|
|
45
|
+
title: any,
|
|
46
|
+
message: any,
|
|
47
|
+
url: any,
|
|
48
|
+
icon: any
|
|
49
|
+
): void;
|
|
50
|
+
static getEventSurveyInfo(nvCallback: any): void;
|
|
51
|
+
static getNotificationCount(callback: any): void;
|
|
52
|
+
static scrollViewDidScroll_iOS_only(): void;
|
|
53
|
+
static promptForPushNotificationsWithUserResponse(callback: any): void;
|
|
54
|
+
static pushPermissionPrompt(
|
|
55
|
+
pushPromptInfo: PushPromptInfo,
|
|
56
|
+
callback: any
|
|
57
|
+
): void;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export class PushPromptInfo {
|
|
61
|
+
title: String;
|
|
62
|
+
titleTextColor: String;
|
|
63
|
+
description: String;
|
|
64
|
+
descriptionTextColor: String;
|
|
65
|
+
backgroundColor: String;
|
|
66
|
+
buttonOneBorderColor: String;
|
|
67
|
+
buttonOneBackgroundColor: String;
|
|
68
|
+
buttonOneBorderRadius: String;
|
|
69
|
+
buttonOneText: String;
|
|
70
|
+
buttonOneTextColor: String;
|
|
71
|
+
buttonTwoText: String;
|
|
72
|
+
buttonTwoTextColor: String;
|
|
73
|
+
buttonTwoBackgroundColor: String;
|
|
74
|
+
buttonTwoBorderColor: String;
|
|
75
|
+
buttonTwoBorderRadius: String;
|
|
76
|
+
numberOfSessions: String;
|
|
77
|
+
resumeInDays: String;
|
|
78
|
+
}
|
package/index.js
CHANGED
|
@@ -6,334 +6,374 @@ const { RNNotifyvisitors } = NativeModules;
|
|
|
6
6
|
const nvEventEmitter = new NativeEventEmitter(RNNotifyvisitors);
|
|
7
7
|
|
|
8
8
|
const NV_CALLBACKS = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
GET_LINK_INFO: "nv_push_banner_click",
|
|
10
|
+
NV_CHAT_BOT_EVENT: "nv_chat_bot_button_click",
|
|
11
|
+
NV_SHOW: "nv_show_callback",
|
|
12
|
+
NV_EVENT: "nv_event_callback",
|
|
13
|
+
NV_EVENT_SURVEY: "nv_common_show_event_callback"
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const CALLBACKS_STACK = {};
|
|
17
17
|
|
|
18
18
|
const addListeners = function () {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
if (!(RNNotifyvisitors != null)) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
Object.keys(NV_CALLBACKS).forEach(val => {
|
|
23
|
+
nvEventEmitter.addListener(NV_CALLBACKS[val], (data) => {
|
|
24
|
+
try {
|
|
25
|
+
if (data != null && typeof CALLBACKS_STACK[NV_CALLBACKS[val]] == "function") {
|
|
26
|
+
if (Platform.OS == "ios") {
|
|
27
|
+
CALLBACKS_STACK[NV_CALLBACKS[val]](data.data);
|
|
28
|
+
} else {
|
|
29
|
+
CALLBACKS_STACK[NV_CALLBACKS[val]](data);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.log(e);
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
addListeners();
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
/* Native SDK Bridge Class */
|
|
43
|
-
export default class Notifyvisitors{
|
|
43
|
+
export default class Notifyvisitors {
|
|
44
44
|
|
|
45
45
|
/* 1 - Survery, InApp Banners */
|
|
46
|
-
static show(tokens, customObjects, fragmentName, nvCallback){
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
static show(tokens, customObjects, fragmentName, nvCallback) {
|
|
47
|
+
console.log("NV- Show !!");
|
|
48
|
+
try {
|
|
49
|
+
CALLBACKS_STACK[NV_CALLBACKS.NV_SHOW] = nvCallback;
|
|
50
|
+
RNNotifyvisitors.show(tokens, customObjects, fragmentName, nvCallback);
|
|
51
|
+
} catch (e) {
|
|
52
|
+
console.log(e);
|
|
53
|
+
}
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/* 2 - Notification Center */
|
|
57
57
|
static showNotifications(mAppInboxInfo, dismissValue) {
|
|
58
|
-
|
|
58
|
+
console.log("NV- Show Notifications !!");
|
|
59
59
|
try {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
if (Platform.OS == "ios") {
|
|
61
|
+
dismissValue = dismissValue + "";
|
|
62
|
+
} else {
|
|
63
|
+
dismissValue = parseInt(dismissValue);
|
|
64
|
+
}
|
|
65
|
+
RNNotifyvisitors.showNotifications(mAppInboxInfo, dismissValue);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
console.log(e);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
|
|
73
73
|
/* 3 - Event Tracking */
|
|
74
|
-
static event(eventName, attributes, ltv, scope, nvCallback){
|
|
74
|
+
static event(eventName, attributes, ltv, scope, nvCallback) {
|
|
75
75
|
console.log("NV- Events !!");
|
|
76
|
-
try{
|
|
76
|
+
try {
|
|
77
77
|
CALLBACKS_STACK[NV_CALLBACKS.NV_EVENT] = nvCallback;
|
|
78
78
|
RNNotifyvisitors.event(eventName, attributes, ltv, scope, nvCallback);
|
|
79
|
-
}catch(e){
|
|
79
|
+
} catch (e) {
|
|
80
80
|
console.log(e);
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/* 4 - Login User */
|
|
86
|
-
static userIdentifier(userID, sJsonObject){
|
|
86
|
+
static userIdentifier(userID, sJsonObject) {
|
|
87
87
|
console.log("NV- User Identifier !!");
|
|
88
|
-
try{
|
|
88
|
+
try {
|
|
89
89
|
RNNotifyvisitors.userIdentifier(userID, sJsonObject);
|
|
90
|
-
}catch(e){
|
|
90
|
+
} catch (e) {
|
|
91
91
|
console.log(e);
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
/* 5 - chatbot */
|
|
98
|
-
static startChatBot(screenName, nvCallback){
|
|
98
|
+
static startChatBot(screenName, nvCallback) {
|
|
99
99
|
console.log("NV- Chatbot !!");
|
|
100
|
-
try{
|
|
100
|
+
try {
|
|
101
101
|
CALLBACKS_STACK[NV_CALLBACKS.NV_CHAT_BOT_EVENT] = nvCallback;
|
|
102
102
|
RNNotifyvisitors.startChatBot(screenName);
|
|
103
|
-
}catch(e){
|
|
103
|
+
} catch (e) {
|
|
104
104
|
console.log(e)
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* 6 - Push Notification Channel */
|
|
109
|
-
static createNotificationChannel(chId, chName, chDescription, chImportance,
|
|
110
|
-
|
|
109
|
+
static createNotificationChannel(chId, chName, chDescription, chImportance,
|
|
110
|
+
enableLights, shouldVibrate, lightColor, soundFileName) {
|
|
111
111
|
console.log("NV- Create Notification Channnel !!");
|
|
112
|
-
try{
|
|
112
|
+
try {
|
|
113
113
|
if (Platform.OS === 'ios') {
|
|
114
114
|
console.log("This function is not supported on IOS");
|
|
115
115
|
} else {
|
|
116
|
-
RNNotifyvisitors.createNotificationChannel(chId, chName,
|
|
116
|
+
RNNotifyvisitors.createNotificationChannel(chId, chName,
|
|
117
117
|
chDescription, chImportance, enableLights, shouldVibrate, lightColor, soundFileName);
|
|
118
118
|
}
|
|
119
|
-
}catch(e){
|
|
119
|
+
} catch (e) {
|
|
120
120
|
console.log(e);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
/* 7 - Push Notification Channel */
|
|
125
|
-
static deleteNotificationChannel(channelId){
|
|
125
|
+
static deleteNotificationChannel(channelId) {
|
|
126
126
|
console.log("NV- Delate Notification Channnel !!");
|
|
127
|
-
try{
|
|
127
|
+
try {
|
|
128
128
|
if (Platform.OS === 'ios') {
|
|
129
129
|
console.log("This function is not supported on IOS");
|
|
130
130
|
} else {
|
|
131
131
|
RNNotifyvisitors.deleteNotificationChannel(channelId);
|
|
132
132
|
}
|
|
133
|
-
}catch(e){
|
|
133
|
+
} catch (e) {
|
|
134
134
|
console.log(e);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/* 8 - Push Notification Channel Group */
|
|
139
|
-
static createNotificationChannelGroup(groupId, groupName){
|
|
139
|
+
static createNotificationChannelGroup(groupId, groupName) {
|
|
140
140
|
console.log("NV- Create Notification Channnel Group !!");
|
|
141
|
-
try{
|
|
141
|
+
try {
|
|
142
142
|
if (Platform.OS === 'ios') {
|
|
143
143
|
console.log("This function is not supported on IOS");
|
|
144
144
|
} else {
|
|
145
145
|
RNNotifyvisitors.createNotificationChannelGroup(groupId, groupName);
|
|
146
146
|
}
|
|
147
|
-
}catch(e){
|
|
147
|
+
} catch (e) {
|
|
148
148
|
console.log(e);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
static deleteNotificationChannelGroup(groupId){
|
|
152
|
+
/* 9 - Push Notification Channel Group */
|
|
153
|
+
static deleteNotificationChannelGroup(groupId) {
|
|
154
154
|
console.log("NV- Delete Notification Channnel Group !!");
|
|
155
|
-
try{
|
|
155
|
+
try {
|
|
156
156
|
if (Platform.OS === 'ios') {
|
|
157
157
|
console.log("This function is not supported on IOS");
|
|
158
158
|
} else {
|
|
159
159
|
RNNotifyvisitors.deleteNotificationChannelGroup(groupId);
|
|
160
160
|
}
|
|
161
|
-
}catch(e){
|
|
161
|
+
} catch (e) {
|
|
162
162
|
console.log(e);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
/* 10 - Unread Push Notification Count */
|
|
167
167
|
static getNotificationCenterCount(tabCountInfo, callback) {
|
|
168
|
-
|
|
168
|
+
console.log("NV- Notification push Count !!");
|
|
169
169
|
try {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
RNNotifyvisitors.getNotificationCenterCount(tabCountInfo, callback);
|
|
171
|
+
} catch (e) {
|
|
172
|
+
console.log(e);
|
|
173
|
+
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
}
|
|
176
176
|
|
|
177
|
-
|
|
177
|
+
/* 11 - Get FCM/APNS Device Token */
|
|
178
178
|
static getRegistrationToken(nvCallback) {
|
|
179
|
-
|
|
179
|
+
console.log("NV- FCM/APNS Device Token !!");
|
|
180
180
|
try {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
181
|
+
RNNotifyvisitors.getRegistrationToken(nvCallback);
|
|
182
|
+
} catch (e) {
|
|
183
|
+
console.log(e)
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
/* 12 - Play Store / App Store Rating */
|
|
188
188
|
static requestInAppReview(nvCallback) {
|
|
189
189
|
console.log("NV- In App Review !!");
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
190
|
+
try {
|
|
191
|
+
RNNotifyvisitors.requestInAppReview(nvCallback);
|
|
192
|
+
} catch (e) {
|
|
193
|
+
console.log(e)
|
|
194
|
+
}
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
}
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
/* 13 - Category based Notification */
|
|
199
199
|
static subscribePushCategory(categoryInfo, unSubscribe2All) {
|
|
200
|
-
|
|
200
|
+
console.log("NV- Subscibe Push Category !!");
|
|
201
201
|
try {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
RNNotifyvisitors.subscribePushCategory(categoryInfo, unSubscribe2All);
|
|
203
|
+
} catch (e) {
|
|
204
|
+
console.log(e)
|
|
205
|
+
}
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
/* 14 - Push /InApp / Notification Center Click Callback Data */
|
|
209
|
-
static getLinkInfo(nvCallback){
|
|
209
|
+
static getLinkInfo(nvCallback) {
|
|
210
210
|
console.log("NV- Get Link Info !!");
|
|
211
|
-
try{
|
|
212
|
-
CALLBACKS_STACK[NV_CALLBACKS.GET_LINK_INFO]
|
|
211
|
+
try {
|
|
212
|
+
CALLBACKS_STACK[NV_CALLBACKS.GET_LINK_INFO] = nvCallback;
|
|
213
213
|
RNNotifyvisitors.getLinkInfo();
|
|
214
|
-
}catch(e){
|
|
214
|
+
} catch (e) {
|
|
215
215
|
console.log(e)
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
static getNvUID
|
|
221
|
+
/* 15 - Unique NotifyVisitors Identification */
|
|
222
|
+
static getNvUID(callback) {
|
|
223
223
|
console.log("NV- Get NV UID !!");
|
|
224
|
-
try{
|
|
224
|
+
try {
|
|
225
225
|
RNNotifyvisitors.getNvUID(callback);
|
|
226
|
-
}catch(e){
|
|
226
|
+
} catch (e) {
|
|
227
227
|
console.log(e);
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
|
|
232
|
-
static getNotificationDataListener(callback){
|
|
231
|
+
/* 16 - JSon Data For Custom Notification Center */
|
|
232
|
+
static getNotificationDataListener(callback) {
|
|
233
233
|
console.log("NV- Get Notification Data Listener !!");
|
|
234
|
-
try{
|
|
235
|
-
if(Platform == "ios"){
|
|
236
|
-
|
|
234
|
+
try {
|
|
235
|
+
if (Platform == "ios") {
|
|
236
|
+
RNNotifyvisitors.getNotificationDataListener("fetchEvent");
|
|
237
237
|
}
|
|
238
238
|
RNNotifyvisitors.getNotificationDataListener(callback);
|
|
239
|
-
}catch(e){
|
|
239
|
+
} catch (e) {
|
|
240
240
|
console.log(e);
|
|
241
241
|
}
|
|
242
|
-
|
|
243
|
-
}
|
|
242
|
+
|
|
243
|
+
}
|
|
244
244
|
|
|
245
245
|
/* 17 - Auto Start Library Android */
|
|
246
|
-
static setAutoStartPermission_android_only(){
|
|
246
|
+
static setAutoStartPermission_android_only() {
|
|
247
247
|
console.log("NV- Auto Start Permission Android !!");
|
|
248
|
-
try{
|
|
248
|
+
try {
|
|
249
249
|
if (Platform.OS === 'ios') {
|
|
250
250
|
console.log("This function is not supported on IOS");
|
|
251
251
|
} else {
|
|
252
252
|
RNNotifyvisitors.setAutoStartPermission();
|
|
253
253
|
}
|
|
254
|
-
}catch(e){
|
|
254
|
+
} catch (e) {
|
|
255
255
|
console.log(e);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
/* 18 - Stop Showing InApp Banner Survey */
|
|
260
|
-
static stopNotifications(){
|
|
260
|
+
static stopNotifications() {
|
|
261
261
|
console.log("NV- Stop Notification !!");
|
|
262
|
-
try{
|
|
262
|
+
try {
|
|
263
263
|
RNNotifyvisitors.stopNotifications();
|
|
264
|
-
}catch(e){
|
|
264
|
+
} catch (e) {
|
|
265
265
|
console.log(e);
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
/* 19 - Stop Showing Location Push for a custom time */
|
|
271
|
+
static stopGeofencePushforDateTime(dateTime, additionalHours) {
|
|
272
272
|
console.log("NV- Stop Geofence Push For Date Time !!");
|
|
273
|
-
try{
|
|
273
|
+
try {
|
|
274
274
|
RNNotifyvisitors.stopGeofencePushforDateTime(dateTime, additionalHours);
|
|
275
|
-
}catch(e){
|
|
275
|
+
} catch (e) {
|
|
276
276
|
console.log(e);
|
|
277
277
|
}
|
|
278
|
-
|
|
278
|
+
|
|
279
279
|
}
|
|
280
|
-
|
|
280
|
+
|
|
281
281
|
/* 20 - Triger Push Notification on Panel */
|
|
282
|
-
static scheduleNotification(nid, tag, time, title, message, url, icon){
|
|
282
|
+
static scheduleNotification(nid, tag, time, title, message, url, icon) {
|
|
283
283
|
console.log("NV- Schedule Notification !!");
|
|
284
|
-
try{
|
|
284
|
+
try {
|
|
285
285
|
RNNotifyvisitors.scheduleNotification(nid, tag, time, title, message, url, icon);
|
|
286
|
-
}catch(e){
|
|
286
|
+
} catch (e) {
|
|
287
287
|
console.log(e);
|
|
288
288
|
}
|
|
289
|
-
|
|
289
|
+
|
|
290
290
|
}
|
|
291
291
|
|
|
292
292
|
/* 21 - Separate Callbacks For Events and Surveys */
|
|
293
|
-
static getEventSurveyInfo(nvCallback){
|
|
293
|
+
static getEventSurveyInfo(nvCallback) {
|
|
294
294
|
console.log("NV- Get Event Survey Info !!");
|
|
295
|
-
try{
|
|
295
|
+
try {
|
|
296
296
|
CALLBACKS_STACK[NV_CALLBACKS.NV_EVENT_SURVEY] = nvCallback;
|
|
297
297
|
RNNotifyvisitors.getEventSurveyInfo(nvCallback);
|
|
298
|
-
}catch(e){
|
|
298
|
+
} catch (e) {
|
|
299
299
|
console.log(e)
|
|
300
300
|
}
|
|
301
301
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
|
-
|
|
304
|
+
/* 22 - Depricated Function For Notification Count */
|
|
305
305
|
static getNotificationCount(callback) {
|
|
306
|
-
|
|
306
|
+
console.log("NV- Get Notification Count !!");
|
|
307
307
|
try {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
RNNotifyvisitors.getNotificationCount(callback);
|
|
309
|
+
} catch (e) {
|
|
310
|
+
console.log(e);
|
|
311
|
+
}
|
|
312
312
|
|
|
313
|
-
|
|
313
|
+
}
|
|
314
314
|
|
|
315
315
|
|
|
316
|
-
|
|
317
|
-
static scrollViewDidScroll_iOS_only(){
|
|
316
|
+
/* 23 - IOS Specific */
|
|
317
|
+
static scrollViewDidScroll_iOS_only() {
|
|
318
318
|
console.log("NV- Scroll View Did Scroll IOS !!");
|
|
319
|
-
try{
|
|
319
|
+
try {
|
|
320
320
|
RNNotifyvisitors.scrollViewDidScroll_iOS_only();
|
|
321
|
-
}catch(e){
|
|
321
|
+
} catch (e) {
|
|
322
322
|
console.log(e);
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
|
|
326
|
+
/* 24 - IOS Specific */
|
|
327
327
|
static promptForPushNotificationsWithUserResponse(callback) {
|
|
328
|
-
|
|
328
|
+
console.log("NV- Prompt For Push Notifications With UserResponse IOS !!");
|
|
329
329
|
if (!checkIfInitialized()) return;
|
|
330
330
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
}
|
|
331
|
+
if (Platform.OS === 'ios') {
|
|
332
|
+
RNNotifyvisitors.promptForPushNotificationsWithUserResponse(callback);
|
|
333
|
+
} else {
|
|
334
|
+
console.log("This function is not supported on Android");
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
337
|
|
|
338
|
+
static pushPermissionPrompt(pushPromptInfo, callback) {
|
|
339
|
+
console.log("NV- Push Permission Prompt !!");
|
|
340
|
+
try {
|
|
341
|
+
if (Platform.OS === 'ios') {
|
|
342
|
+
console.log("This function is not supported on IOS");
|
|
343
|
+
} else {
|
|
344
|
+
if (pushPromptInfo != null) {
|
|
345
|
+
RNNotifyvisitors.pushPermissionPrompt(pushPromptInfo, callback);
|
|
346
|
+
} else {
|
|
347
|
+
let pushPromptInfo = new PushPromptInfo();
|
|
348
|
+
RNNotifyvisitors.pushPermissionPrompt(pushPromptInfo, callback);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
} catch (e) {
|
|
352
|
+
console.log(e);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export class PushPromptInfo {
|
|
358
|
+
constructor() {
|
|
359
|
+
this.title = "Get Notified \uD83D\uDD14";
|
|
360
|
+
this.titleTextColor = "#000000";
|
|
361
|
+
this.description =
|
|
362
|
+
"Please Enable Push Notifications on Your Device For Latest Updates !!";
|
|
363
|
+
this.descriptionTextColor = "#000000";
|
|
364
|
+
this.backgroundColor = "#EBEDEF";
|
|
365
|
+
this.buttonOneBorderColor = "#6db76c";
|
|
366
|
+
this.buttonOneBackgroundColor = "#26a524";
|
|
367
|
+
this.buttonOneBorderRadius = "25";
|
|
368
|
+
this.buttonOneText = "Allow";
|
|
369
|
+
this.buttonOneTextColor = "#FFFFFF";
|
|
370
|
+
this.buttonTwoText = "Deny";
|
|
371
|
+
this.buttonTwoTextColor = "#FFFFFF";
|
|
372
|
+
this.buttonTwoBackgroundColor = "#FF0000";
|
|
373
|
+
this.buttonTwoBorderColor = "#6db76c";
|
|
374
|
+
this.buttonTwoBorderRadius = "25";
|
|
375
|
+
this.numberOfSessions = "3";
|
|
376
|
+
this.resumeInDays = "5";
|
|
377
|
+
}
|
|
338
378
|
}
|
|
339
379
|
|
package/ios/Assets/empty.png
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -32,7 +32,7 @@ int nvCheckPushClickTimeCounter = 0;
|
|
|
32
32
|
|
|
33
33
|
+(void)Initialize{
|
|
34
34
|
NSLog(@"RN-NotifyVisitors : INITIALIZE !!");
|
|
35
|
-
NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.1
|
|
35
|
+
NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.2.1 !!");
|
|
36
36
|
NSString *nvMode = nil;
|
|
37
37
|
#if DEBUG
|
|
38
38
|
nvMode = @"debug";
|
|
@@ -185,7 +185,7 @@ int nvCheckPushClickTimeCounter = 0;
|
|
|
185
185
|
+(void)NotifyVisitorsGeofencingReceivedNotificationWithApplication:(UIApplication *)application localNotification:(UILocalNotification *) notification{
|
|
186
186
|
@try{
|
|
187
187
|
NSLog(@"RN-NotifyVisitors : NOTIFYVISITORS GEOFENCING RECEIVED NOTIFICATION WITH APPLICATION !!");
|
|
188
|
-
[notifyvisitors NotifyVisitorsGeofencingReceivedNotificationWithApplication:application window:[UIApplication sharedApplication].keyWindow didReceiveGeofencingNotification:notification];
|
|
188
|
+
//[notifyvisitors NotifyVisitorsGeofencingReceivedNotificationWithApplication:application window:[UIApplication sharedApplication].keyWindow didReceiveGeofencingNotification:notification];
|
|
189
189
|
|
|
190
190
|
}@catch(NSException *exception){
|
|
191
191
|
NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
|
|
10
|
+
07B3E79C2AC2D90C00F0C9F0 /* libnotifyvisitors_6_4_4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 07B3E79A2AC2D90B00F0C9F0 /* libnotifyvisitors_6_4_4.a */; };
|
|
11
11
|
138AE09F22A7ACA600F403E1 /* RNNVExtensionService.m in Sources */ = {isa = PBXBuildFile; fileRef = 138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */; };
|
|
12
12
|
13B25F2D22BA35B000C4D0B7 /* RCTNVEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */; };
|
|
13
13
|
B3E7B58A1CC2AC0600A0062D /* RNNotifyvisitors.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */; };
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
/* End PBXCopyFilesBuildPhase section */
|
|
28
28
|
|
|
29
29
|
/* Begin PBXFileReference section */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
07B3E79A2AC2D90B00F0C9F0 /* libnotifyvisitors_6_4_4.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libnotifyvisitors_6_4_4.a; sourceTree = "<group>"; };
|
|
31
|
+
07B3E79B2AC2D90C00F0C9F0 /* notifyvisitors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = notifyvisitors.h; sourceTree = "<group>"; };
|
|
32
|
+
07B3E79D2AC2D93600F0C9F0 /* nv_deleteIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = nv_deleteIcon.png; sourceTree = "<group>"; };
|
|
33
|
+
07B3E79E2AC2D93600F0C9F0 /* slider_barHead.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = slider_barHead.png; sourceTree = "<group>"; };
|
|
34
|
+
07B3E79F2AC2D93600F0C9F0 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = "<group>"; };
|
|
35
|
+
07B3E7A02AC2D93700F0C9F0 /* nv_NotificationCenterBg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = nv_NotificationCenterBg.png; sourceTree = "<group>"; };
|
|
36
|
+
07B3E7A12AC2D93700F0C9F0 /* nv_NotificationCenterBg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nv_NotificationCenterBg@2x.png"; sourceTree = "<group>"; };
|
|
37
|
+
07B3E7A22AC2D93700F0C9F0 /* pause.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pause.png; sourceTree = "<group>"; };
|
|
38
|
+
07B3E7A32AC2D93800F0C9F0 /* nv_deleteIcon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nv_deleteIcon@2x.png"; sourceTree = "<group>"; };
|
|
39
|
+
07B3E7A42AC2D93800F0C9F0 /* play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play.png; sourceTree = "<group>"; };
|
|
40
|
+
07B3E7A52AC2D93800F0C9F0 /* slider_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = slider_bar.png; sourceTree = "<group>"; };
|
|
41
|
+
07B3E7A62AC2D93900F0C9F0 /* nvResourceValues.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = nvResourceValues.plist; sourceTree = "<group>"; };
|
|
42
|
+
07B3E7A72AC2D93900F0C9F0 /* nv_NotificationCenterBg@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nv_NotificationCenterBg@3x.png"; sourceTree = "<group>"; };
|
|
33
43
|
134814201AA4EA6300B7C361 /* libRNNotifyvisitors.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNotifyvisitors.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
34
44
|
138AE09D22A7ACA600F403E1 /* RNNVExtensionService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNVExtensionService.h; sourceTree = "<group>"; };
|
|
35
45
|
138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNVExtensionService.m; sourceTree = "<group>"; };
|
|
36
46
|
13B25F2B22BA35B000C4D0B7 /* RCTNVEventEmitter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTNVEventEmitter.h; sourceTree = "<group>"; };
|
|
37
47
|
13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTNVEventEmitter.m; sourceTree = "<group>"; };
|
|
38
|
-
25A29B6B26829CBB00098B92 /* nv_deleteIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = nv_deleteIcon.png; sourceTree = "<group>"; };
|
|
39
|
-
25A29B6D26829CBB00098B92 /* nv_deleteIcon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nv_deleteIcon@2x.png"; sourceTree = "<group>"; };
|
|
40
|
-
25A29B6E26829CBB00098B92 /* slider_barHead.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = slider_barHead.png; sourceTree = "<group>"; };
|
|
41
|
-
25A29B6F26829CBC00098B92 /* empty.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = "<group>"; };
|
|
42
|
-
25A29B7026829CBC00098B92 /* nv_NotificationCenterBg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nv_NotificationCenterBg@2x.png"; sourceTree = "<group>"; };
|
|
43
|
-
25A29B7126829CBC00098B92 /* nv_NotificationCenterBg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = nv_NotificationCenterBg.png; sourceTree = "<group>"; };
|
|
44
|
-
25A29B7226829CBC00098B92 /* pause.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pause.png; sourceTree = "<group>"; };
|
|
45
|
-
25A29B7326829CBC00098B92 /* play.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = play.png; sourceTree = "<group>"; };
|
|
46
|
-
25A29B7426829CBD00098B92 /* nv_NotificationCenterBg@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "nv_NotificationCenterBg@3x.png"; sourceTree = "<group>"; };
|
|
47
|
-
25A29B7526829CBD00098B92 /* slider_bar.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = slider_bar.png; sourceTree = "<group>"; };
|
|
48
48
|
B3E7B5881CC2AC0600A0062D /* RNNotifyvisitors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNotifyvisitors.h; sourceTree = "<group>"; };
|
|
49
49
|
B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNotifyvisitors.m; sourceTree = "<group>"; };
|
|
50
50
|
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; };
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
isa = PBXFrameworksBuildPhase;
|
|
56
56
|
buildActionMask = 2147483647;
|
|
57
57
|
files = (
|
|
58
|
-
|
|
58
|
+
07B3E79C2AC2D90C00F0C9F0 /* libnotifyvisitors_6_4_4.a in Frameworks */,
|
|
59
59
|
DC31F4E523BC9CC900AAB2DB /* SystemConfiguration.framework in Frameworks */,
|
|
60
60
|
);
|
|
61
61
|
runOnlyForDeploymentPostprocessing = 0;
|
|
@@ -74,17 +74,17 @@
|
|
|
74
74
|
253C98EC26411B0A00F2E8C9 /* Assets */ = {
|
|
75
75
|
isa = PBXGroup;
|
|
76
76
|
children = (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
07B3E7A62AC2D93900F0C9F0 /* nvResourceValues.plist */,
|
|
78
|
+
07B3E79F2AC2D93600F0C9F0 /* empty.png */,
|
|
79
|
+
07B3E79D2AC2D93600F0C9F0 /* nv_deleteIcon.png */,
|
|
80
|
+
07B3E7A32AC2D93800F0C9F0 /* nv_deleteIcon@2x.png */,
|
|
81
|
+
07B3E7A02AC2D93700F0C9F0 /* nv_NotificationCenterBg.png */,
|
|
82
|
+
07B3E7A12AC2D93700F0C9F0 /* nv_NotificationCenterBg@2x.png */,
|
|
83
|
+
07B3E7A72AC2D93900F0C9F0 /* nv_NotificationCenterBg@3x.png */,
|
|
84
|
+
07B3E7A22AC2D93700F0C9F0 /* pause.png */,
|
|
85
|
+
07B3E7A42AC2D93800F0C9F0 /* play.png */,
|
|
86
|
+
07B3E7A52AC2D93800F0C9F0 /* slider_bar.png */,
|
|
87
|
+
07B3E79E2AC2D93600F0C9F0 /* slider_barHead.png */,
|
|
88
88
|
);
|
|
89
89
|
path = Assets;
|
|
90
90
|
sourceTree = "<group>";
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
58B511D21A9E6C8500147676 = {
|
|
93
93
|
isa = PBXGroup;
|
|
94
94
|
children = (
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
07B3E79A2AC2D90B00F0C9F0 /* libnotifyvisitors_6_4_4.a */,
|
|
96
|
+
07B3E79B2AC2D90C00F0C9F0 /* notifyvisitors.h */,
|
|
97
97
|
253C98EC26411B0A00F2E8C9 /* Assets */,
|
|
98
98
|
DC4962D123BE131B005E63F5 /* RNNotifyvisitors */,
|
|
99
99
|
134814211AA4EA7D00B7C361 /* Products */,
|
|
Binary file
|
|
Binary file
|
package/ios/notifyvisitors.h
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
10
|
#import <UIKit/UIKit.h>
|
|
11
|
-
#import <CoreLocation/CoreLocation.h>
|
|
12
11
|
|
|
13
12
|
typedef NS_ENUM(NSUInteger, nvPushBadgeCount){
|
|
14
13
|
nvPushBadgeCountIncreaseByOne,
|
|
@@ -95,18 +94,22 @@ typedef void(^nv_UID)(NSString *_Nullable);
|
|
|
95
94
|
|
|
96
95
|
+(void)Show:(NSMutableDictionary * _Nullable)UserTokens CustomRule:(NSMutableDictionary * _Nullable)customRule;
|
|
97
96
|
+(void)UserIdentifier:(NSString *_Nullable) userID UserParams:(NSMutableDictionary * _Nullable) UserParams;
|
|
98
|
-
|
|
97
|
+
//+(void)checkSetupComplete:(NSTimer * _Nullable)timer;
|
|
99
98
|
+(void)scrollViewDidScroll:(UIScrollView * _Nullable) scrollView;
|
|
100
|
-
|
|
99
|
+
//+(BOOL)isScrolled:(NSString * _Nullable)NotificationID;
|
|
101
100
|
+(void)trackEvents:(NSString * _Nullable)event_name Attributes:(NSMutableDictionary * _Nullable)attributes lifetimeValue:(NSString * _Nullable)ltv Scope:(int)scope;
|
|
102
101
|
|
|
103
102
|
+(void)schedulePushNotificationwithNotificationID:(NSString * _Nullable)NID Tag:(NSString * _Nullable)tag TimeinSecond:(NSString * _Nullable)time Title:(NSString * _Nullable)title Message:(NSString * _Nullable)message URL:(NSString * _Nullable)url Icon:(NSString * _Nullable)icon;
|
|
104
103
|
|
|
105
104
|
+(void)pushPreferences:(NSArray*_Nullable)preferenceList isUnsubscribeFromAll:(BOOL)shouldUnsubscribe;
|
|
106
|
-
+(void)NotifyVisitorsNotificationCentre;
|
|
107
|
-
+(void)notificationCenterWithConfiguration:(NVCenterStyleConfig *_Nullable)configuration;
|
|
108
105
|
|
|
109
106
|
|
|
107
|
+
+(void)NotifyVisitorsNotificationCentre DEPRECATED_MSG_ATTRIBUTE("first deprecated in Notifyvisitors iOS SDK 6.4.3 Use [notifyvisitors notificationCenter:] (see notifyvisitors.h)");
|
|
108
|
+
|
|
109
|
+
+(void)notificationCenter;
|
|
110
|
+
|
|
111
|
+
+(void)notificationCenterWithConfiguration:(NVCenterStyleConfig *_Nullable)configuration;
|
|
112
|
+
|
|
110
113
|
+(void)GetUnreadPushNotification:(nvGetCount _Nullable )UnreadCount;
|
|
111
114
|
+(void)getNotificationCenterCountWithConfiguration:(NVCenterStyleConfig *_Nullable)configuration countResult:(nvUnreadCenterCount _Nullable )unreadCenterCounts;
|
|
112
115
|
|
|
@@ -115,31 +118,19 @@ typedef void(^nv_UID)(NSString *_Nullable);
|
|
|
115
118
|
|
|
116
119
|
+(void)GetNotificationCentreData:(NotificationListData _Nullable) notificationDataList;
|
|
117
120
|
|
|
118
|
-
+(void)NotifyVisitorsGeofencing;
|
|
119
|
-
|
|
120
|
-
+(void) NotifyVisitorsGeofencingReceivedNotificationWithApplication: (UIApplication * _Nullable) application window: (UIWindow * _Nullable) window didReceiveGeofencingNotification:(UILocalNotification * _Nullable) notification;
|
|
121
|
-
|
|
122
|
-
+(void)HandleLocalNotifications: (UILocalNotification *_Nullable) notification;
|
|
123
|
-
|
|
124
|
-
+(void)NotifyVisitorsGeofencingApplicationDidEnterBackground:(UIApplication *_Nullable)application DEPRECATED_MSG_ATTRIBUTE("first deprecated in Notifyvisitors iOS SDK 4.1.0 Use [notifyvisitors applicationDidEnterBackground:] (see notifyvisitors.h)");
|
|
125
|
-
|
|
126
|
-
//API_DEPRECATED(@"%@ %@",nvDeprecatedInSDKVersion, nvGeoDeprecatedInBackgroundMsg);
|
|
127
|
-
+(void)NotifyVisitorsGeofencingapplicationDidBecomeActive:(UIApplication *_Nullable)application DEPRECATED_MSG_ATTRIBUTE("first deprecated in Notifyvisitors iOS SDK 4.1.0 Use [notifyvisitors applicationDidBecomeActive:] (see notifyvisitors.h)");
|
|
128
|
-
|
|
129
|
-
|
|
130
121
|
+(void)applicationDidEnterBackground:(UIApplication *_Nullable)application;
|
|
131
122
|
+(void)applicationDidBecomeActive:(UIApplication *_Nullable)application;
|
|
132
123
|
+(void)applicationWillEnterForeground:(UIApplication *_Nullable)application;
|
|
133
124
|
+(void)applicationWillTerminate;
|
|
134
125
|
|
|
135
126
|
+(void)DismissAllNotifyvisitorsInAppNotifications;
|
|
127
|
+
|
|
136
128
|
+(void)StopInAppNotifications;
|
|
137
129
|
+(void)stopGeofencePushforDateTime:(NSString *_Nullable)nvDateTime additionalHours: (NSInteger)nvtimeinHours;
|
|
138
130
|
|
|
139
131
|
+(void)startChatBotWithScreenName: (NSString *_Nullable)nvBotScreenName;
|
|
140
132
|
+(void)getNvUid:(nv_UID _Nullable)nvUID;
|
|
141
133
|
+(void)requestAppleAppStoreInAppReview;
|
|
142
|
-
|
|
143
134
|
+(void)updatePushBadgeNumberWithValue:(nvPushBadgeCount)nvPushBadgeNumber;
|
|
144
135
|
|
|
145
136
|
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
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
|
-
|
|
2
|
+
"name": "react-native-notifyvisitors",
|
|
3
|
+
"version": "4.2.1",
|
|
4
|
+
"description": "React Native Notifyvisitors SDK for push notifications and surveys",
|
|
5
|
+
"main": "index",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"react-native",
|
|
11
|
+
"ios",
|
|
12
|
+
"android",
|
|
13
|
+
"notifications",
|
|
14
|
+
"push",
|
|
15
|
+
"apns",
|
|
16
|
+
"fcm",
|
|
17
|
+
"gcm",
|
|
18
|
+
"notifyvisitors"
|
|
19
|
+
],
|
|
20
|
+
"author": "Siddharth Gupta",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/tagnpin/react-native-notifyvisitors.git"
|
|
25
|
+
}
|
|
26
26
|
}
|
|
Binary file
|