pushwoosh-react-native-plugin 6.1.32 → 6.1.34

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 (33) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +1 -0
  2. package/package.json +1 -1
  3. package/pushwoosh-react-native-plugin.podspec +2 -2
  4. package/src/android/build.gradle +1 -1
  5. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshNotificationServiceExtension.java +1 -1
  6. package/src/ios/PushwooshPlugin/Pushwoosh.h +7 -7
  7. package/src/ios/PushwooshPlugin/Pushwoosh.m +113 -45
  8. package/src/ios/PWAppDelegate.h +0 -20
  9. package/src/ios/PWGDPRManager.h +0 -46
  10. package/src/ios/PWIInboxStyle.h +0 -122
  11. package/src/ios/PWIInboxUI.h +0 -39
  12. package/src/ios/PWInAppManager.h +0 -176
  13. package/src/ios/PWInbox.h +0 -147
  14. package/src/ios/PWInlineInAppView.h +0 -26
  15. package/src/ios/PWLog.h +0 -23
  16. package/src/ios/PWMessaging.h +0 -20
  17. package/src/ios/PWNotificationExtensionManager.h +0 -49
  18. package/src/ios/PWRichMediaManager.h +0 -123
  19. package/src/ios/PWRichMediaStyle.h +0 -122
  20. package/src/ios/PushNotificationManager.h +0 -596
  21. package/src/ios/Pushwoosh.h +0 -684
  22. package/src/ios/PushwooshInboxBundle.bundle/Info.plist +0 -0
  23. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxAttachmentViewController.nib +0 -0
  24. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxMessageViewCell.nib +0 -0
  25. package/src/ios/PushwooshInboxBundle.bundle/PWIInboxViewController.nib +0 -0
  26. package/src/ios/PushwooshInboxBundle.bundle/errorMessage@2x.png +0 -0
  27. package/src/ios/PushwooshInboxBundle.bundle/inbox_icon.png +0 -0
  28. package/src/ios/PushwooshInboxBundle.bundle/noMessage@2x.png +0 -0
  29. package/src/ios/PushwooshInboxBundle.bundle/unread.png +0 -0
  30. package/src/ios/PushwooshInboxUI.h +0 -19
  31. package/src/ios/PushwooshPlugin.xcodeproj/project.pbxproj +0 -305
  32. package/src/ios/libPushwoosh.a +0 -0
  33. package/src/ios/libPushwooshInboxUI.a +0 -0
@@ -1,176 +0,0 @@
1
- //
2
- // PWInAppManager.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2017
5
- //
6
-
7
- #import <Foundation/Foundation.h>
8
-
9
- #if TARGET_OS_IOS
10
-
11
- #import <WebKit/WebKit.h>
12
- /**
13
- `PWJavaScriptInterface` protocol is a representation of Javascript object that can be added at runtime into In-App Message HTML page
14
- to provide native calls and callbacks to Objective-C/Swift.
15
-
16
- Example:
17
-
18
- Objective-C:
19
- @code
20
- @implementation JavaScriptInterface
21
-
22
- - (void)nativeCall:(NSString*)str :(PWJavaScriptCallback*)callback {
23
- [callback executeWithParam:str];
24
- }
25
-
26
- @end
27
-
28
- ...
29
-
30
- [[PWInAppManager sharedManager] addJavascriptInterface:[JavaScriptInterface new] withName:@"ObjC"];
31
- @endcode
32
-
33
- JavaScript:
34
- @code
35
- ObjC.nativeCall("exampleString", function(str) {
36
- console.log(str);
37
- });
38
- @endcode
39
- */
40
- @protocol PWJavaScriptInterface
41
-
42
- @optional
43
-
44
- /**
45
- Tells the delegate that In-App Message load stated
46
- */
47
- - (void)onWebViewStartLoad:(WKWebView *)webView;
48
-
49
- /**
50
- Tells the delegate that In-App Message load finished
51
- */
52
- - (void)onWebViewFinishLoad:(WKWebView *)webView;
53
-
54
- /**
55
- Tells the delegate that In-App Message is closing
56
- */
57
- - (void)onWebViewStartClose:(WKWebView *)webView;
58
-
59
- @end
60
-
61
- /**
62
- `PWJavaScriptCallback` is a representation of Javascript function
63
- */
64
- @interface PWJavaScriptCallback : NSObject
65
-
66
- /**
67
- Invokes callback with no arguments
68
- */
69
- - (NSString*) execute;
70
-
71
- /**
72
- Invokes callback with one argument
73
- */
74
- - (NSString*) executeWithParam: (NSString*) param;
75
-
76
- /**
77
- Invokes callback with multiple arguments
78
- */
79
- - (NSString*) executeWithParams: (NSArray*) params;
80
-
81
- @end
82
-
83
- #endif
84
-
85
-
86
- /*
87
- `PWInAppManager` class offers access to the singleton-instance of the inapp messages manager responsible for sending events and managing inapp message notifications.
88
- */
89
- @interface PWInAppManager : NSObject
90
-
91
- + (instancetype)sharedManager;
92
-
93
- + (void)updateInAppManagerInstance;
94
-
95
- #if TARGET_OS_IOS || TARGET_OS_OSX
96
- /**
97
- Resets capping of the Pushwoosh out-of-the-box In-App solutions.
98
- */
99
- - (void)resetBusinessCasesFrequencyCapping;
100
-
101
- #endif
102
- /**
103
- Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
104
- This allows data and events to be matched across multiple user devices.
105
- */
106
- - (void)setUserId:(NSString *)userId;
107
-
108
- /**
109
- Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
110
- This allows data and events to be matched across multiple user devices.
111
- If setUser succeeds competion is called with nil argument. If setUser fails completion is called with error.
112
- */
113
- - (void)setUserId:(NSString *)userId completion:(void(^)(NSError * error))completion;
114
-
115
- /**
116
- Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
117
- This allows data and events to be matched across multiple user devices.
118
-
119
- @param userId user identifier
120
- @param emails user's emails array
121
- */
122
- - (void)setUser:(NSString *)userId emails:(NSArray *)emails completion:(void(^)(NSError * error))completion;
123
-
124
- /**
125
- Register emails list associated to the current user.
126
-
127
- @param emails user's emails array
128
- */
129
- - (void)setEmails:(NSArray *)emails completion:(void(^)(NSError * error))completion;
130
-
131
- /**
132
- Move all events from oldUserId to newUserId if doMerge is true. If doMerge is false all events for oldUserId are removed.
133
-
134
- @param oldUserId source user
135
- @param newUserId destination user
136
- @param doMerge if false all events for oldUserId are removed, if true all events for oldUserId are moved to newUserId
137
- @param completion callback
138
- */
139
- - (void)mergeUserId:(NSString *)oldUserId to:(NSString *)newUserId doMerge:(BOOL)doMerge completion:(void (^)(NSError *error))completion;
140
-
141
- /**
142
- Post events for In-App Messages. This can trigger In-App message display as specified in Pushwoosh Control Panel.
143
-
144
- Example:
145
- @code
146
- [[PWInAppManager sharedManager] setUserId:@"96da2f590cd7246bbde0051047b0d6f7"];
147
- [[PWInAppManager sharedManager] postEvent:@"buttonPressed" withAttributes:@{ @"buttonNumber" : @"4", @"buttonLabel" : @"Banner" } completion:nil];
148
- @endcode
149
-
150
- @param event name of the event
151
- @param attributes NSDictionary of event attributes
152
- @param completion function to call after posting event
153
- */
154
- - (void)postEvent:(NSString *)event withAttributes:(NSDictionary *)attributes completion:(void (^)(NSError *error))completion;
155
-
156
- /**
157
- See `postEvent:withAttributes:completion:`
158
- */
159
- - (void)postEvent:(NSString *)event withAttributes:(NSDictionary *)attributes;
160
-
161
- #if TARGET_OS_IOS
162
-
163
- /**
164
- Adds javascript interface for In-App Messages. Interface will be accessible from javascript as object with specified `name` and functions defined in `interface` class.
165
- */
166
- - (void)addJavascriptInterface:(NSObject<PWJavaScriptInterface>*)interface withName:(NSString*)name;
167
-
168
- /**
169
- Updates In-App messages storage on a device
170
- */
171
-
172
- - (void)reloadInAppsWithCompletion: (void (^)(NSError *error))completion;
173
-
174
- #endif
175
-
176
- @end
package/src/ios/PWInbox.h DELETED
@@ -1,147 +0,0 @@
1
- //
2
- // PWInbox.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2017
5
- //
6
-
7
- #import <Foundation/Foundation.h>
8
-
9
-
10
- /**
11
- The notification arriving on the Inbox messages renewal
12
- */
13
- FOUNDATION_EXPORT NSString * const PWInboxMessagesDidUpdateNotification;
14
-
15
- /**
16
- The notification arriving when a push message is added to Inbox
17
- */
18
- FOUNDATION_EXPORT NSString * const PWInboxMessagesDidReceiveInPushNotification;
19
-
20
- /**
21
- The Inbox message type. Plain = without any action, Richmedia = contains a Rich media page, URL = contains remote URL, Deeplink = contains Deeplink
22
- */
23
- typedef NS_ENUM(NSInteger, PWInboxMessageType) {
24
- PWInboxMessageTypePlain = 0,
25
- PWInboxMessageTypeRichmedia = 1,
26
- PWInboxMessageTypeURL = 2,
27
- PWInboxMessageTypeDeeplink = 3
28
- };
29
-
30
-
31
- /**
32
- `PWInboxMessageProtocol` The protocol describing the Inbox message.
33
- */
34
- @protocol PWInboxMessageProtocol <NSObject>
35
-
36
- @required
37
-
38
- @property (readonly, nonatomic) NSString *code;
39
- @property (readonly, nonatomic) NSString *title;
40
- @property (readonly, nonatomic) NSString *imageUrl;
41
- @property (readonly, nonatomic) NSString *message;
42
- @property (readonly, nonatomic) NSDate *sendDate;
43
- @property (readonly, nonatomic) PWInboxMessageType type;
44
- //! Inbox Message which is read, see + (void)readMessagesWithCodes:(NSArray<NSString *> *)codes
45
- @property (readonly, nonatomic) BOOL isRead;
46
- //! Action of the Inbox Message is performed (if true, an action was performed in the Inbox see + (void)performActionForMessageWithCode:(NSString *)code or an action was performed on the push tap )
47
- @property (readonly, nonatomic) BOOL isActionPerformed;
48
- @property (readonly, nonatomic) NSDictionary *actionParams;
49
- @property (readonly, nonatomic) NSString *attachmentUrl;
50
-
51
- @end
52
-
53
- @interface PWInbox : NSObject
54
-
55
- - (instancetype)init NS_UNAVAILABLE;
56
-
57
- /**
58
- Get the number of the PWInboxMessageProtocol with no action performed
59
-
60
- @param completion - if successful, return the number of the InboxMessages with no action performed. Otherwise, return error
61
- */
62
- + (void)messagesWithNoActionPerformedCountWithCompletion:(void (^)(NSInteger count, NSError *error))completion;
63
-
64
- /**
65
- Get the number of the unread PWInboxMessageProtocol
66
-
67
- @param completion - if successful, return the number of the unread InboxMessages. Otherwise, return error
68
- */
69
- + (void)unreadMessagesCountWithCompletion:(void (^)(NSInteger count, NSError *error))completion;
70
-
71
- /**
72
- Get the total number of the PWInboxMessageProtocol
73
-
74
- @param completion - if successful, return the total number of the InboxMessages. Otherwise, return error
75
- */
76
- + (void)messagesCountWithCompletion:(void (^)(NSInteger count, NSError *error))completion;
77
-
78
- /**
79
- Get the collection of the PWInboxMessageProtocol that the user received
80
-
81
- @param completion - if successful, return the collection of the InboxMessages. Otherwise, return error
82
- */
83
- + (void)loadMessagesWithCompletion:(void (^)(NSArray<NSObject<PWInboxMessageProtocol> *> *messages, NSError *error))completion;
84
-
85
- /**
86
- Call this method to mark the list of InboxMessageProtocol as read
87
-
88
- @param codes of the inboxMessages
89
- */
90
- + (void)readMessagesWithCodes:(NSArray<NSString *> *)codes;
91
-
92
- /**
93
- Call this method, when the user clicks on the InboxMessageProtocol and the message’s action is performed
94
-
95
- @param code of the inboxMessage that the user tapped
96
- */
97
- + (void)performActionForMessageWithCode:(NSString *)code;
98
-
99
- /**
100
- Call this method, when the user deletes the list of InboxMessageProtocol manually
101
-
102
- @param codes of the list of InboxMessageProtocol.code that the user deleted
103
- */
104
- + (void)deleteMessagesWithCodes:(NSArray<NSString *> *)codes;
105
-
106
- /**
107
- Subscribe for messages arriving with push notifications. @warning You need to unsubscribe by calling the removeObserver method, if you don't want to receive notifications
108
-
109
- @param completion - return the collection of the InboxMessages.
110
- */
111
- + (id<NSObject>)addObserverForDidReceiveInPushNotificationCompletion:(void (^)(NSArray<NSObject<PWInboxMessageProtocol> *> *messagesAdded))completion;
112
-
113
- /**
114
- Subscribe for messages arriving when a message is deleted, added, or updated. @warning You need to unsubscribe by calling the removeObserver method, if you don't want to receive notifications
115
-
116
- @param completion - return the collection of the InboxMessages.
117
- */
118
- + (id<NSObject>)addObserverForUpdateInboxMessagesCompletion:(void (^)(NSArray<NSObject<PWInboxMessageProtocol> *> *messagesDeleted,
119
- NSArray<NSObject<PWInboxMessageProtocol> *> *messagesAdded,
120
- NSArray<NSObject<PWInboxMessageProtocol> *> *messagesUpdated))completion;
121
-
122
- /**
123
- Subscribe for unread messages count changes. @warning You need to unsubscribe by calling the removeObserver method, if you don't want to receive notifications
124
-
125
- @param block - return the count of unread messages.
126
- */
127
- + (id<NSObject>)addObserverForUnreadMessagesCountUsingBlock:(void (^)(NSUInteger count))block;
128
-
129
- /**
130
- Subscribe for messages with no action performed count changes. @warning You need to unsubscribe by calling the removeObserver method, if you don't want to receive notifications
131
-
132
- @param block - return the count of unread messages.
133
- */
134
- + (id<NSObject>)addObserverForNoActionPerformedMessagesCountUsingBlock:(void (^)(NSUInteger count))block;
135
-
136
- /**
137
- Unsubscribes from notifications
138
-
139
- @param observer - Unsubscribes observer
140
- */
141
- + (void)removeObserver:(id<NSObject>)observer;
142
-
143
- /**
144
- updates observers
145
- */
146
- + (void)updateInboxForNewUserId:(void (^)(NSUInteger messagesCount))completion;
147
- @end
@@ -1,26 +0,0 @@
1
- //
2
- // PWInlineInAppView.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2018
5
- //
6
-
7
- #import <UIKit/UIKit.h>
8
-
9
- @class PWInlineInAppView;
10
-
11
- @protocol PWInlineInAppViewDelegate <NSObject>
12
-
13
- @optional
14
- - (void)inlineInAppDidLoadInView:(PWInlineInAppView *)inAppView;
15
- - (void)didCloseInlineInAppView:(PWInlineInAppView *)inAppView;
16
- - (void)didChangeSizeOfInlineInAppView:(PWInlineInAppView *)inAppView;
17
-
18
- @end
19
-
20
- @interface PWInlineInAppView : UIView
21
-
22
- @property (nonatomic) IBInspectable NSString *identifier;
23
-
24
- @property (nonatomic, weak) id <PWInlineInAppViewDelegate> delegate;
25
-
26
- @end
package/src/ios/PWLog.h DELETED
@@ -1,23 +0,0 @@
1
- //
2
- // PWLog.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2016
5
- //
6
-
7
- #import <Foundation/Foundation.h>
8
-
9
- typedef NSString *PWLogLevel NS_EXTENSIBLE_STRING_ENUM;
10
-
11
- extern PWLogLevel const PWLogLevelNone;
12
- extern PWLogLevel const PWLogLevelError;
13
- extern PWLogLevel const PWLogLevelWarning;
14
- extern PWLogLevel const PWLogLevelInfo;
15
- extern PWLogLevel const PWLogLevelDebug;
16
- extern PWLogLevel const PWLogLevelVerbose;
17
-
18
- @interface PWLog : NSObject
19
-
20
- + (void)setLogsHandler:(void(^)(PWLogLevel level, NSString *description))logsHandler;
21
- + (void)removeLogsHandler;
22
-
23
- @end
@@ -1,20 +0,0 @@
1
- //
2
- // Pushwoosh.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2016
5
- //
6
-
7
- #import "PushNotificationManager.h"
8
- #import "Pushwoosh.h"
9
- #import "PWInAppManager.h"
10
- #import "PWLog.h"
11
- #import "PWGDPRManager.h"
12
-
13
- #if TARGET_OS_IOS
14
- #import "PWAppDelegate.h"
15
- #import "PWNotificationExtensionManager.h"
16
- #import "PWRichMediaManager.h"
17
- #import "PWRichMediaStyle.h"
18
- #import "PWInbox.h"
19
- #import "PWInlineInAppView.h"
20
- #endif
@@ -1,49 +0,0 @@
1
- //
2
- // PWNotificationExtensionManager.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2019
5
- //
6
-
7
- #import <Foundation/Foundation.h>
8
- #import <UserNotifications/UserNotifications.h>
9
-
10
- NS_ASSUME_NONNULL_BEGIN
11
-
12
- @interface PWNotificationExtensionManager : NSObject
13
-
14
- + (instancetype)sharedManager;
15
-
16
- /**
17
- Sends message delivery event to Pushwoosh and downloads media attachment. Call it from UNNotificationServiceExtension. Don't forget to set Pushwoosh_APPID in extension Info.plist.
18
-
19
- Example:
20
- @code
21
- - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
22
- self.contentHandler = contentHandler;
23
- self.bestAttemptContent = [request.content mutableCopy];
24
-
25
- [[PWNotificationExtensionManager sharedManager] handleNotificationRequest:request contentHandler:contentHandler];
26
- }
27
- @endcode
28
- */
29
- - (void)handleNotificationRequest:(UNNotificationRequest *)request contentHandler:(void (^)(UNNotificationContent *))contentHandler;
30
-
31
- /**
32
- Example:
33
- @code
34
- - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler {
35
- self.contentHandler = contentHandler;
36
- self.bestAttemptContent = [request.content mutableCopy];
37
-
38
- [[PWNotificationExtensionManager sharedManager] handleNotificationRequest:request
39
- withAppGroups:@"group.com.example_domain.example_app_name"
40
- contentHandler:contentHandler];
41
- }
42
- @endcode
43
- */
44
- - (void)handleNotificationRequest:(UNNotificationRequest *)request
45
- withAppGroups:(NSString * _Nonnull)appGroupsName
46
- contentHandler:(void (^ _Nonnull)(UNNotificationContent * _Nonnull))contentHandler;
47
- @end
48
-
49
- NS_ASSUME_NONNULL_END
@@ -1,123 +0,0 @@
1
- //
2
- // PWRichMediaManager.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2018
5
- //
6
-
7
- #import <Foundation/Foundation.h>
8
-
9
- #if TARGET_OS_IOS
10
-
11
- #import "PWRichMediaStyle.h"
12
-
13
- #endif
14
-
15
- typedef NS_ENUM(NSUInteger, PWRichMediaSource) {
16
- /**
17
- RichMedia is presented from push notification.
18
- */
19
- PWRichMediaSourcePush,
20
-
21
- /**
22
- RichMedia is presented from In-App.
23
- */
24
- PWRichMediaSourceInApp
25
- };
26
-
27
-
28
- /*
29
- `PWRichMedia` class represents Rich Media page object.
30
- */
31
- @interface PWRichMedia: NSObject
32
-
33
- /**
34
- Rich Media presenter type.
35
- */
36
- @property (nonatomic, readonly) PWRichMediaSource source;
37
-
38
- /**
39
- Content of the Rich Media. For PWRichMediaSourceInApp it's equal to In-App code, for PWRichMediaSourcePush it's equal to Rich Media code.
40
- */
41
- @property (nonatomic, readonly) NSString *content;
42
-
43
- /**
44
- Payload of the associated push notification if source is equal to PWRichMediaSourcePush.
45
- */
46
- @property (nonatomic, readonly) NSDictionary *pushPayload;
47
-
48
- /**
49
- Checks if PWRichMediaSourceInApp is a required In-App. Always returns YES for PWRichMediaSourcePush.
50
- */
51
- @property (nonatomic, readonly, getter=isRequired) BOOL required;
52
-
53
- @end
54
-
55
-
56
- @class PWRichMediaManager;
57
-
58
- /**
59
- Interface for Rich Media presentation managing.
60
- */
61
- @protocol PWRichMediaPresentingDelegate <NSObject>
62
-
63
- @optional
64
-
65
- /**
66
- Checks the delegate whether the Rich Media should be displayed.
67
- */
68
- - (BOOL)richMediaManager:(PWRichMediaManager *)richMediaManager shouldPresentRichMedia:(PWRichMedia *)richMedia;
69
-
70
- /**
71
- Tells the delegate that Rich Media has been displayed.
72
- */
73
- - (void)richMediaManager:(PWRichMediaManager *)richMediaManager didPresentRichMedia:(PWRichMedia *)richMedia;
74
-
75
- /**
76
- Tells the delegate that Rich Media has been closed.
77
- */
78
- - (void)richMediaManager:(PWRichMediaManager *)richMediaManager didCloseRichMedia:(PWRichMedia *)richMedia;
79
-
80
- /**
81
- Tells the delegate that error during Rich Media presenting has been occured.
82
- */
83
- - (void)richMediaManager:(PWRichMediaManager *)richMediaManager presentingDidFailForRichMedia:(PWRichMedia *)richMedia withError:(NSError *)error;
84
-
85
- @end
86
-
87
-
88
- /*
89
- `PWRichMediaManager` class offers access to the singleton-instance of the manager responsible for Rich Media presentation.
90
- */
91
- @interface PWRichMediaManager : NSObject
92
-
93
- #if TARGET_OS_IPHONE
94
-
95
- /**
96
- Style for Rich Media presenting.
97
- */
98
- @property (nonatomic) PWRichMediaStyle *richMediaStyle;
99
-
100
- #endif
101
-
102
- /**
103
- Delegate for Rich Media presentation managing.
104
- */
105
- @property (nonatomic) id<PWRichMediaPresentingDelegate> delegate;
106
-
107
- /**
108
- A singleton object that represents the rich media manager.
109
- */
110
- + (instancetype)sharedManager;
111
-
112
- /**
113
- Presents the rich media object.
114
- */
115
- - (void)presentRichMedia:(PWRichMedia *)richMedia;
116
-
117
- /**
118
- Close toast view after time interval in seconds
119
- */
120
- - (void)closeToastViewAfter:(NSTimeInterval)interval;
121
-
122
- @end
123
-
@@ -1,122 +0,0 @@
1
- //
2
- // PWRichMediaStyle.h
3
- // Pushwoosh SDK
4
- // (c) Pushwoosh 2018
5
- //
6
-
7
- #import <Foundation/Foundation.h>
8
-
9
- #if TARGET_OS_IOS || TARGET_OS_WATCH
10
- #import <UIKit/UIKit.h>
11
- #endif
12
-
13
- FOUNDATION_EXPORT NSTimeInterval const PWRichMediaStyleDefaultAnimationDuration;
14
-
15
- /**
16
- Interface for Rich Media Custom Animation.
17
- */
18
- @protocol PWRichMediaStyleAnimationDelegate <NSObject>
19
-
20
- /**
21
- This method can be used to animate Rich Media presenting view.
22
- */
23
- #if TARGET_OS_IOS || TARGET_OS_WATCH
24
- - (void)runPresentingAnimationWithContentView:(UIView *)contentView parentView:(UIView *)parentView completion:(dispatch_block_t)completion;
25
-
26
- /**
27
- This method can be used to animate Rich Media dismissing view.
28
- */
29
- - (void)runDismissingAnimationWithContentView:(UIView *)contentView parentView:(UIView *)parentView completion:(dispatch_block_t)completion;
30
- #endif
31
- @end
32
-
33
- /**
34
- Built-in Rich Media presenting animations.
35
-
36
- Example:
37
- @code
38
- style.animationDelegate = [PWRichMediaStyleSlideLeftAnimation new];
39
- @endcode
40
- */
41
- @interface PWRichMediaStyleSlideLeftAnimation : NSObject <PWRichMediaStyleAnimationDelegate>
42
- @end
43
-
44
- @interface PWRichMediaStyleSlideRightAnimation : NSObject <PWRichMediaStyleAnimationDelegate>
45
- @end
46
-
47
- @interface PWRichMediaStyleSlideTopAnimation : NSObject <PWRichMediaStyleAnimationDelegate>
48
- @end
49
-
50
- @interface PWRichMediaStyleSlideBottomAnimation : NSObject <PWRichMediaStyleAnimationDelegate>
51
- @end
52
-
53
- @interface PWRichMediaStyleCrossFadeAnimation : NSObject <PWRichMediaStyleAnimationDelegate>
54
- @end
55
-
56
- /**
57
- Custom Rich Media loading view. It is shown while Rich Media is loading.
58
- */
59
- #if TARGET_OS_IOS || TARGET_OS_WATCH
60
- @interface PWLoadingView : UIView
61
-
62
- @property (nonatomic) IBOutlet UIActivityIndicatorView *activityIndicatorView;
63
- @property (nonatomic) IBOutlet UIButton *cancelLoadingButton;
64
-
65
- @end
66
-
67
- typedef PWLoadingView *(^PWRichMediaLoadingViewBlock)(void);
68
- #endif
69
- /**
70
- 'PWRichMediaStyle' class allows customizing the appearance of Rich Media pages.
71
- */
72
- @interface PWRichMediaStyle : NSObject
73
-
74
- /**
75
- Background color of Rich Media pages.
76
- */
77
- #if TARGET_OS_IOS || TARGET_OS_WATCH
78
- @property (nonatomic) UIColor *backgroundColor;
79
- #elif TARGET_OS_OSX
80
- @property (nonatomic) NSColor *backgroundColor;
81
- #endif
82
-
83
- /**
84
- Delegate to manage Rich Media presenting animation.
85
- */
86
- @property (nonatomic) id<PWRichMediaStyleAnimationDelegate> animationDelegate;
87
-
88
- /**
89
- Block to customize Rich Media loading view.
90
-
91
- Example:
92
- @code
93
- style.loadingViewBlock = ^PWLoadingView *{
94
- return [[[NSBundle mainBundle] loadNibNamed:@"LoadingView" owner:self options:nil] lastObject];
95
- };
96
- @endcode
97
- */
98
- #if TARGET_OS_IOS
99
- @property (nonatomic) PWRichMediaLoadingViewBlock loadingViewBlock;
100
- #endif
101
- /**
102
- Delay of the close button presenting in seconds.
103
- */
104
- @property (nonatomic) NSTimeInterval closeButtonPresentingDelay;
105
-
106
- /**
107
- Should status bar to be hidden or not while Rich Media page is presented. Default is 'YES'.
108
- */
109
- @property (nonatomic) BOOL shouldHideStatusBar;
110
-
111
- /**
112
- A Boolean value that determines whether HTML5 videos play inline or use the native full-screen controller.
113
- */
114
- @property (nonatomic) NSNumber *allowsInlineMediaPlayback;
115
-
116
- /**
117
- A Boolean value that determines whether HTML5 videos can play automatically or require the user to start playing them.
118
- */
119
- @property (nonatomic) NSNumber *mediaPlaybackRequiresUserAction;
120
-
121
- @end
122
-