pushwoosh-react-native-plugin 6.1.30 → 6.1.31
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 +1 -1
- package/pushwoosh-react-native-plugin.podspec +1 -1
- package/src/android/build.gradle +1 -1
- package/src/ios/PWMessaging.h +1 -1
- package/src/ios/PWNotificationExtensionManager.h +6 -3
- package/src/ios/PushNotificationManager.h +22 -0
- package/src/ios/Pushwoosh.h +55 -1
- package/src/ios/libPushwoosh.a +0 -0
package/package.json
CHANGED
package/src/android/build.gradle
CHANGED
package/src/ios/PWMessaging.h
CHANGED
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
#if TARGET_OS_IOS
|
|
14
14
|
#import "PWAppDelegate.h"
|
|
15
|
+
#import "PWNotificationExtensionManager.h"
|
|
15
16
|
#import "PWRichMediaManager.h"
|
|
16
17
|
#import "PWRichMediaStyle.h"
|
|
17
18
|
#import "PWInbox.h"
|
|
18
19
|
#import "PWInlineInAppView.h"
|
|
19
|
-
#import "PWNotificationExtensionManager.h"
|
|
20
20
|
#endif
|
|
@@ -35,12 +35,15 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
35
35
|
self.contentHandler = contentHandler;
|
|
36
36
|
self.bestAttemptContent = [request.content mutableCopy];
|
|
37
37
|
|
|
38
|
-
[[PWNotificationExtensionManager sharedManager] handleNotificationRequest:request
|
|
38
|
+
[[PWNotificationExtensionManager sharedManager] handleNotificationRequest:request
|
|
39
|
+
withAppGroups:@"group.com.example_domain.example_app_name"
|
|
40
|
+
contentHandler:contentHandler];
|
|
39
41
|
}
|
|
40
42
|
@endcode
|
|
41
43
|
*/
|
|
42
|
-
- (void)handleNotificationRequest:(UNNotificationRequest *)request
|
|
43
|
-
|
|
44
|
+
- (void)handleNotificationRequest:(UNNotificationRequest *)request
|
|
45
|
+
withAppGroups:(NSString * _Nonnull)appGroupsName
|
|
46
|
+
contentHandler:(void (^ _Nonnull)(UNNotificationContent * _Nonnull))contentHandler;
|
|
44
47
|
@end
|
|
45
48
|
|
|
46
49
|
NS_ASSUME_NONNULL_END
|
|
@@ -207,6 +207,28 @@ typedef void (^PushwooshErrorHandler)(NSError *error);
|
|
|
207
207
|
*/
|
|
208
208
|
+ (NSDictionary *)appendValuesToListTag:(NSArray<NSString *> *)array;
|
|
209
209
|
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
Creates a dictionary for removing Tag’s values from existing values list
|
|
213
|
+
|
|
214
|
+
Example:
|
|
215
|
+
|
|
216
|
+
@code
|
|
217
|
+
NSDictionary *tags = @{
|
|
218
|
+
@"Alias" : aliasField.text,
|
|
219
|
+
@"FavNumber" : @([favNumField.text intValue]),
|
|
220
|
+
@"List" : [PWTags removeValuesFromListTag:@[ @"Item1" ]]
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
[[PushNotificationManager pushManager] setTags:tags];
|
|
224
|
+
@endcode
|
|
225
|
+
|
|
226
|
+
@param array Array of values to be removed from the tag.
|
|
227
|
+
|
|
228
|
+
@return Dictionary to be sent as the value for the tag
|
|
229
|
+
*/
|
|
230
|
+
+ (NSDictionary *)removeValuesFromListTag:(NSArray<NSString *> *)array;
|
|
231
|
+
|
|
210
232
|
@end
|
|
211
233
|
|
|
212
234
|
/**
|
package/src/ios/Pushwoosh.h
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
#endif
|
|
20
20
|
|
|
21
|
-
#define PUSHWOOSH_VERSION @"6.5.
|
|
21
|
+
#define PUSHWOOSH_VERSION @"6.5.11"
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
|
|
@@ -243,6 +243,13 @@ Tells the delegate that the user has pressed on the push notification banner.
|
|
|
243
243
|
- (void)registerForPushNotifications;
|
|
244
244
|
- (void)registerForPushNotificationsWithCompletion:(PushwooshRegistrationHandler _Nullable )completion;
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
Registers for push notifications with custom tags. By default registeres for "UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert" flags.
|
|
248
|
+
Automatically detects if you have "newsstand-content" in "UIBackgroundModes" and adds "UIRemoteNotificationTypeNewsstandContentAvailability" flag.
|
|
249
|
+
*/
|
|
250
|
+
- (void)registerForPushNotificationsWith:(NSDictionary * _Nonnull)tags;
|
|
251
|
+
- (void)registerForPushNotificationsWith:(NSDictionary * _Nonnull)tags completion:(PushwooshRegistrationHandler _Nullable )completion;
|
|
252
|
+
|
|
246
253
|
/**
|
|
247
254
|
Unregisters from push notifications.
|
|
248
255
|
*/
|
|
@@ -513,6 +520,32 @@ Unregisters from push notifications.
|
|
|
513
520
|
- (BOOL)handleOpenURL:(NSURL * _Nonnull)url;
|
|
514
521
|
#endif
|
|
515
522
|
|
|
523
|
+
/**
|
|
524
|
+
Sends push to start live activity token to the server.
|
|
525
|
+
Call this method when you want to initiate live activity via push notification
|
|
526
|
+
|
|
527
|
+
Example:
|
|
528
|
+
@code
|
|
529
|
+
|
|
530
|
+
if #available(iOS 17.2, *) {
|
|
531
|
+
Task {
|
|
532
|
+
for await data in Activity<LiveActivityAttributes>.pushToStartTokenUpdates {
|
|
533
|
+
let token = data.map { String(format: "%02x", $0) }.joined()
|
|
534
|
+
do {
|
|
535
|
+
try await Pushwoosh.sharedInstance().sendPush(toStartLiveActivityToken: token)
|
|
536
|
+
} catch {
|
|
537
|
+
print("Error sending push to start live activity: \(error)")
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
@endcode
|
|
544
|
+
*/
|
|
545
|
+
|
|
546
|
+
- (void)sendPushToStartLiveActivityToken:(NSString *_Nullable)token;
|
|
547
|
+
- (void)sendPushToStartLiveActivityToken:(NSString *_Nullable)token completion:(void (^ _Nullable)(NSError * _Nullable))completion;
|
|
548
|
+
|
|
516
549
|
/**
|
|
517
550
|
Sends live activity token to the server.
|
|
518
551
|
Call this method when you create a live activity.
|
|
@@ -627,4 +660,25 @@ Unregisters from push notifications.
|
|
|
627
660
|
*/
|
|
628
661
|
+ (NSDictionary * _Nullable)appendValuesToListTag:(NSArray<NSString *> * _Nonnull)array;
|
|
629
662
|
|
|
663
|
+
/**
|
|
664
|
+
Creates a dictionary for removing Tag’s values from existing values list
|
|
665
|
+
|
|
666
|
+
Example:
|
|
667
|
+
|
|
668
|
+
@code
|
|
669
|
+
NSDictionary *tags = @{
|
|
670
|
+
@"Alias" : aliasField.text,
|
|
671
|
+
@"FavNumber" : @([favNumField.text intValue]),
|
|
672
|
+
@"List" : [PWTags removeValuesFromListTag:@[ @"Item1" ]]
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
[[PushNotificationManager pushManager] setTags:tags];
|
|
676
|
+
@endcode
|
|
677
|
+
|
|
678
|
+
@param array Array of values to be removed from the tag.
|
|
679
|
+
|
|
680
|
+
@return Dictionary to be sent as the value for the tag
|
|
681
|
+
*/
|
|
682
|
+
+ (NSDictionary * _Nullable)removeValuesFromListTag:(NSArray<NSString *> * _Nonnull)array;
|
|
683
|
+
|
|
630
684
|
@end
|
package/src/ios/libPushwoosh.a
CHANGED
|
Binary file
|