pushwoosh-react-native-plugin 6.1.26 → 6.1.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushwoosh-react-native-plugin",
3
- "version": "6.1.26",
3
+ "version": "6.1.27",
4
4
  "description": "This plugin allows you to send and receive push notifications. Powered by Pushwoosh (www.pushwoosh.com).",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = "pushwoosh-react-native-plugin"
3
- s.version = "6.1.26"
3
+ s.version = "6.1.27"
4
4
  s.summary = "React Native Pushwoosh Push Notifications module"
5
5
  s.requires_arc = true
6
6
  s.author = 'Pushwoosh'
@@ -37,7 +37,7 @@ android {
37
37
  }
38
38
 
39
39
  ext {
40
- pushwoosh = "6.7.1"
40
+ pushwoosh = "6.7.2"
41
41
  }
42
42
 
43
43
  dependencies {
@@ -18,7 +18,7 @@
18
18
 
19
19
  #endif
20
20
 
21
- #define PUSHWOOSH_VERSION @"6.5.5"
21
+ #define PUSHWOOSH_VERSION @"6.5.7"
22
22
 
23
23
 
24
24
  @class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
@@ -365,6 +365,13 @@ Unregisters from push notifications.
365
365
  */
366
366
  - (NSString * _Nonnull)getHWID;
367
367
 
368
+ /**
369
+ Gets UserId.
370
+
371
+ @return userId. If the userId hasn't been set previously, then the userId is assigned the HWID.
372
+ */
373
+ - (NSString * _Nonnull)getUserId;
374
+
368
375
  /**
369
376
  Returns dictionary with enabled remove notificaton types.
370
377
 
@@ -26,6 +26,6 @@
26
26
  #import "PWInbox.h"
27
27
  #endif
28
28
 
29
- @interface PushwooshPlugin: RCTEventEmitter<RCTBridgeModule,PushNotificationDelegate>
29
+ @interface PushwooshPlugin: RCTEventEmitter<RCTBridgeModule, PushNotificationDelegate, UIApplicationDelegate>
30
30
 
31
31
  @end
@@ -71,6 +71,7 @@ RCT_EXPORT_METHOD(init:(NSDictionary*)config success:(RCTResponseSenderBlock)suc
71
71
  [PushNotificationManager initializeWithAppCode:appCode appName:nil];
72
72
  [[PushNotificationManager pushManager] sendAppOpen];
73
73
  [PushNotificationManager pushManager].delegate = self;
74
+ [[UIApplication sharedApplication] setDelegate:self];
74
75
 
75
76
  // We set Pushwoosh UNUserNotificationCenter delegate unless CUSTOM is specified in the config
76
77
  if(![notificationHandling isEqualToString:@"CUSTOM"]) {
@@ -331,9 +332,17 @@ RCT_EXPORT_METHOD(performAction:(NSString*)code) {
331
332
  [PWInbox performActionForMessageWithCode:code];
332
333
  }
333
334
 
334
- #pragma mark - UNUserNotificationCenter Delegate Methods
335
+ #pragma mark - UIApplicationDelegate Methods
335
336
  #pragma mark -
336
337
 
338
+ - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
339
+ [[Pushwoosh sharedInstance] handlePushRegistration:deviceToken];
340
+ }
341
+
342
+ - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
343
+ [[Pushwoosh sharedInstance] handlePushRegistrationFailure:error];
344
+ }
345
+
337
346
  #pragma mark - UNUserNotificationCenter Delegate Methods
338
347
  #pragma mark -
339
348
 
Binary file