pushwoosh-react-native-plugin 2.0.0 → 2.2.17
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/.github/ISSUE_TEMPLATE/bug_report.yml +135 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
- package/.github/ISSUE_TEMPLATE/question.yml +28 -0
- package/InlineInApp.js +71 -0
- package/README.md +35 -85
- package/docs/README.md +230 -11
- package/index.d.ts +91 -0
- package/index.js +265 -24
- package/package.json +12 -1
- package/pushwoosh-react-native-plugin.podspec +20 -0
- package/react-native.config.js +9 -0
- package/scripts/add_inbox_ios_resources.js +42 -0
- package/src/android/build.gradle +40 -10
- package/src/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/src/android/gradlew +160 -0
- package/src/android/gradlew.bat +90 -0
- package/src/android/src/main/AndroidManifest.xml +19 -54
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/ConversionUtil.java +214 -148
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/CustomFirebaseMessagingService.java +29 -0
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/EventDispatcher.java +7 -6
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/InboxUiStyleManager.java +162 -0
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/InlineInAppManager.java +48 -0
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshNotificationServiceExtension.java +44 -0
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshPackage.java +4 -2
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshPlugin.java +606 -393
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/RCTInlineInAppView.java +75 -0
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/internal/ReactNativePluginProvider.java +15 -0
- package/src/ios/PWAppDelegate.h +20 -0
- package/src/ios/PWGDPRManager.h +46 -0
- package/src/ios/PWIInboxStyle.h +122 -0
- package/src/ios/PWIInboxUI.h +39 -0
- package/src/ios/PWInAppManager.h +176 -0
- package/src/ios/PWInbox.h +147 -0
- package/src/ios/PWInlineInAppView.h +26 -0
- package/src/ios/PWLog.h +23 -0
- package/src/ios/PWMessaging.h +20 -0
- package/src/ios/PWNotificationExtensionManager.h +46 -0
- package/src/ios/PWRichMediaManager.h +123 -0
- package/src/ios/PWRichMediaStyle.h +122 -0
- package/src/ios/PushNotificationManager.h +234 -111
- package/src/ios/Pushwoosh.h +623 -0
- package/src/ios/PushwooshInboxBundle.bundle/Info.plist +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/PWIInboxAttachmentViewController.nib +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/PWIInboxMessageViewCell.nib +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/PWIInboxViewController.nib +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/errorMessage@2x.png +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/inbox_icon.png +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/noMessage@2x.png +0 -0
- package/src/ios/PushwooshInboxBundle.bundle/unread.png +0 -0
- package/src/ios/PushwooshInboxUI.h +19 -0
- package/src/ios/PushwooshPlugin/PWEventDispatcher.h +1 -1
- package/src/ios/PushwooshPlugin/PWInlineInAppManager.h +17 -0
- package/src/ios/PushwooshPlugin/PWInlineInAppManager.m +54 -0
- package/src/ios/PushwooshPlugin/Pushwoosh.h +18 -3
- package/src/ios/PushwooshPlugin/Pushwoosh.m +532 -98
- package/src/ios/PushwooshPlugin.xcodeproj/project.pbxproj +27 -6
- package/src/ios/libPushwoosh.a +0 -0
- package/src/ios/libPushwooshInboxUI.a +0 -0
- package/.npmignore +0 -3
- package/src/android/.npmignore +0 -1
- package/src/android/pushwooshplugin.iml +0 -150
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/NotificationReceiver.java +0 -42
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PostEventActivity.java +0 -45
- package/src/ios/Pushwoosh.a +0 -0
- package/src/ios/PushwooshPlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// PWInlineInAppManager.m
|
|
3
|
+
// pushwoosh-react-native-plugin
|
|
4
|
+
//
|
|
5
|
+
// Created by Fectum on 15/01/2020.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import "PWInlineInAppManager.h"
|
|
9
|
+
|
|
10
|
+
@interface PWReactInlineInAppView: PWInlineInAppView
|
|
11
|
+
|
|
12
|
+
@property (nonatomic) RCTBubblingEventBlock onLoaded;
|
|
13
|
+
@property (nonatomic) RCTBubblingEventBlock onClosed;
|
|
14
|
+
@property (nonatomic) RCTBubblingEventBlock onSizeChanged;
|
|
15
|
+
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation PWReactInlineInAppView
|
|
19
|
+
@end
|
|
20
|
+
|
|
21
|
+
@implementation PWInlineInAppManager
|
|
22
|
+
|
|
23
|
+
RCT_EXPORT_MODULE(PWInlineInAppView)
|
|
24
|
+
|
|
25
|
+
- (UIView *)view {
|
|
26
|
+
PWReactInlineInAppView *view = [PWReactInlineInAppView new];
|
|
27
|
+
view.delegate = self;
|
|
28
|
+
return view;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
RCT_EXPORT_VIEW_PROPERTY(identifier, NSString)
|
|
32
|
+
RCT_EXPORT_VIEW_PROPERTY(onLoaded, RCTBubblingEventBlock)
|
|
33
|
+
RCT_EXPORT_VIEW_PROPERTY(onClosed, RCTBubblingEventBlock)
|
|
34
|
+
RCT_EXPORT_VIEW_PROPERTY(onSizeChanged, RCTBubblingEventBlock)
|
|
35
|
+
|
|
36
|
+
- (void)inlineInAppDidLoadInView:(PWReactInlineInAppView *)inAppView {
|
|
37
|
+
if (inAppView.onLoaded) {
|
|
38
|
+
inAppView.onLoaded(@{@"identifier": inAppView.identifier});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
- (void)didCloseInlineInAppView:(PWReactInlineInAppView *)inAppView {
|
|
43
|
+
if (inAppView.onClosed) {
|
|
44
|
+
inAppView.onClosed(@{@"identifier": inAppView.identifier});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
- (void)didChangeSizeOfInlineInAppView:(PWReactInlineInAppView *)inAppView {
|
|
49
|
+
if (inAppView.onSizeChanged) {
|
|
50
|
+
inAppView.onSizeChanged(@{@"width": @(inAppView.bounds.size.width), @"height": @(inAppView.bounds.size.height)});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@end
|
|
@@ -6,11 +6,26 @@
|
|
|
6
6
|
|
|
7
7
|
#import <Foundation/Foundation.h>
|
|
8
8
|
|
|
9
|
-
#import
|
|
10
|
-
#import
|
|
9
|
+
#import <React/RCTBridgeModule.h>
|
|
10
|
+
#import <React/RCTEventEmitter.h>
|
|
11
|
+
#import <Pushwoosh/Pushwoosh.h>
|
|
11
12
|
|
|
13
|
+
#if __has_include(<Pushwoosh/PushNotificationManager.h>)
|
|
14
|
+
#import <Pushwoosh/PushNotificationManager.h>
|
|
15
|
+
#import <Pushwoosh/PWInAppManager.h>
|
|
16
|
+
#import <PushwooshInboxUI/PushwooshInboxUI.h>
|
|
17
|
+
#import <Pushwoosh/PWGDPRManager.h>
|
|
18
|
+
#import <Pushwoosh/PWInlineInAppView.h>
|
|
19
|
+
#import <Pushwoosh/PWInbox.h>
|
|
20
|
+
#else
|
|
12
21
|
#import "PushNotificationManager.h"
|
|
22
|
+
#import "PWInAppManager.h"
|
|
23
|
+
#import "PushwooshInboxUI.h"
|
|
24
|
+
#import "PWGDPRManager.h"
|
|
25
|
+
#import "PWInlineInAppView.h"
|
|
26
|
+
#import "PWInbox.h"
|
|
27
|
+
#endif
|
|
13
28
|
|
|
14
|
-
@interface
|
|
29
|
+
@interface PushwooshPlugin: RCTEventEmitter<RCTBridgeModule,PushNotificationDelegate>
|
|
15
30
|
|
|
16
31
|
@end
|