pushwoosh-cordova-plugin 8.3.22 → 8.3.24
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/README.md
CHANGED
|
@@ -14,13 +14,13 @@ Cross-Platform push notifications by Pushwoosh for Cordova / PhoneGap
|
|
|
14
14
|
Using npm (requires cordova 7.0+):
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
cordova plugin add pushwoosh-cordova-plugin@8.3.
|
|
17
|
+
cordova plugin add pushwoosh-cordova-plugin@8.3.24
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Using git:
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.3.
|
|
23
|
+
cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.3.24
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
#### Phonegap
|
|
@@ -28,7 +28,7 @@ cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git#8.
|
|
|
28
28
|
Using npm (requires phonegap 7.1+):
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
cordova plugin add pushwoosh-cordova-plugin@8.3.
|
|
31
|
+
cordova plugin add pushwoosh-cordova-plugin@8.3.24
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Guide
|
package/README_PGB.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pushwoosh-cordova-plugin",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.24",
|
|
4
4
|
"description": "\n This plugin allows you to send and receive push notifications. Powered by Pushwoosh (www.pushwoosh.com).\n ",
|
|
5
5
|
"main":"www/PushNotification.js",
|
|
6
6
|
"typings":"types/index.d.ts",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="pushwoosh-cordova-plugin" version="8.3.
|
|
2
|
+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="pushwoosh-cordova-plugin" version="8.3.24">
|
|
3
3
|
|
|
4
4
|
<name>Pushwoosh</name>
|
|
5
5
|
|
|
@@ -77,13 +77,13 @@
|
|
|
77
77
|
<framework src="com.github.bumptech.glide:glide:4.10.0" />
|
|
78
78
|
<framework src="org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.60" />
|
|
79
79
|
|
|
80
|
-
<framework src="com.pushwoosh:pushwoosh:6.7.
|
|
81
|
-
<framework src="com.pushwoosh:pushwoosh-amazon:6.7.
|
|
82
|
-
<framework src="com.pushwoosh:pushwoosh-firebase:6.7.
|
|
83
|
-
<framework src="com.pushwoosh:pushwoosh-badge:6.7.
|
|
84
|
-
<framework src="com.pushwoosh:pushwoosh-inbox:6.7.
|
|
85
|
-
<framework src="com.pushwoosh:pushwoosh-inbox-ui:6.7.
|
|
86
|
-
<framework src="com.pushwoosh:pushwoosh-huawei:6.7.
|
|
80
|
+
<framework src="com.pushwoosh:pushwoosh:6.7.4"/>
|
|
81
|
+
<framework src="com.pushwoosh:pushwoosh-amazon:6.7.4"/>
|
|
82
|
+
<framework src="com.pushwoosh:pushwoosh-firebase:6.7.4"/>
|
|
83
|
+
<framework src="com.pushwoosh:pushwoosh-badge:6.7.4"/>
|
|
84
|
+
<framework src="com.pushwoosh:pushwoosh-inbox:6.7.4"/>
|
|
85
|
+
<framework src="com.pushwoosh:pushwoosh-inbox-ui:6.7.4"/>
|
|
86
|
+
<framework src="com.pushwoosh:pushwoosh-huawei:6.7.4"/>
|
|
87
87
|
</platform>
|
|
88
88
|
|
|
89
89
|
<!-- ios -->
|
|
@@ -28,7 +28,7 @@ public class PushwooshNotificationServiceExtension extends NotificationServiceEx
|
|
|
28
28
|
@Override
|
|
29
29
|
protected boolean onMessageReceived(final PushMessage pushMessage) {
|
|
30
30
|
PushNotifications.messageReceived(pushMessage.toJson().toString());
|
|
31
|
-
return (!showForegroundPush &&
|
|
31
|
+
return (!showForegroundPush && !super.onMessageReceived(pushMessage) && isAppOnForeground());
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@Override
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
@end
|
|
47
47
|
|
|
48
|
-
@interface PushNotification() <PWMessagingDelegate>
|
|
48
|
+
@interface PushNotification() <PWMessagingDelegate, UIApplicationDelegate>
|
|
49
49
|
|
|
50
50
|
@property (nonatomic, retain) NSMutableDictionary *callbackIds;
|
|
51
51
|
@property (nonatomic, retain) PushNotificationManager *pushManager;
|
|
@@ -55,6 +55,9 @@
|
|
|
55
55
|
@property (nonatomic, assign) BOOL deviceReady;
|
|
56
56
|
|
|
57
57
|
- (BOOL) application:(UIApplication *)application pwplugin_didRegisterUserNotificationSettings:(UIUserNotificationSettings *)settings;
|
|
58
|
+
- (void) application:(UIApplication *)application pwplugin_didRegisterWithDeviceToken:(NSData *)deviceToken;
|
|
59
|
+
- (void) application:(UIApplication *)application pwplugin_didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
|
60
|
+
- (void) application:(UIApplication *)application pwplugin_didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
|
|
58
61
|
|
|
59
62
|
@end
|
|
60
63
|
|
|
@@ -827,6 +830,30 @@ API_AVAILABLE(ios(10.0)) {
|
|
|
827
830
|
}
|
|
828
831
|
}
|
|
829
832
|
|
|
833
|
+
void pwplugin_didReceiveRemoteNotification(id self, SEL _cmd, UIApplication * application, NSDictionary * userInfo, void (^completionHandler)(UIBackgroundFetchResult)) {
|
|
834
|
+
if ([self respondsToSelector:@selector(application:pwplugin_didReceiveRemoteNotification:fetchCompletionHandler:)]) {
|
|
835
|
+
[self application:application pwplugin_didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
[[Pushwoosh sharedInstance] handlePushReceived:userInfo];
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
void pwplugin_didRegisterWithDeviceToken(id self, SEL _cmd, id application, NSData *deviceToken) {
|
|
842
|
+
if ([self respondsToSelector:@selector(application: pwplugin_didRegisterWithDeviceToken:)]) {
|
|
843
|
+
[self application:application pwplugin_didRegisterWithDeviceToken:deviceToken];
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
[[Pushwoosh sharedInstance] handlePushRegistration:deviceToken];
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
void pwplugin_didFailToRegisterForRemoteNotificationsWithError(id self, SEL _cmd, UIApplication *application, NSError *error) {
|
|
850
|
+
if ([self respondsToSelector:@selector(application:pwplugin_didFailToRegisterForRemoteNotificationsWithError:)]) {
|
|
851
|
+
[self application:application pwplugin_didFailToRegisterForRemoteNotificationsWithError:error];
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
[[Pushwoosh sharedInstance] handlePushRegistrationFailure:error];
|
|
855
|
+
}
|
|
856
|
+
|
|
830
857
|
BOOL pwplugin_didRegisterUserNotificationSettings(id self, SEL _cmd, id application, id notificationSettings) {
|
|
831
858
|
PushNotification *pushHandler = pw_PushNotificationPlugin;
|
|
832
859
|
|
|
@@ -876,6 +903,9 @@ BOOL pwplugin_didRegisterUserNotificationSettings(id self, SEL _cmd, id applicat
|
|
|
876
903
|
appDelegateClass = [delegate class];
|
|
877
904
|
|
|
878
905
|
pushwoosh_swizzle([delegate class], @selector(application:didRegisterUserNotificationSettings:), @selector(application:pwplugin_didRegisterUserNotificationSettings:), (IMP)pwplugin_didRegisterUserNotificationSettings, "v@:::");
|
|
906
|
+
pushwoosh_swizzle([delegate class], @selector(application:didRegisterForRemoteNotificationsWithDeviceToken:), @selector(application:pwplugin_didRegisterWithDeviceToken:), (IMP)pwplugin_didRegisterWithDeviceToken, "v@:::");
|
|
907
|
+
pushwoosh_swizzle([delegate class], @selector(application:didFailToRegisterForRemoteNotificationsWithError:), @selector(application:pwplugin_didFailToRegisterForRemoteNotificationsWithError:), (IMP)pwplugin_didFailToRegisterForRemoteNotificationsWithError, "v@:::");
|
|
908
|
+
pushwoosh_swizzle([delegate class], @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:), @selector(application:pwplugin_didReceiveRemoteNotification:fetchCompletionHandler:), (IMP)pwplugin_didReceiveRemoteNotification, "v@::::");
|
|
879
909
|
}
|
|
880
910
|
|
|
881
911
|
- (NSDictionary*)inboxMessageToDictionary:(NSObject<PWInboxMessageProtocol>*) message {
|