reactnative-plugin-appice 1.7.12 → 1.7.14

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 (109) hide show
  1. package/README.md +37 -37
  2. package/android/README.md +14 -14
  3. package/android/build.gradle +151 -151
  4. package/android/gitignore +47 -47
  5. package/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  6. package/android/gradlew +234 -234
  7. package/android/local.properties +8 -8
  8. package/android/src/main/AndroidManifest.xml +153 -153
  9. package/android/src/main/java/com/reactlibrary/AppICEUtils.java +241 -241
  10. package/android/src/main/java/com/reactlibrary/AppIceReactPluginModule.java +748 -748
  11. package/android/src/main/java/com/reactlibrary/AppIceReactPluginPackage.java +28 -28
  12. package/android/src/main/java/com/reactlibrary/CampaignCampsReceiver.java +56 -56
  13. package/android/src/main/java/com/reactlibrary/EnumConstants.java +256 -256
  14. package/android/src/main/java/com/reactlibrary/NotificationEventService.java +59 -59
  15. package/android/src/main/java/com/reactlibrary/StringConstants.java +9 -9
  16. package/example/App.js +292 -273
  17. package/example/Gemfile +6 -6
  18. package/example/__tests__/App-test.js +14 -14
  19. package/example/ancilliary.js +474 -327
  20. package/example/android/.gradle/7.3.3/checksums/checksums.lock +0 -0
  21. package/example/android/.gradle/7.3.3/fileChanges/last-build.bin +0 -0
  22. package/example/android/.gradle/7.3.3/fileHashes/fileHashes.lock +0 -0
  23. package/example/android/.gradle/7.3.3/gc.properties +0 -0
  24. package/example/android/.gradle/vcs-1/gc.properties +0 -0
  25. package/example/android/app/_BUCK +55 -55
  26. package/example/android/app/build.gradle +320 -322
  27. package/example/android/app/build_defs.bzl +19 -19
  28. package/example/android/app/proguard-rules.pro +10 -10
  29. package/example/android/app/src/debug/AndroidManifest.xml +13 -13
  30. package/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +73 -73
  31. package/example/android/app/src/main/AndroidManifest.xml +72 -72
  32. package/example/android/app/src/main/java/com/example/MainActivity.java +48 -48
  33. package/example/android/app/src/main/java/com/example/MainApplication.java +91 -95
  34. package/example/android/app/src/main/java/com/example/newarchitecture/MainApplicationReactNativeHost.java +116 -116
  35. package/example/android/app/src/main/java/com/example/newarchitecture/components/MainComponentsRegistry.java +36 -36
  36. package/example/android/app/src/main/java/com/example/newarchitecture/modules/MainApplicationTurboModuleManagerDelegate.java +48 -48
  37. package/example/android/app/src/main/jni/Android.mk +48 -48
  38. package/example/android/app/src/main/jni/MainApplicationModuleProvider.cpp +24 -24
  39. package/example/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -16
  40. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -45
  41. package/example/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -38
  42. package/example/android/app/src/main/jni/MainComponentsRegistry.cpp +61 -61
  43. package/example/android/app/src/main/jni/MainComponentsRegistry.h +32 -32
  44. package/example/android/app/src/main/jni/OnLoad.cpp +11 -11
  45. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -36
  46. package/example/android/app/src/main/res/values/strings.xml +3 -3
  47. package/example/android/app/src/main/res/values/styles.xml +9 -9
  48. package/example/android/build.gradle +73 -73
  49. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  50. package/example/android/gradle.properties +40 -40
  51. package/example/android/gradlew +234 -234
  52. package/example/android/settings.gradle +11 -11
  53. package/example/app.json +3 -3
  54. package/example/babel.config.js +3 -3
  55. package/example/index.js +9 -9
  56. package/example/ios/Podfile +44 -44
  57. package/example/ios/Podfile.lock +561 -561
  58. package/example/ios/_xcode.env +11 -11
  59. package/example/ios/example/AppDelegate.h +8 -8
  60. package/example/ios/example/AppDelegate.mm +174 -174
  61. package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +53 -53
  62. package/example/ios/example/Images.xcassets/Contents.json +6 -6
  63. package/example/ios/example/Info.plist +62 -62
  64. package/example/ios/example/LaunchScreen.storyboard +47 -47
  65. package/example/ios/example/example.entitlements +8 -8
  66. package/example/ios/example/main.m +10 -10
  67. package/example/ios/example.xcodeproj/project.pbxproj +712 -712
  68. package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +88 -88
  69. package/example/ios/example.xcworkspace/contents.xcworkspacedata +10 -10
  70. package/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  71. package/example/ios/exampleTests/Info.plist +24 -24
  72. package/example/ios/exampleTests/exampleTests.m +66 -66
  73. package/example/metro.config.js +17 -17
  74. package/example/package.json +36 -34
  75. package/example/yarn.lock +7176 -0
  76. package/index.js +485 -401
  77. package/ios/AppICEReactEvent.h +23 -23
  78. package/ios/AppICEReactEvent.m +86 -86
  79. package/ios/AppIceReactPlugin.h +59 -59
  80. package/ios/AppIceReactPlugin.m +641 -641
  81. package/ios/AppIceReactPlugin.xcodeproj/project.pbxproj +364 -364
  82. package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +4 -4
  83. package/ios/AppIceReactPlugin.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  84. package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  85. package/ios/AppIceReactPlugin.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  86. package/ios/AppIceReactPlugin.xcworkspace/contents.xcworkspacedata +10 -10
  87. package/ios/AppIceReactPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -8
  88. package/ios/AppIceReactPlugin.xcworkspace/xcuserdata/artherajesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  89. package/ios/Podfile +10 -10
  90. package/ios/Podfile.lock +3 -3
  91. package/ios/Pods/Manifest.lock +3 -3
  92. package/ios/Pods/Pods.xcodeproj/project.pbxproj +395 -395
  93. package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/Pods-AppIceReactPlugin.xcscheme +58 -58
  94. package/ios/Pods/Pods.xcodeproj/xcuserdata/Adi.xcuserdatad/xcschemes/xcschememanagement.plist +18 -18
  95. package/ios/Pods/Pods.xcodeproj/xcuserdata/artherajesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -14
  96. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-Info.plist +26 -26
  97. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.markdown +3 -3
  98. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-acknowledgements.plist +29 -29
  99. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-dummy.m +5 -5
  100. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin-umbrella.h +16 -16
  101. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.debug.xcconfig +6 -6
  102. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.modulemap +6 -6
  103. package/ios/Pods/Target Support Files/Pods-AppIceReactPlugin/Pods-AppIceReactPlugin.release.xcconfig +6 -6
  104. package/package.json +41 -40
  105. package/reactnative-plugin-appice.podspec +30 -30
  106. package/example/HelloWorldApp.js +0 -483
  107. package/example/android/app/google-services.json +0 -275
  108. package/example/android/local.properties +0 -8
  109. package/example/package-lock.json +0 -16722
@@ -1,11 +1,11 @@
1
- # This `.xcode.env` file is versioned and is used to source the environment
2
- # used when running script phases inside Xcode.
3
- # To customize your local environment, you can create an `.xcode.env.local`
4
- # file that is not versioned.
5
-
6
- # NODE_BINARY variable contains the PATH to the node executable.
7
- #
8
- # Customize the NODE_BINARY variable here.
9
- # For example, to use nvm with brew, add the following line
10
- # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
- export NODE_BINARY=$(command -v node)
1
+ # This `.xcode.env` file is versioned and is used to source the environment
2
+ # used when running script phases inside Xcode.
3
+ # To customize your local environment, you can create an `.xcode.env.local`
4
+ # file that is not versioned.
5
+
6
+ # NODE_BINARY variable contains the PATH to the node executable.
7
+ #
8
+ # Customize the NODE_BINARY variable here.
9
+ # For example, to use nvm with brew, add the following line
10
+ # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
+ export NODE_BINARY=$(command -v node)
@@ -1,8 +1,8 @@
1
- #import <React/RCTBridgeDelegate.h>
2
- #import <UIKit/UIKit.h>
3
- #import <UserNotifications/UserNotifications.h>
4
- @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate,UNUserNotificationCenterDelegate>
5
-
6
- @property (nonatomic, strong) UIWindow *window;
7
-
8
- @end
1
+ #import <React/RCTBridgeDelegate.h>
2
+ #import <UIKit/UIKit.h>
3
+ #import <UserNotifications/UserNotifications.h>
4
+ @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate,UNUserNotificationCenterDelegate>
5
+
6
+ @property (nonatomic, strong) UIWindow *window;
7
+
8
+ @end
@@ -1,174 +1,174 @@
1
- #import "AppDelegate.h"
2
-
3
- #import <React/RCTBridge.h>
4
- #import <React/RCTBundleURLProvider.h>
5
- #import <React/RCTRootView.h>
6
- #import "AppIceReactPlugin.h"
7
- #import "AppICEReactEvent.h"
8
- #import <React/RCTAppSetupUtils.h>
9
-
10
- #if RCT_NEW_ARCH_ENABLED
11
- #import <React/CoreModulesPlugins.h>
12
- #import <React/RCTCxxBridgeDelegate.h>
13
- #import <React/RCTFabricSurfaceHostingProxyRootView.h>
14
- #import <React/RCTSurfacePresenter.h>
15
- #import <React/RCTSurfacePresenterBridgeAdapter.h>
16
- #import <ReactCommon/RCTTurboModuleManager.h>
17
-
18
- #import <react/config/ReactNativeConfig.h>
19
-
20
- static NSString *const kRNConcurrentRoot = @"concurrentRoot";
21
-
22
- @interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
23
- RCTTurboModuleManager *_turboModuleManager;
24
- RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
25
- std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
26
- facebook::react::ContextContainer::Shared _contextContainer;
27
- }
28
- @end
29
- #endif
30
-
31
- @implementation AppDelegate
32
-
33
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
34
- {
35
- RCTAppSetupPrepareApp(application);
36
-
37
- RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
38
-
39
- #if RCT_NEW_ARCH_ENABLED
40
- _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
41
- _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
42
- _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
43
- _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
44
- bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
45
- #endif
46
-
47
- NSDictionary *initProps = [self prepareInitialProps];
48
- UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"example", initProps);
49
-
50
- if (@available(iOS 13.0, *)) {
51
- rootView.backgroundColor = [UIColor systemBackgroundColor];
52
- } else {
53
- rootView.backgroundColor = [UIColor whiteColor];
54
- }
55
-
56
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
57
- UIViewController *rootViewController = [UIViewController new];
58
- rootViewController.view = rootView;
59
- self.window.rootViewController = rootViewController;
60
- [self.window makeKeyAndVisible];
61
-
62
- // Define UNUserNotificationCenter
63
- UNUserNotificationCenter *center =
64
- [UNUserNotificationCenter currentNotificationCenter];
65
- center.delegate = self;
66
-
67
- return YES;
68
- }
69
-
70
- /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
71
- ///
72
- /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
73
- /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
74
- /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
75
- - (BOOL)concurrentRootEnabled
76
- {
77
- // Switch this bool to turn on and off the concurrent root
78
- return true;
79
- }
80
-
81
- - (NSDictionary *)prepareInitialProps
82
- {
83
- NSMutableDictionary *initProps = [NSMutableDictionary new];
84
-
85
- #ifdef RCT_NEW_ARCH_ENABLED
86
- initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
87
- #endif
88
-
89
- return initProps;
90
- }
91
-
92
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
93
- {
94
- #if DEBUG
95
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
96
- #else
97
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
98
- #endif
99
- }
100
-
101
- #if RCT_NEW_ARCH_ENABLED
102
-
103
- #pragma mark - RCTCxxBridgeDelegate
104
-
105
- - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
106
- {
107
- _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
108
- delegate:self
109
- jsInvoker:bridge.jsCallInvoker];
110
- return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
111
- }
112
-
113
- #pragma mark RCTTurboModuleManagerDelegate
114
-
115
- - (Class)getModuleClassFromName:(const char *)name
116
- {
117
- return RCTCoreModulesClassProvider(name);
118
- }
119
-
120
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
121
- jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
122
- {
123
- return nullptr;
124
- }
125
-
126
- - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
127
- initParams:
128
- (const facebook::react::ObjCTurboModule::InitParams &)params
129
- {
130
- return nullptr;
131
- }
132
-
133
- - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
134
- {
135
- return RCTAppSetupDefaultModuleFromClass(moduleClass);
136
- }
137
-
138
- #endif
139
-
140
- - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
141
- {
142
- NSLog(@"token is : %@",deviceToken);
143
- [AppIceReactPlugin didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
144
- }
145
- - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
146
- {
147
- NSLog(@"%@ = %@", NSStringFromSelector(_cmd), error);
148
- NSLog(@"Failed to get token, Error: %@", error);
149
- }
150
- -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
151
- NSLog(@"received payload =%@",userInfo);
152
- [AppIceReactPlugin pushNotificationReceived:userInfo];
153
-
154
- }
155
-
156
- - (void)userNotificationCenter:(UNUserNotificationCenter *)center
157
- didReceiveNotificationResponse:(UNNotificationResponse *)response
158
- withCompletionHandler:(void (^)(void))completionHandler {
159
-
160
- [AppIceReactPlugin pushNotificationClicked:response.notification.request.content.userInfo];
161
-
162
- completionHandler();
163
- }
164
-
165
- // Called when a notification is delivered to a foreground app.
166
- - (void)userNotificationCenter:(UNUserNotificationCenter *)center
167
- willPresentNotification:(UNNotification *)notification
168
- withCompletionHandler:
169
- (void (^)(UNNotificationPresentationOptions options))
170
- completionHandler {
171
- completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionBadge |
172
- UNNotificationPresentationOptionAlert);
173
- }
174
- @end
1
+ #import "AppDelegate.h"
2
+
3
+ #import <React/RCTBridge.h>
4
+ #import <React/RCTBundleURLProvider.h>
5
+ #import <React/RCTRootView.h>
6
+ #import "AppIceReactPlugin.h"
7
+ #import "AppICEReactEvent.h"
8
+ #import <React/RCTAppSetupUtils.h>
9
+
10
+ #if RCT_NEW_ARCH_ENABLED
11
+ #import <React/CoreModulesPlugins.h>
12
+ #import <React/RCTCxxBridgeDelegate.h>
13
+ #import <React/RCTFabricSurfaceHostingProxyRootView.h>
14
+ #import <React/RCTSurfacePresenter.h>
15
+ #import <React/RCTSurfacePresenterBridgeAdapter.h>
16
+ #import <ReactCommon/RCTTurboModuleManager.h>
17
+
18
+ #import <react/config/ReactNativeConfig.h>
19
+
20
+ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
21
+
22
+ @interface AppDelegate () <RCTCxxBridgeDelegate, RCTTurboModuleManagerDelegate> {
23
+ RCTTurboModuleManager *_turboModuleManager;
24
+ RCTSurfacePresenterBridgeAdapter *_bridgeAdapter;
25
+ std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
26
+ facebook::react::ContextContainer::Shared _contextContainer;
27
+ }
28
+ @end
29
+ #endif
30
+
31
+ @implementation AppDelegate
32
+
33
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
34
+ {
35
+ RCTAppSetupPrepareApp(application);
36
+
37
+ RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
38
+
39
+ #if RCT_NEW_ARCH_ENABLED
40
+ _contextContainer = std::make_shared<facebook::react::ContextContainer const>();
41
+ _reactNativeConfig = std::make_shared<facebook::react::EmptyReactNativeConfig const>();
42
+ _contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
43
+ _bridgeAdapter = [[RCTSurfacePresenterBridgeAdapter alloc] initWithBridge:bridge contextContainer:_contextContainer];
44
+ bridge.surfacePresenter = _bridgeAdapter.surfacePresenter;
45
+ #endif
46
+
47
+ NSDictionary *initProps = [self prepareInitialProps];
48
+ UIView *rootView = RCTAppSetupDefaultRootView(bridge, @"example", initProps);
49
+
50
+ if (@available(iOS 13.0, *)) {
51
+ rootView.backgroundColor = [UIColor systemBackgroundColor];
52
+ } else {
53
+ rootView.backgroundColor = [UIColor whiteColor];
54
+ }
55
+
56
+ self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
57
+ UIViewController *rootViewController = [UIViewController new];
58
+ rootViewController.view = rootView;
59
+ self.window.rootViewController = rootViewController;
60
+ [self.window makeKeyAndVisible];
61
+
62
+ // Define UNUserNotificationCenter
63
+ UNUserNotificationCenter *center =
64
+ [UNUserNotificationCenter currentNotificationCenter];
65
+ center.delegate = self;
66
+
67
+ return YES;
68
+ }
69
+
70
+ /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
71
+ ///
72
+ /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
73
+ /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
74
+ /// @return: `true` if the `concurrentRoot` feture is enabled. Otherwise, it returns `false`.
75
+ - (BOOL)concurrentRootEnabled
76
+ {
77
+ // Switch this bool to turn on and off the concurrent root
78
+ return true;
79
+ }
80
+
81
+ - (NSDictionary *)prepareInitialProps
82
+ {
83
+ NSMutableDictionary *initProps = [NSMutableDictionary new];
84
+
85
+ #ifdef RCT_NEW_ARCH_ENABLED
86
+ initProps[kRNConcurrentRoot] = @([self concurrentRootEnabled]);
87
+ #endif
88
+
89
+ return initProps;
90
+ }
91
+
92
+ - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
93
+ {
94
+ #if DEBUG
95
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
96
+ #else
97
+ return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
98
+ #endif
99
+ }
100
+
101
+ #if RCT_NEW_ARCH_ENABLED
102
+
103
+ #pragma mark - RCTCxxBridgeDelegate
104
+
105
+ - (std::unique_ptr<facebook::react::JSExecutorFactory>)jsExecutorFactoryForBridge:(RCTBridge *)bridge
106
+ {
107
+ _turboModuleManager = [[RCTTurboModuleManager alloc] initWithBridge:bridge
108
+ delegate:self
109
+ jsInvoker:bridge.jsCallInvoker];
110
+ return RCTAppSetupDefaultJsExecutorFactory(bridge, _turboModuleManager);
111
+ }
112
+
113
+ #pragma mark RCTTurboModuleManagerDelegate
114
+
115
+ - (Class)getModuleClassFromName:(const char *)name
116
+ {
117
+ return RCTCoreModulesClassProvider(name);
118
+ }
119
+
120
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
121
+ jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
122
+ {
123
+ return nullptr;
124
+ }
125
+
126
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
127
+ initParams:
128
+ (const facebook::react::ObjCTurboModule::InitParams &)params
129
+ {
130
+ return nullptr;
131
+ }
132
+
133
+ - (id<RCTTurboModule>)getModuleInstanceFromClass:(Class)moduleClass
134
+ {
135
+ return RCTAppSetupDefaultModuleFromClass(moduleClass);
136
+ }
137
+
138
+ #endif
139
+
140
+ - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken
141
+ {
142
+ NSLog(@"token is : %@",deviceToken);
143
+ [AppIceReactPlugin didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
144
+ }
145
+ - (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error
146
+ {
147
+ NSLog(@"%@ = %@", NSStringFromSelector(_cmd), error);
148
+ NSLog(@"Failed to get token, Error: %@", error);
149
+ }
150
+ -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
151
+ NSLog(@"received payload =%@",userInfo);
152
+ [AppIceReactPlugin pushNotificationReceived:userInfo];
153
+
154
+ }
155
+
156
+ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
157
+ didReceiveNotificationResponse:(UNNotificationResponse *)response
158
+ withCompletionHandler:(void (^)(void))completionHandler {
159
+
160
+ [AppIceReactPlugin pushNotificationClicked:response.notification.request.content.userInfo];
161
+
162
+ completionHandler();
163
+ }
164
+
165
+ // Called when a notification is delivered to a foreground app.
166
+ - (void)userNotificationCenter:(UNUserNotificationCenter *)center
167
+ willPresentNotification:(UNNotification *)notification
168
+ withCompletionHandler:
169
+ (void (^)(UNNotificationPresentationOptions options))
170
+ completionHandler {
171
+ completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionBadge |
172
+ UNNotificationPresentationOptionAlert);
173
+ }
174
+ @end
@@ -1,53 +1,53 @@
1
- {
2
- "images" : [
3
- {
4
- "idiom" : "iphone",
5
- "scale" : "2x",
6
- "size" : "20x20"
7
- },
8
- {
9
- "idiom" : "iphone",
10
- "scale" : "3x",
11
- "size" : "20x20"
12
- },
13
- {
14
- "idiom" : "iphone",
15
- "scale" : "2x",
16
- "size" : "29x29"
17
- },
18
- {
19
- "idiom" : "iphone",
20
- "scale" : "3x",
21
- "size" : "29x29"
22
- },
23
- {
24
- "idiom" : "iphone",
25
- "scale" : "2x",
26
- "size" : "40x40"
27
- },
28
- {
29
- "idiom" : "iphone",
30
- "scale" : "3x",
31
- "size" : "40x40"
32
- },
33
- {
34
- "idiom" : "iphone",
35
- "scale" : "2x",
36
- "size" : "60x60"
37
- },
38
- {
39
- "idiom" : "iphone",
40
- "scale" : "3x",
41
- "size" : "60x60"
42
- },
43
- {
44
- "idiom" : "ios-marketing",
45
- "scale" : "1x",
46
- "size" : "1024x1024"
47
- }
48
- ],
49
- "info" : {
50
- "author" : "xcode",
51
- "version" : 1
52
- }
53
- }
1
+ {
2
+ "images" : [
3
+ {
4
+ "idiom" : "iphone",
5
+ "scale" : "2x",
6
+ "size" : "20x20"
7
+ },
8
+ {
9
+ "idiom" : "iphone",
10
+ "scale" : "3x",
11
+ "size" : "20x20"
12
+ },
13
+ {
14
+ "idiom" : "iphone",
15
+ "scale" : "2x",
16
+ "size" : "29x29"
17
+ },
18
+ {
19
+ "idiom" : "iphone",
20
+ "scale" : "3x",
21
+ "size" : "29x29"
22
+ },
23
+ {
24
+ "idiom" : "iphone",
25
+ "scale" : "2x",
26
+ "size" : "40x40"
27
+ },
28
+ {
29
+ "idiom" : "iphone",
30
+ "scale" : "3x",
31
+ "size" : "40x40"
32
+ },
33
+ {
34
+ "idiom" : "iphone",
35
+ "scale" : "2x",
36
+ "size" : "60x60"
37
+ },
38
+ {
39
+ "idiom" : "iphone",
40
+ "scale" : "3x",
41
+ "size" : "60x60"
42
+ },
43
+ {
44
+ "idiom" : "ios-marketing",
45
+ "scale" : "1x",
46
+ "size" : "1024x1024"
47
+ }
48
+ ],
49
+ "info" : {
50
+ "author" : "xcode",
51
+ "version" : 1
52
+ }
53
+ }
@@ -1,6 +1,6 @@
1
- {
2
- "info" : {
3
- "version" : 1,
4
- "author" : "xcode"
5
- }
6
- }
1
+ {
2
+ "info" : {
3
+ "version" : 1,
4
+ "author" : "xcode"
5
+ }
6
+ }
@@ -1,62 +1,62 @@
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>CFBundleDevelopmentRegion</key>
6
- <string>en</string>
7
- <key>CFBundleDisplayName</key>
8
- <string>example</string>
9
- <key>CFBundleExecutable</key>
10
- <string>$(EXECUTABLE_NAME)</string>
11
- <key>CFBundleIdentifier</key>
12
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
- <key>CFBundleInfoDictionaryVersion</key>
14
- <string>6.0</string>
15
- <key>CFBundleName</key>
16
- <string>$(PRODUCT_NAME)</string>
17
- <key>CFBundlePackageType</key>
18
- <string>APPL</string>
19
- <key>CFBundleShortVersionString</key>
20
- <string>1.0</string>
21
- <key>CFBundleSignature</key>
22
- <string>????</string>
23
- <key>CFBundleVersion</key>
24
- <string>1</string>
25
- <key>LSRequiresIPhoneOS</key>
26
- <true/>
27
- <key>NSAppTransportSecurity</key>
28
- <dict>
29
- <key>NSExceptionDomains</key>
30
- <dict>
31
- <key>localhost</key>
32
- <dict>
33
- <key>NSExceptionAllowsInsecureHTTPLoads</key>
34
- <true/>
35
- </dict>
36
- </dict>
37
- </dict>
38
- <key>NSLocationWhenInUseUsageDescription</key>
39
- <string></string>
40
- <key>UIBackgroundModes</key>
41
- <array>
42
- <string>fetch</string>
43
- <string>location</string>
44
- <string>processing</string>
45
- <string>remote-notification</string>
46
- </array>
47
- <key>UILaunchStoryboardName</key>
48
- <string>LaunchScreen</string>
49
- <key>UIRequiredDeviceCapabilities</key>
50
- <array>
51
- <string>armv7</string>
52
- </array>
53
- <key>UISupportedInterfaceOrientations</key>
54
- <array>
55
- <string>UIInterfaceOrientationPortrait</string>
56
- <string>UIInterfaceOrientationLandscapeLeft</string>
57
- <string>UIInterfaceOrientationLandscapeRight</string>
58
- </array>
59
- <key>UIViewControllerBasedStatusBarAppearance</key>
60
- <false/>
61
- </dict>
62
- </plist>
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>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleDisplayName</key>
8
+ <string>example</string>
9
+ <key>CFBundleExecutable</key>
10
+ <string>$(EXECUTABLE_NAME)</string>
11
+ <key>CFBundleIdentifier</key>
12
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13
+ <key>CFBundleInfoDictionaryVersion</key>
14
+ <string>6.0</string>
15
+ <key>CFBundleName</key>
16
+ <string>$(PRODUCT_NAME)</string>
17
+ <key>CFBundlePackageType</key>
18
+ <string>APPL</string>
19
+ <key>CFBundleShortVersionString</key>
20
+ <string>1.0</string>
21
+ <key>CFBundleSignature</key>
22
+ <string>????</string>
23
+ <key>CFBundleVersion</key>
24
+ <string>1</string>
25
+ <key>LSRequiresIPhoneOS</key>
26
+ <true/>
27
+ <key>NSAppTransportSecurity</key>
28
+ <dict>
29
+ <key>NSExceptionDomains</key>
30
+ <dict>
31
+ <key>localhost</key>
32
+ <dict>
33
+ <key>NSExceptionAllowsInsecureHTTPLoads</key>
34
+ <true/>
35
+ </dict>
36
+ </dict>
37
+ </dict>
38
+ <key>NSLocationWhenInUseUsageDescription</key>
39
+ <string></string>
40
+ <key>UIBackgroundModes</key>
41
+ <array>
42
+ <string>fetch</string>
43
+ <string>location</string>
44
+ <string>processing</string>
45
+ <string>remote-notification</string>
46
+ </array>
47
+ <key>UILaunchStoryboardName</key>
48
+ <string>LaunchScreen</string>
49
+ <key>UIRequiredDeviceCapabilities</key>
50
+ <array>
51
+ <string>armv7</string>
52
+ </array>
53
+ <key>UISupportedInterfaceOrientations</key>
54
+ <array>
55
+ <string>UIInterfaceOrientationPortrait</string>
56
+ <string>UIInterfaceOrientationLandscapeLeft</string>
57
+ <string>UIInterfaceOrientationLandscapeRight</string>
58
+ </array>
59
+ <key>UIViewControllerBasedStatusBarAppearance</key>
60
+ <false/>
61
+ </dict>
62
+ </plist>