pushwoosh-react-native-plugin 6.1.33 → 6.1.35
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 +2 -0
- package/package.json +1 -1
- package/pushwoosh-react-native-plugin.podspec +2 -2
- package/src/android/build.gradle +1 -1
- package/src/ios/PushwooshPlugin/Pushwoosh.m +112 -44
- package/src/ios/PWAppDelegate.h +0 -20
- package/src/ios/PWGDPRManager.h +0 -46
- package/src/ios/PWIInboxStyle.h +0 -122
- package/src/ios/PWIInboxUI.h +0 -39
- package/src/ios/PWInAppManager.h +0 -176
- package/src/ios/PWInbox.h +0 -147
- package/src/ios/PWInlineInAppView.h +0 -26
- package/src/ios/PWLog.h +0 -23
- package/src/ios/PWMessaging.h +0 -20
- package/src/ios/PWNotificationExtensionManager.h +0 -49
- package/src/ios/PWRichMediaManager.h +0 -123
- package/src/ios/PWRichMediaStyle.h +0 -122
- package/src/ios/PushNotificationManager.h +0 -596
- package/src/ios/Pushwoosh.h +0 -684
- package/src/ios/PushwooshFramework.h +0 -705
- 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 +0 -19
- package/src/ios/PushwooshPlugin.xcodeproj/project.pbxproj +0 -305
- package/src/ios/libPushwoosh.a +0 -0
- package/src/ios/libPushwooshFramework.a +0 -0
- package/src/ios/libPushwooshInboxUI.a +0 -0
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
|
package/src/ios/PWMessaging.h
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PushwooshFramework.h
|
|
3
|
-
// Pushwoosh SDK
|
|
4
|
-
// (c) Pushwoosh 2024
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
#import "PushNotificationManager.h"
|
|
8
|
-
#import "PushwooshFramework.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
|
-
|