react-native-notifyvisitors 4.2.3 → 4.3.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.
Files changed (59) hide show
  1. package/android/.settings/org.eclipse.buildship.core.prefs +3 -3
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/rn_notifyvisitors/RNNotifyvisitorsModule.java +47 -8
  4. package/index.d.ts +1 -0
  5. package/index.js +379 -361
  6. package/ios/RNNotifyvisitors/RCTNVEventEmitter.m +69 -9
  7. package/ios/RNNotifyvisitors/RNNotifyvisitors.h +28 -17
  8. package/ios/RNNotifyvisitors/RNNotifyvisitors.m +116 -56
  9. package/ios/RNNotifyvisitors.xcodeproj/project.pbxproj +5 -37
  10. package/ios/notifyvisitors.xcframework/Info.plist +40 -0
  11. package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/Assets.car +0 -0
  12. package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/Headers/notifyvisitors.h +148 -0
  13. package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/Info.plist +0 -0
  14. package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/Modules/module.modulemap +6 -0
  15. package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/_CodeSignature/CodeResources +135 -0
  16. package/ios/notifyvisitors.xcframework/ios-arm64/notifyvisitors.framework/notifyvisitors +0 -0
  17. package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/Assets.car +0 -0
  18. package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/Headers/notifyvisitors.h +148 -0
  19. package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/Info.plist +0 -0
  20. package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/Modules/module.modulemap +6 -0
  21. package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/_CodeSignature/CodeResources +135 -0
  22. package/ios/notifyvisitors.xcframework/ios-arm64_x86_64-simulator/notifyvisitors.framework/notifyvisitors +0 -0
  23. package/ios/{Assets/nvResourceValues.plist → nvResourceValues.plist} +7 -3
  24. package/package.json +1 -1
  25. package/react-native-notifyvisitors.podspec +1 -1
  26. package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
  27. package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  28. package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
  29. package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
  30. package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
  31. package/android/.gradle/7.4.2/gc.properties +0 -0
  32. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  33. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  34. package/android/.gradle/checksums/checksums.lock +0 -0
  35. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  36. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  37. package/android/.gradle/vcs-1/gc.properties +0 -0
  38. package/ios/Assets/empty.png +0 -0
  39. package/ios/Assets/nv_NotificationCenterBg.png +0 -0
  40. package/ios/Assets/nv_NotificationCenterBg@2x.png +0 -0
  41. package/ios/Assets/nv_NotificationCenterBg@3x.png +0 -0
  42. package/ios/Assets/nv_deleteIcon.png +0 -0
  43. package/ios/Assets/nv_deleteIcon@2x.png +0 -0
  44. package/ios/Assets/pause.png +0 -0
  45. package/ios/Assets/play.png +0 -0
  46. package/ios/Assets/slider_bar.png +0 -0
  47. package/ios/Assets/slider_barHead.png +0 -0
  48. package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -4
  49. package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  50. package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcuserdata/neeraj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  51. package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcuserdata/nv_macbook-2.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  52. package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcuserdata/siddharthgupta.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  53. package/ios/RNNotifyvisitors.xcodeproj/project.xcworkspace/xcuserdata/tagnpinwebsolutionsllp.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  54. package/ios/RNNotifyvisitors.xcodeproj/xcuserdata/neeraj.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  55. package/ios/RNNotifyvisitors.xcodeproj/xcuserdata/nv_macbook-2.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  56. package/ios/RNNotifyvisitors.xcodeproj/xcuserdata/siddharthgupta.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  57. package/ios/RNNotifyvisitors.xcodeproj/xcuserdata/tagnpinwebsolutionsllp.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  58. package/ios/libnotifyvisitors_6_4_4.a +0 -0
  59. package/ios/notifyvisitors.h +0 -137
@@ -309,7 +309,7 @@ RCT_EXPORT_METHOD(showNotifications:(NSDictionary*_Nullable)temp dismiss:(NSStri
309
309
 
310
310
  } else{
311
311
  NSLog(@"Empty JSON Object ! Going for Standard App Inbox ");
312
- [notifyvisitors NotifyVisitorsNotificationCentre];
312
+ [notifyvisitors notificationCenter];
313
313
  }
314
314
  }
315
315
  @catch(NSException *exception){
@@ -388,8 +388,7 @@ RCT_EXPORT_METHOD(userIdentifier:(NSString*_Nullable)nvUserID UserParams:(NSDict
388
388
  RCT_EXPORT_METHOD(startChatBot: (NSString*_Nullable)screenName) {
389
389
  @try{
390
390
  NSLog(@"RN-NotifyVisitors : START CHATBOT !!");
391
- [notifyvisitors startChatBotWithScreenName: screenName];
392
- //callback(@[@"No Notification Found", [NSNull null]]);
391
+ NSLog(@"This feature temporarily not available. Please contact our support team for more assistance");
393
392
  }
394
393
  @catch(NSException *exception){
395
394
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
@@ -605,6 +604,33 @@ RCT_EXPORT_METHOD(getNotificationDataListener:(RCTResponseSenderBlock)callback)
605
604
  }
606
605
  }
607
606
 
607
+ /* 17- Get notificvation Center data in callback in new format*/
608
+ RCT_EXPORT_METHOD(getNotificationCenterData:(RCTResponseSenderBlock)callback) {
609
+ @try{
610
+ NSLog(@"RN-NotifyVisitors : GET NOTIFICATION CENTER DATA !!");
611
+ [notifyvisitors getNotificationCenterData:^(NSDictionary * nvNotificationCenterData) {
612
+ NSError *nvError = nil;
613
+ NSData *nvJsonData = nil;
614
+ NSString *nvJsonString = nil;
615
+ if([nvNotificationCenterData count] > 0){
616
+ nvJsonData = [NSJSONSerialization dataWithJSONObject: nvNotificationCenterData options:NSJSONWritingPrettyPrinted error: &nvError];
617
+ } else {
618
+ NSDictionary *nvErrorDataResponse = @{@"message" : @"no notification(s)", @"notifications": @[]};
619
+ nvJsonData = [NSJSONSerialization dataWithJSONObject: nvErrorDataResponse options:NSJSONWritingPrettyPrinted error: &nvError];
620
+ }
621
+ nvJsonString = [[NSString alloc] initWithData: nvJsonData encoding: NSUTF8StringEncoding];
622
+ callback(@[nvJsonString, [NSNull null]]);
623
+ }];
624
+ }
625
+ @catch(NSException *exception){
626
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
627
+ NSError *nvExcError = nil;
628
+ NSDictionary *nvExcErrorDataResponse = @{@"message" : @"no notification(s)", @"notifications": @[], @"errorDescription" : exception.description};
629
+ NSData *nvExcJsonData = [NSJSONSerialization dataWithJSONObject: nvExcErrorDataResponse options:NSJSONWritingPrettyPrinted error: &nvExcError];
630
+ NSString *nvExcJsonString = [[NSString alloc] initWithData: nvExcJsonData encoding: NSUTF8StringEncoding];
631
+ callback(@[nvExcJsonString, [NSNull null]]);
632
+ }
633
+ }
608
634
 
609
635
  /* 18- Stop Inapp Banner serveyes */
610
636
  RCT_EXPORT_METHOD(stopNotifications) {
@@ -668,7 +694,6 @@ RCT_EXPORT_METHOD(getNotificationCount:(RCTResponseSenderBlock)callback) {
668
694
  }
669
695
  }
670
696
 
671
-
672
697
  /* 23 - IOS Specific */
673
698
  RCT_EXPORT_METHOD(scrollViewDidScroll_iOS_only) {
674
699
  @try{
@@ -703,17 +728,19 @@ RCT_EXPORT_METHOD(scrollViewDidScroll_iOS_only) {
703
728
 
704
729
 
705
730
  /* internal method */
706
- - (void)NotifyvisitorsGetEventResponseWithUserInfo:(NSDictionary *)userInfo{
731
+
732
+
733
+ - (void)notifyvisitorsEventsResponseCallback:(NSDictionary *)callback {
707
734
  NSLog(@"RN-NotifyVisitors : NOTIFYVISITORS GET EVENT RESPONSE WITH USER INFO!!");
708
735
  @try {
709
- if([userInfo count] > 0){
736
+ if([callback count] > 0){
710
737
  NSError *nvError = nil;
711
- NSData *nvJsonData = [NSJSONSerialization dataWithJSONObject: userInfo options: NSJSONWritingPrettyPrinted error: &nvError];
738
+ NSData *nvJsonData = [NSJSONSerialization dataWithJSONObject: callback options: NSJSONWritingPrettyPrinted error: &nvError];
712
739
  NSString *nvJsonString = [[NSString alloc] initWithData: nvJsonData encoding: NSUTF8StringEncoding];
713
740
 
714
- NSString * eventName = userInfo[@"eventName"];
741
+ NSString * eventName = callback[@"eventName"];
715
742
  // clicked is event or survey
716
- if([eventName isEqualToString:@"Survey Submit"] || [eventName isEqualToString:@"Survey Attempt"] || [eventName isEqualToString:@"Banner Clicked"] ){
743
+ if([eventName isEqualToString:@"Survey Submit"] || [eventName isEqualToString:@"Survey Attempt"] || [eventName isEqualToString:@"Banner Impression"] || [eventName isEqualToString:@"Banner Clicked"] ){
717
744
  if(showCallback != NULL){
718
745
  [self sendEventWithName:@"nv_show_callback" body:@{@"data":nvJsonString}];
719
746
  }
@@ -735,6 +762,39 @@ RCT_EXPORT_METHOD(scrollViewDidScroll_iOS_only) {
735
762
  }
736
763
 
737
764
 
765
+
766
+ //- (void)NotifyvisitorsGetEventResponseWithUserInfo:(NSDictionary *)userInfo {
767
+ // NSLog(@"RN-NotifyVisitors : NOTIFYVISITORS GET EVENT RESPONSE WITH USER INFO!!");
768
+ // @try {
769
+ // if([userInfo count] > 0){
770
+ // NSError *nvError = nil;
771
+ // NSData *nvJsonData = [NSJSONSerialization dataWithJSONObject: userInfo options: NSJSONWritingPrettyPrinted error: &nvError];
772
+ // NSString *nvJsonString = [[NSString alloc] initWithData: nvJsonData encoding: NSUTF8StringEncoding];
773
+ //
774
+ // NSString * eventName = userInfo[@"eventName"];
775
+ // // clicked is event or survey
776
+ // if([eventName isEqualToString:@"Survey Submit"] || [eventName isEqualToString:@"Survey Attempt"] || [eventName isEqualToString:@"Banner Clicked"] ){
777
+ // if(showCallback != NULL){
778
+ // [self sendEventWithName:@"nv_show_callback" body:@{@"data":nvJsonString}];
779
+ // }
780
+ // }else{
781
+ // if(eventCallback != NULL){
782
+ // [self sendEventWithName:@"nv_event_callback" body:@{@"data":nvJsonString}];
783
+ // }
784
+ // }
785
+ //
786
+ // if(commonCallback != NULL){
787
+ // [self sendEventWithName:@"nv_common_show_event_callback" body:@{@"data":nvJsonString}];
788
+ // }
789
+ //
790
+ // }
791
+ // }
792
+ // @catch (NSException *exception) {
793
+ // NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
794
+ // }
795
+ //}
796
+
797
+
738
798
  -(UIColor*)GetColor:(NSString *)ColorString {
739
799
  if ([[ColorString substringToIndex:1]isEqualToString:@"#"]) {
740
800
  unsigned int c;
@@ -18,41 +18,52 @@ extern BOOL nvPushObserverReady;
18
18
  // SDK initialization
19
19
  +(void)Initialize;
20
20
 
21
- +(void)RegisterPushWithDelegate:(id _Nullable)delegate App:(UIApplication * _Nullable)application launchOptions:(NSDictionary *_Nullable)launchOptions;
21
+ +(void)applicationDidEnterBackground:(UIApplication *_Nullable)application;
22
+ +(void)sceneDidEnterBackground:(UIScene *_Nullable)scene API_AVAILABLE(ios(13.0));
23
+
24
+ +(void)applicationWillEnterForeground:(UIApplication *_Nullable)application;
25
+ +(void)sceneWillEnterForeground:(UIScene *_Nullable)scene API_AVAILABLE(ios(13.0));
26
+
27
+ +(void)applicationDidBecomeActive:(UIApplication *_Nullable)application;
28
+ +(void)sceneDidBecomeActive:(UIScene *_Nullable)scene API_AVAILABLE(ios(13.0));
29
+
30
+ +(void)applicationWillTerminate;
31
+
32
+ //Deeplink Handler function
33
+
34
+ +(void)openUrl:(UIApplication *_Nullable)application openURL:(NSURL *_Nullable)url DEPRECATED_MSG_ATTRIBUTE("This method is deprecated in Notifyvisitors react-native plugin Use [RNNotifyvisitors openUrlWithApplication:url:] (see RNNotifyvisitors.h)");
35
+ +(void)openUrlWithApplication:(UIApplication *_Nullable)application url:(NSURL *_Nullable)url;
36
+
37
+ //+(NSMutableDictionary*_Nullable)OpenUrlGetDataWithApplication: (UIApplication *_Nullable)application Url:(NSURL *_Nullable)url;
38
+
39
+ +(void)scene:(UIScene *_Nullable)scene openURLContexts:(NSSet<UIOpenURLContext *> *_Nullable)URLContexts API_AVAILABLE(ios(13.0));
40
+
41
+ +(void)scene:(UIScene *_Nullable)scene willConnectToSession:(UISceneSession *_Nullable)session options:(UISceneConnectionOptions *_Nullable)connectionOptions API_AVAILABLE(ios(13.0));
22
42
 
23
43
 
24
- //for simple push
44
+ // Push notification registration
45
+
46
+ +(void)RegisterPushWithDelegate:(id _Nullable)delegate App:(UIApplication * _Nullable)application launchOptions:(NSDictionary *_Nullable)launchOptions;
25
47
 
26
48
  +(void)application:(UIApplication *_Nullable)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *_Nullable)deviceToken;
27
49
 
28
50
  +(void)application:(UIApplication *_Nullable)application didFailToRegisterForRemoteNotificationsWithError:(NSError *_Nullable)error;
29
51
 
30
- +(void)application:(UIApplication *_Nullable)application didReceiveRemoteNotification:(NSDictionary *_Nullable)userInfo;
31
52
 
32
- // app termination
33
53
 
34
- +(void)applicationWillTerminate;
54
+ // Push Notifications Click Handler functions
55
+ +(void)application:(UIApplication *_Nullable)application didReceiveRemoteNotification:(NSDictionary *_Nullable)userInfo;
35
56
 
57
+ +(void)application:(UIApplication *_Nullable)application didReceiveRemoteNotification:(NSDictionary *_Nullable)userInfo fetchCompletionHandler:(void (^_Nullable)(UIBackgroundFetchResult))completionHandler;
36
58
 
37
59
  // ios 10 push methods
38
60
  +(void)willPresentNotification:(UNNotification *_Nullable)notification withCompletionHandler:(void (^_Nullable)(UNNotificationPresentationOptions options))completionHandler API_AVAILABLE(ios(10.0));
39
61
 
40
62
  +(void)didReceiveNotificationResponse:(UNNotificationResponse *_Nullable)response API_AVAILABLE(ios(10.0));
41
63
 
42
- +(void)application:(UIApplication *_Nullable)application didReceiveRemoteNotification:(NSDictionary *_Nullable)userInfo
43
- fetchCompletionHandler:(void (^_Nullable)(UIBackgroundFetchResult))completionHandler;
44
-
45
-
46
- //Geofencing methods
47
-
48
- +(void)applicationDidEnterBackground:(UIApplication *_Nullable)application;
49
- +(void)applicationDidBecomeActive:(UIApplication *_Nullable)application;
50
- +(void)NotifyVisitorsGeofencingReceivedNotificationWithApplication:(UIApplication *_Nullable)application localNotification:(UILocalNotification *_Nullable) notification;
51
-
52
64
 
53
- //open Url Application
54
65
 
55
- +(void)openUrl:(UIApplication *_Nullable)application openURL:(NSURL *_Nullable)url;
66
+ //+(void)NotifyVisitorsGeofencingReceivedNotificationWithApplication:(UIApplication *_Nullable)application localNotification:(UILocalNotification *_Nullable) notification;
56
67
 
57
68
 
58
69
  @end
@@ -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.2.3 !!");
35
+ NSLog(@"RN-NotifyVisitors PLUGIN VERSION : 4.3.0 !!");
36
36
  NSString *nvMode = nil;
37
37
  #if DEBUG
38
38
  nvMode = @"debug";
@@ -43,33 +43,70 @@ int nvCheckPushClickTimeCounter = 0;
43
43
 
44
44
  }
45
45
 
46
- +(void)RegisterPushWithDelegate:(id _Nullable)delegate App:(UIApplication * _Nullable)application launchOptions:(NSDictionary *_Nullable)launchOptions{
47
- NSLog(@"RN-NotifyVisitors : REGISTER PUSH WITH DELEGATE !!");
46
+ +(void)applicationDidEnterBackground:(UIApplication *)application{
48
47
  @try{
49
- [notifyvisitors RegisterPushWithDelegate: delegate App: application launchOptions: launchOptions];
50
- } @catch(NSException *exception){
48
+ NSLog(@"RN-NotifyVisitors : APPLICATION DID ENTER BACKGROUND !!");
49
+ [notifyvisitors applicationDidEnterBackground: application];
50
+
51
+ }@catch(NSException *exception){
51
52
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
52
53
  }
53
54
  }
54
55
 
56
+ +(void)sceneDidEnterBackground:(UIScene *)scene {
57
+ @try{
58
+ NSLog(@"RN-NotifyVisitors : SCENE DID ENTER BACKGROUND !!");
59
+ [notifyvisitors sceneDidEnterBackground: scene];
60
+
61
+ }@catch(NSException *exception){
62
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
63
+ }
64
+ }
55
65
 
56
- //for simple push
66
+ +(void)applicationWillEnterForeground:(UIApplication *)application {
67
+ @try{
68
+ NSLog(@"RN-NotifyVisitors : APPLICATION WILL ENTER FOREGROUND !!");
69
+ [notifyvisitors applicationWillEnterForeground: application];
70
+
71
+ }@catch(NSException *exception){
72
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
73
+ }
74
+ }
57
75
 
58
- +(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
59
- NSLog(@"RN-NotifyVisitors : DID REGISTER FOR REMOTE NOTIFICATIONS WITH DEVICE TOKEN !!");
76
+ +(void)sceneWillEnterForeground:(UIScene *)scene {
60
77
  @try{
61
- [notifyvisitors DidRegisteredNotification: application deviceToken: deviceToken];
78
+ NSLog(@"RN-NotifyVisitors : SCENE WILL ENTER FOREGROUND !!");
79
+ [notifyvisitors sceneWillEnterForeground: scene];
80
+
81
+ }@catch(NSException *exception){
82
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
62
83
  }
63
- @catch(NSException *exception){
84
+ }
85
+
86
+ +(void)applicationDidBecomeActive:(UIApplication *)application{
87
+ @try{
88
+ NSLog(@"RN-NotifyVisitors : APPLICATION DID BECOME ACTIVE !!");
89
+ [notifyvisitors applicationDidBecomeActive: application];
90
+
91
+ }@catch(NSException *exception){
64
92
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
65
93
  }
66
94
 
67
95
  }
68
96
 
97
+ +(void)sceneDidBecomeActive:(UIScene *)scene {
98
+ @try{
99
+ NSLog(@"RN-NotifyVisitors : SCENE DID BECOME ACTIVE !!");
100
+ [notifyvisitors sceneDidBecomeActive: scene];
101
+ }@catch(NSException *exception){
102
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
103
+ }
104
+ }
69
105
 
70
- +(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
106
+ +(void)applicationWillTerminate{
71
107
  @try{
72
- NSLog(@"RN-NotifyVisitors : DID FAIL TO REGISTER FOR REMOTE NOTIFICATIONS WITH ERROR = %@", error);
108
+ NSLog(@"RN-NotifyVisitors : APPLICATION WILL TERMINATE !!");
109
+ [notifyvisitors applicationWillTerminate];
73
110
  }
74
111
  @catch(NSException *exception){
75
112
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
@@ -77,46 +114,92 @@ int nvCheckPushClickTimeCounter = 0;
77
114
 
78
115
  }
79
116
 
80
- +(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
117
+ //Deeplink Handler functions
118
+
119
+ +(void)openUrl:(UIApplication *_Nullable)application openURL:(NSURL*)url {
120
+ [self openUrlWithApplication: application url: url];
121
+ }
122
+
123
+ +(void)openUrlWithApplication:(UIApplication *)application url:(NSURL *)url {
124
+ NSLog(@"RN-NotifyVisitors : OPEN URL !!");
81
125
  @try{
82
- NSLog(@"RN-NotifyVisitors : DID RECEIVE REMOTE NOTIFICATION !!");
83
- [notifyvisitors didReceiveRemoteNotificationWithUserInfo: userInfo];
126
+ [notifyvisitors OpenUrlWithApplication: application Url: url];
84
127
  }
85
128
  @catch(NSException *exception){
86
129
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
87
130
  }
88
131
  }
89
132
 
90
- +(void)applicationWillTerminate{
133
+ +(void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
134
+ NSLog(@"RN-NotifyVisitors : SCENE OPEN URL CONTEXTS !!");
91
135
  @try{
92
- NSLog(@"RN-NotifyVisitors : APPLICATION WILL TERMINATE !!");
93
- [notifyvisitors applicationWillTerminate];
136
+ [notifyvisitors scene: scene openURLContexts: URLContexts];
94
137
  }
95
138
  @catch(NSException *exception){
96
139
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
97
140
  }
98
-
99
141
  }
100
142
 
143
+ +(void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
144
+ NSLog(@"RN-NotifyVisitors : SCENE WILL CONNECT TO SESSION OPTIONS !!");
145
+ @try{
146
+ [notifyvisitors scene: scene willConnectToSession: session options: connectionOptions];
147
+ }
148
+ @catch(NSException *exception){
149
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
150
+ }
151
+ }
101
152
 
102
153
 
103
- //open Url Function
154
+ +(void)RegisterPushWithDelegate:(id _Nullable)delegate App:(UIApplication * _Nullable)application launchOptions:(NSDictionary *_Nullable)launchOptions{
155
+ NSLog(@"RN-NotifyVisitors : REGISTER PUSH WITH DELEGATE !!");
156
+ @try{
157
+ [notifyvisitors RegisterPushWithDelegate: delegate App: application launchOptions: launchOptions];
158
+ } @catch(NSException *exception){
159
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
160
+ }
161
+ }
104
162
 
105
- +(void)openUrl:(UIApplication *_Nullable)application openURL:(NSURL*)url{
106
- NSLog(@"RN-NotifyVisitors : OPEN URL !!");
163
+
164
+ //for simple push
165
+
166
+ +(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
167
+ NSLog(@"RN-NotifyVisitors : DID REGISTER FOR REMOTE NOTIFICATIONS WITH DEVICE TOKEN !!");
168
+ @try{
169
+ [notifyvisitors DidRegisteredNotification: application deviceToken: deviceToken];
170
+ }
171
+ @catch(NSException *exception){
172
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
173
+ }
174
+
175
+ }
176
+
177
+
178
+ +(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
107
179
  @try{
108
- [notifyvisitors OpenUrlWithApplication:application Url:url];
180
+ NSLog(@"RN-NotifyVisitors : DID FAIL TO REGISTER FOR REMOTE NOTIFICATIONS WITH ERROR = %@", error.localizedDescription);
109
181
  }
110
182
  @catch(NSException *exception){
111
183
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
112
184
  }
185
+
113
186
  }
114
187
 
188
+ +(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
189
+ @try{
190
+ NSLog(@"RN-NotifyVisitors : DID RECEIVE REMOTE NOTIFICATION !!");
191
+ [notifyvisitors didReceiveRemoteNotificationWithUserInfo: userInfo];
192
+ }
193
+ @catch(NSException *exception){
194
+ NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
195
+ }
196
+ }
115
197
 
116
198
  +(void)willPresentNotification:(UNNotification *_Nullable)notification withCompletionHandler:(void (^_Nullable)(UNNotificationPresentationOptions options))completionHandler API_AVAILABLE(ios(10.0)){
117
199
  NSLog(@"RN-NotifyVisitors : WILL PRESENT NOTIFICATION !!");
118
200
  @try{
119
201
  [notifyvisitors willPresentNotification: notification withCompletionHandler: completionHandler];
202
+ [notifyvisitors willPresentNotification: notification withCompletionHandler: completionHandler];
120
203
  }
121
204
  @catch(NSException *exception){
122
205
  NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
@@ -159,39 +242,16 @@ int nvCheckPushClickTimeCounter = 0;
159
242
 
160
243
  //Geofencing Methods
161
244
 
162
- +(void)applicationDidEnterBackground:(UIApplication *)application{
163
- @try{
164
- NSLog(@"RN-NotifyVisitors : APPLICATION DID ENTER BACKGROUND !!");
165
- [notifyvisitors applicationDidEnterBackground: application];
166
-
167
- }@catch(NSException *exception){
168
- NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
169
- }
170
- }
171
-
172
-
173
- +(void)applicationDidBecomeActive:(UIApplication *)application{
174
- @try{
175
- NSLog(@"RN-NotifyVisitors : APPLICATION DID BECOME ACTIVE !!");
176
- [notifyvisitors applicationDidBecomeActive: application];
177
-
178
- }@catch(NSException *exception){
179
- NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
180
- }
181
-
182
- }
183
-
184
-
185
- +(void)NotifyVisitorsGeofencingReceivedNotificationWithApplication:(UIApplication *)application localNotification:(UILocalNotification *) notification{
186
- @try{
187
- NSLog(@"RN-NotifyVisitors : NOTIFYVISITORS GEOFENCING RECEIVED NOTIFICATION WITH APPLICATION !!");
188
- //[notifyvisitors NotifyVisitorsGeofencingReceivedNotificationWithApplication:application window:[UIApplication sharedApplication].keyWindow didReceiveGeofencingNotification:notification];
189
-
190
- }@catch(NSException *exception){
191
- NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
192
- }
193
-
194
- }
245
+ //+(void)NotifyVisitorsGeofencingReceivedNotificationWithApplication:(UIApplication *)application localNotification:(UILocalNotification *) notification{
246
+ // @try{
247
+ // NSLog(@"RN-NotifyVisitors : NOTIFYVISITORS GEOFENCING RECEIVED NOTIFICATION WITH APPLICATION !!");
248
+ // //[notifyvisitors NotifyVisitorsGeofencingReceivedNotificationWithApplication:application window:[UIApplication sharedApplication].keyWindow didReceiveGeofencingNotification:notification];
249
+ //
250
+ // }@catch(NSException *exception){
251
+ // NSLog(@"RN-NotifyVisitors ERROR : %@", exception.reason);
252
+ // }
253
+ //
254
+ //}
195
255
 
196
256
 
197
257
  +(void)nvPushClickCheckInSeconds:(int)seconds withBlock: (nvPushClickCheckRepeatBlock) nvPushCheckBlock {
@@ -3,13 +3,13 @@
3
3
  archiveVersion = 1;
4
4
  classes = {
5
5
  };
6
- objectVersion = 46;
6
+ objectVersion = 54;
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 07B3E79C2AC2D90C00F0C9F0 /* libnotifyvisitors_6_4_4.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 07B3E79A2AC2D90B00F0C9F0 /* libnotifyvisitors_6_4_4.a */; };
11
10
  138AE09F22A7ACA600F403E1 /* RNNVExtensionService.m in Sources */ = {isa = PBXBuildFile; fileRef = 138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */; };
12
11
  13B25F2D22BA35B000C4D0B7 /* RCTNVEventEmitter.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */; };
12
+ 358D55C32B4FD102005B5C25 /* notifyvisitors.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 358D55C22B4FD102005B5C25 /* notifyvisitors.xcframework */; };
13
13
  B3E7B58A1CC2AC0600A0062D /* RNNotifyvisitors.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */; };
14
14
  DC31F4E523BC9CC900AAB2DB /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DC31F4E423BC9CC900AAB2DB /* SystemConfiguration.framework */; };
15
15
  /* End PBXBuildFile section */
@@ -27,24 +27,12 @@
27
27
  /* End PBXCopyFilesBuildPhase section */
28
28
 
29
29
  /* Begin PBXFileReference section */
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>"; };
43
30
  134814201AA4EA6300B7C361 /* libRNNotifyvisitors.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNotifyvisitors.a; sourceTree = BUILT_PRODUCTS_DIR; };
44
31
  138AE09D22A7ACA600F403E1 /* RNNVExtensionService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNVExtensionService.h; sourceTree = "<group>"; };
45
32
  138AE09E22A7ACA600F403E1 /* RNNVExtensionService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNVExtensionService.m; sourceTree = "<group>"; };
46
33
  13B25F2B22BA35B000C4D0B7 /* RCTNVEventEmitter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RCTNVEventEmitter.h; sourceTree = "<group>"; };
47
34
  13B25F2C22BA35B000C4D0B7 /* RCTNVEventEmitter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RCTNVEventEmitter.m; sourceTree = "<group>"; };
35
+ 358D55C22B4FD102005B5C25 /* notifyvisitors.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = notifyvisitors.xcframework; sourceTree = "<group>"; };
48
36
  B3E7B5881CC2AC0600A0062D /* RNNotifyvisitors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNNotifyvisitors.h; sourceTree = "<group>"; };
49
37
  B3E7B5891CC2AC0600A0062D /* RNNotifyvisitors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNotifyvisitors.m; sourceTree = "<group>"; };
50
38
  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,8 +43,8 @@
55
43
  isa = PBXFrameworksBuildPhase;
56
44
  buildActionMask = 2147483647;
57
45
  files = (
58
- 07B3E79C2AC2D90C00F0C9F0 /* libnotifyvisitors_6_4_4.a in Frameworks */,
59
46
  DC31F4E523BC9CC900AAB2DB /* SystemConfiguration.framework in Frameworks */,
47
+ 358D55C32B4FD102005B5C25 /* notifyvisitors.xcframework in Frameworks */,
60
48
  );
61
49
  runOnlyForDeploymentPostprocessing = 0;
62
50
  };
@@ -71,30 +59,10 @@
71
59
  name = Products;
72
60
  sourceTree = "<group>";
73
61
  };
74
- 253C98EC26411B0A00F2E8C9 /* Assets */ = {
75
- isa = PBXGroup;
76
- children = (
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
- );
89
- path = Assets;
90
- sourceTree = "<group>";
91
- };
92
62
  58B511D21A9E6C8500147676 = {
93
63
  isa = PBXGroup;
94
64
  children = (
95
- 07B3E79A2AC2D90B00F0C9F0 /* libnotifyvisitors_6_4_4.a */,
96
- 07B3E79B2AC2D90C00F0C9F0 /* notifyvisitors.h */,
97
- 253C98EC26411B0A00F2E8C9 /* Assets */,
65
+ 358D55C22B4FD102005B5C25 /* notifyvisitors.xcframework */,
98
66
  DC4962D123BE131B005E63F5 /* RNNotifyvisitors */,
99
67
  134814211AA4EA7D00B7C361 /* Products */,
100
68
  DC31F4E323BC9CC900AAB2DB /* Frameworks */,
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>AvailableLibraries</key>
6
+ <array>
7
+ <dict>
8
+ <key>LibraryIdentifier</key>
9
+ <string>ios-arm64_x86_64-simulator</string>
10
+ <key>LibraryPath</key>
11
+ <string>notifyvisitors.framework</string>
12
+ <key>SupportedArchitectures</key>
13
+ <array>
14
+ <string>arm64</string>
15
+ <string>x86_64</string>
16
+ </array>
17
+ <key>SupportedPlatform</key>
18
+ <string>ios</string>
19
+ <key>SupportedPlatformVariant</key>
20
+ <string>simulator</string>
21
+ </dict>
22
+ <dict>
23
+ <key>LibraryIdentifier</key>
24
+ <string>ios-arm64</string>
25
+ <key>LibraryPath</key>
26
+ <string>notifyvisitors.framework</string>
27
+ <key>SupportedArchitectures</key>
28
+ <array>
29
+ <string>arm64</string>
30
+ </array>
31
+ <key>SupportedPlatform</key>
32
+ <string>ios</string>
33
+ </dict>
34
+ </array>
35
+ <key>CFBundlePackageType</key>
36
+ <string>XFWK</string>
37
+ <key>XCFrameworkFormatVersion</key>
38
+ <string>1.0</string>
39
+ </dict>
40
+ </plist>