pushwoosh-cordova-plugin 8.3.6 → 8.3.8
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 +3 -3
- package/README_PGB.md +1 -1
- package/build-extras-pushwoosh.gradle +8 -0
- package/package.json +1 -1
- package/plugin.xml +20 -23
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/PushNotifications.java +1 -1
- package/src/ios/Pushwoosh.framework/Modules/module.modulemap +0 -6
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWAppDelegate.h +0 -20
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWGDPRManager.h +0 -46
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWInAppManager.h +0 -174
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWInbox.h +0 -147
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWInlineInAppView.h +0 -26
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWLog.h +0 -23
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWMessaging.h +0 -20
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWNotificationExtensionManager.h +0 -46
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWRichMediaManager.h +0 -118
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PWRichMediaStyle.h +0 -122
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/PushNotificationManager.h +0 -574
- package/src/ios/Pushwoosh.framework/Versions/A/Headers/Pushwoosh.h +0 -530
- package/src/ios/Pushwoosh.framework/Versions/A/libPushwoosh.a +0 -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.framework/Modules/module.modulemap +0 -6
- package/src/ios/PushwooshInboxUI.framework/Versions/A/Headers/PWIInboxStyle.h +0 -122
- package/src/ios/PushwooshInboxUI.framework/Versions/A/Headers/PWIInboxUI.h +0 -39
- package/src/ios/PushwooshInboxUI.framework/Versions/A/Headers/PushwooshInboxUI.h +0 -19
- package/src/ios/PushwooshInboxUI.framework/Versions/A/libPushwooshInboxUI.a +0 -0
|
@@ -1,530 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Pushwoosh.h
|
|
3
|
-
// Pushwoosh SDK
|
|
4
|
-
// (c) Pushwoosh 2020
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
#import <Foundation/Foundation.h>
|
|
8
|
-
|
|
9
|
-
#if TARGET_OS_IOS || TARGET_OS_WATCH
|
|
10
|
-
|
|
11
|
-
#import <UserNotifications/UserNotifications.h>
|
|
12
|
-
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
#if TARGET_OS_IOS
|
|
16
|
-
|
|
17
|
-
#import <StoreKit/StoreKit.h>
|
|
18
|
-
|
|
19
|
-
#endif
|
|
20
|
-
|
|
21
|
-
#define PUSHWOOSH_VERSION @"6.4.2"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
@class Pushwoosh, PWMessage, PWNotificationCenterDelegateProxy;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
typedef void (^PushwooshRegistrationHandler)(NSString *token, NSError *error);
|
|
28
|
-
typedef void (^PushwooshGetTagsHandler)(NSDictionary *tags);
|
|
29
|
-
typedef void (^PushwooshErrorHandler)(NSError *error);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
`PWMessagingDelegate` protocol defines the methods that can be implemented in the delegate of the `Pushwoosh` class' singleton object.
|
|
34
|
-
These methods provide information about the key events for push notification manager such as, receiving push notifications and opening the received notification.
|
|
35
|
-
These methods implementation allows to react on these events properly.
|
|
36
|
-
*/
|
|
37
|
-
@protocol PWMessagingDelegate <NSObject>
|
|
38
|
-
|
|
39
|
-
@optional
|
|
40
|
-
/**
|
|
41
|
-
Tells the delegate that the application has received a remote notification.
|
|
42
|
-
|
|
43
|
-
@param pushwoosh The push manager that received the remote notification.
|
|
44
|
-
@param message A PWMessage object that contains information referring to the remote notification, potentially including a badge number for the application icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data.
|
|
45
|
-
*/
|
|
46
|
-
- (void)pushwoosh:(Pushwoosh *)pushwoosh onMessageReceived:(PWMessage *)message;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
Tells the delegate that the user has pressed on the push notification banner.
|
|
50
|
-
|
|
51
|
-
@param pushwoosh The push manager that received the remote notification.
|
|
52
|
-
@param message A PWMessage object that contains information about the remote notification, potentially including a badge number for the application icon, an alert sound, an alert message to display to the user, a notification identifier, and custom data.
|
|
53
|
-
*/
|
|
54
|
-
- (void)pushwoosh:(Pushwoosh *)pushwoosh onMessageOpened:(PWMessage *)message;
|
|
55
|
-
|
|
56
|
-
@end
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
Message from Pushwoosh.
|
|
61
|
-
*/
|
|
62
|
-
@interface PWMessage : NSObject
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
Title of the push message.
|
|
66
|
-
*/
|
|
67
|
-
@property (nonatomic, readonly) NSString *title;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
Subtitle of the push message.
|
|
71
|
-
*/
|
|
72
|
-
@property (nonatomic, readonly) NSString *subTitle;
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
Body of the push message.
|
|
76
|
-
*/
|
|
77
|
-
@property (nonatomic, readonly) NSString *message;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
Badge number of the push message.
|
|
81
|
-
*/
|
|
82
|
-
@property (nonatomic, readonly) NSUInteger badge;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
Extension badge number of the push message.
|
|
86
|
-
*/
|
|
87
|
-
@property (nonatomic, readonly) NSUInteger badgeExtension;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
Remote URL or deeplink from the push message.
|
|
91
|
-
*/
|
|
92
|
-
@property (nonatomic, readonly) NSString *link;
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
Returns YES if this message received/opened then the app is in foreground state.
|
|
96
|
-
*/
|
|
97
|
-
@property (nonatomic, readonly, getter=isForegroundMessage) BOOL foregroundMessage;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
Returns YES if this message contains 'content-available' key (silent or newsstand push).
|
|
101
|
-
*/
|
|
102
|
-
@property (nonatomic, readonly, getter=isContentAvailable) BOOL contentAvailable;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
Returns YES if this is inbox message.
|
|
106
|
-
*/
|
|
107
|
-
@property (nonatomic, readonly, getter=isInboxMessage) BOOL inboxMessage;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
Gets custom JSON data from push notifications dictionary as specified in Pushwoosh Control Panel.
|
|
111
|
-
*/
|
|
112
|
-
@property (nonatomic, readonly) NSDictionary *customData;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
Original payload of the message.
|
|
116
|
-
*/
|
|
117
|
-
@property (nonatomic, readonly) NSDictionary *payload;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
Returns YES if this message is recieved from Pushwoosh.
|
|
121
|
-
*/
|
|
122
|
-
+ (BOOL)isPushwooshMessage:(NSDictionary *)userInfo;
|
|
123
|
-
|
|
124
|
-
@end
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
`Pushwoosh` class offers access to the singleton-instance of the push manager responsible for registering the device with the APS servers, receiving and processing push notifications.
|
|
129
|
-
*/
|
|
130
|
-
@interface Pushwoosh : NSObject
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
Pushwoosh Application ID. Usually retrieved automatically from Info.plist parameter `Pushwoosh_APPID`
|
|
134
|
-
*/
|
|
135
|
-
@property (nonatomic, copy, readonly) NSString *applicationCode;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
`PushNotificationDelegate` protocol delegate that would receive the information about events for push notification manager such as registering with APS services, receiving push notifications or working with the received notification.
|
|
139
|
-
Pushwoosh Runtime sets it to ApplicationDelegate by default
|
|
140
|
-
*/
|
|
141
|
-
@property (nonatomic, weak) NSObject<PWMessagingDelegate> *delegate;
|
|
142
|
-
|
|
143
|
-
#if TARGET_OS_IOS || TARGET_OS_WATCH
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
Show push notifications alert when push notification is received while the app is running, default is `YES`
|
|
147
|
-
*/
|
|
148
|
-
@property (nonatomic, assign) BOOL showPushnotificationAlert;
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
Authorization options in addition to UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionCarPlay.
|
|
152
|
-
*/
|
|
153
|
-
@property (nonatomic) UNAuthorizationOptions additionalAuthorizationOptions __IOS_AVAILABLE(12.0);
|
|
154
|
-
|
|
155
|
-
#endif
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
Returns push notification payload if the app was started in response to push notification or null otherwise
|
|
159
|
-
*/
|
|
160
|
-
@property (nonatomic, copy, readonly) NSDictionary *launchNotification;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
Proxy contains UNUserNotificationCenterDelegate objects.
|
|
164
|
-
*/
|
|
165
|
-
@property (nonatomic, readonly) PWNotificationCenterDelegateProxy *notificationCenterDelegateProxy;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
Set custom application language. Must be a lowercase two-letter code according to ISO-639-1 standard ("en", "de", "fr", etc.).
|
|
169
|
-
Device language used by default.
|
|
170
|
-
Set to nil if you want to use device language again.
|
|
171
|
-
*/
|
|
172
|
-
@property (nonatomic) NSString *language;
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
Initializes Pushwoosh.
|
|
176
|
-
@param appCode Pushwoosh App ID.
|
|
177
|
-
*/
|
|
178
|
-
+ (void)initializeWithAppCode:(NSString *)appCode;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
Returns an object representing the current push manager.
|
|
182
|
-
|
|
183
|
-
@return A singleton object that represents the push manager.
|
|
184
|
-
*/
|
|
185
|
-
+ (instancetype)sharedInstance;
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
Registers for push notifications. By default registeres for "UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert" flags.
|
|
189
|
-
Automatically detects if you have "newsstand-content" in "UIBackgroundModes" and adds "UIRemoteNotificationTypeNewsstandContentAvailability" flag.
|
|
190
|
-
*/
|
|
191
|
-
- (void)registerForPushNotifications;
|
|
192
|
-
- (void)registerForPushNotificationsWithCompletion:(PushwooshRegistrationHandler)completion;
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
Unregisters from push notifications.
|
|
196
|
-
*/
|
|
197
|
-
- (void)unregisterForPushNotifications;
|
|
198
|
-
- (void)unregisterForPushNotificationsWithCompletion:(void (^)(NSError *error))completion;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
Handle registration to remote notifications.
|
|
202
|
-
*/
|
|
203
|
-
- (void)handlePushRegistration:(NSData *)devToken;
|
|
204
|
-
- (void)handlePushRegistrationFailure:(NSError *)error;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
Handle received push notification.
|
|
208
|
-
*/
|
|
209
|
-
- (BOOL)handlePushReceived:(NSDictionary *)userInfo;
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Change default base url to reverse proxy url
|
|
213
|
-
* @param url - reverse proxy url
|
|
214
|
-
*/
|
|
215
|
-
- (void)setReverseProxy:(NSString *)url;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Disables reverse proxy
|
|
219
|
-
*/
|
|
220
|
-
- (void)disableReverseProxy;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
Send tags to server. Tag names have to be created in the Pushwoosh Control Panel. Possible tag types: Integer, String, Incremental (integer only), List tags (array of values).
|
|
224
|
-
|
|
225
|
-
Example:
|
|
226
|
-
@code
|
|
227
|
-
NSDictionary *tags = @{ @"Alias" : aliasField.text,
|
|
228
|
-
@"FavNumber" : @([favNumField.text intValue]),
|
|
229
|
-
@"price" : [PWTags incrementalTagWithInteger:5],
|
|
230
|
-
@"List" : @[ @"Item1", @"Item2", @"Item3" ]
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
[[PushNotificationManager pushManager] setTags:tags];
|
|
234
|
-
@endcode
|
|
235
|
-
|
|
236
|
-
@param tags Dictionary representation of tags to send.
|
|
237
|
-
*/
|
|
238
|
-
- (void)setTags:(NSDictionary *)tags;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
Send tags to server with completion block. If setTags succeeds competion is called with nil argument. If setTags fails completion is called with error.
|
|
242
|
-
*/
|
|
243
|
-
- (void)setTags:(NSDictionary *)tags completion:(void (^)(NSError *error))completion;
|
|
244
|
-
|
|
245
|
-
- (void)setEmailTags:(NSDictionary *)tags forEmail:(NSString *)email;
|
|
246
|
-
|
|
247
|
-
- (void)setEmailTags:(NSDictionary *)tags forEmail:(NSString *)email completion:(void(^)(NSError *error))completion;
|
|
248
|
-
|
|
249
|
-
/**
|
|
250
|
-
Get tags from server. Calls delegate method if exists and handler (block).
|
|
251
|
-
|
|
252
|
-
@param successHandler The block is executed on the successful completion of the request. This block has no return value and takes one argument: the dictionary representation of the recieved tags.
|
|
253
|
-
Example of the dictionary representation of the received tags:
|
|
254
|
-
{
|
|
255
|
-
Country = ru;
|
|
256
|
-
Language = ru;
|
|
257
|
-
}
|
|
258
|
-
@param errorHandler The block is executed on the unsuccessful completion of the request. This block has no return value and takes one argument: the error that occurred during the request.
|
|
259
|
-
*/
|
|
260
|
-
- (void)getTags:(PushwooshGetTagsHandler)successHandler onFailure:(PushwooshErrorHandler)errorHandler;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
Sends current badge value to server. Called internally by SDK Runtime when `UIApplication` `setApplicationBadgeNumber:` is set. This function is used for "auto-incremeting" badges to work.
|
|
264
|
-
This way Pushwoosh server can know what current badge value is set for the application.
|
|
265
|
-
|
|
266
|
-
@param badge Current badge value.
|
|
267
|
-
*/
|
|
268
|
-
- (void)sendBadges:(NSInteger)badge __API_AVAILABLE(macos(10.10), ios(8.0));
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
Pushwoosh SDK version.
|
|
272
|
-
*/
|
|
273
|
-
+ (NSString *)version;
|
|
274
|
-
|
|
275
|
-
#if TARGET_OS_IOS
|
|
276
|
-
/**
|
|
277
|
-
Sends in-app purchases to Pushwoosh. Use in paymentQueue:updatedTransactions: payment queue method (see example).
|
|
278
|
-
|
|
279
|
-
Example:
|
|
280
|
-
@code
|
|
281
|
-
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {
|
|
282
|
-
[[PushNotificationManager pushManager] sendSKPaymentTransactions:transactions];
|
|
283
|
-
}
|
|
284
|
-
@endcode
|
|
285
|
-
|
|
286
|
-
@param transactions Array of SKPaymentTransaction items as received in the payment queue.
|
|
287
|
-
*/
|
|
288
|
-
- (void)sendSKPaymentTransactions:(NSArray *)transactions;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
Tracks individual in-app purchase. See recommended `sendSKPaymentTransactions:` method.
|
|
292
|
-
|
|
293
|
-
@param productIdentifier purchased product ID
|
|
294
|
-
@param price price for the product
|
|
295
|
-
@param currencyCode currency of the price (ex: @"USD")
|
|
296
|
-
@param date time of the purchase (ex: [NSDate now])
|
|
297
|
-
*/
|
|
298
|
-
- (void)sendPurchase:(NSString *)productIdentifier withPrice:(NSDecimalNumber *)price currencyCode:(NSString *)currencyCode andDate:(NSDate *)date;
|
|
299
|
-
|
|
300
|
-
#endif
|
|
301
|
-
/**
|
|
302
|
-
Gets current push token.
|
|
303
|
-
|
|
304
|
-
@return Current push token. May be nil if no push token is available yet.
|
|
305
|
-
*/
|
|
306
|
-
- (NSString *)getPushToken;
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
Gets HWID. Unique device identifier that used in all API calls with Pushwoosh.
|
|
310
|
-
This is identifierForVendor for iOS >= 7.
|
|
311
|
-
|
|
312
|
-
@return Unique device identifier.
|
|
313
|
-
*/
|
|
314
|
-
- (NSString *)getHWID;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
Returns dictionary with enabled remove notificaton types.
|
|
318
|
-
|
|
319
|
-
Example enabled push:
|
|
320
|
-
@code
|
|
321
|
-
{
|
|
322
|
-
enabled = 1;
|
|
323
|
-
pushAlert = 1;
|
|
324
|
-
pushBadge = 1;
|
|
325
|
-
pushSound = 1;
|
|
326
|
-
type = 7;
|
|
327
|
-
}
|
|
328
|
-
@endcode
|
|
329
|
-
where "type" field is UIUserNotificationType
|
|
330
|
-
|
|
331
|
-
Disabled push:
|
|
332
|
-
@code
|
|
333
|
-
{
|
|
334
|
-
enabled = 1;
|
|
335
|
-
pushAlert = 0;
|
|
336
|
-
pushBadge = 0;
|
|
337
|
-
pushSound = 0;
|
|
338
|
-
type = 0;
|
|
339
|
-
}
|
|
340
|
-
@endcode
|
|
341
|
-
|
|
342
|
-
Note: In the latter example "enabled" field means that device can receive push notification but could not display alerts (ex: silent push)
|
|
343
|
-
*/
|
|
344
|
-
+ (NSMutableDictionary *)getRemoteNotificationStatus;
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
Clears the notifications from the notification center.
|
|
348
|
-
*/
|
|
349
|
-
+ (void)clearNotificationCenter;
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
353
|
-
This allows data and events to be matched across multiple user devices.
|
|
354
|
-
If setUserId succeeds competion is called with nil argument. If setUserId fails completion is called with error.
|
|
355
|
-
|
|
356
|
-
@param userId user identifier
|
|
357
|
-
*/
|
|
358
|
-
- (void)setUserId:(NSString *)userId completion:(void(^)(NSError * error))completion;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
362
|
-
This allows data and events to be matched across multiple user devices.
|
|
363
|
-
|
|
364
|
-
@param userId user identifier
|
|
365
|
-
*/
|
|
366
|
-
- (void)setUserId:(NSString *)userId;
|
|
367
|
-
|
|
368
|
-
/**
|
|
369
|
-
Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
370
|
-
This allows data and events to be matched across multiple user devices.
|
|
371
|
-
If setUser succeeds competion is called with nil argument. If setUser fails completion is called with error.
|
|
372
|
-
|
|
373
|
-
@param userId user identifier
|
|
374
|
-
@param emails user's emails array
|
|
375
|
-
*/
|
|
376
|
-
- (void)setUser:(NSString *)userId emails:(NSArray *)emails completion:(void(^)(NSError * error))completion;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
381
|
-
This allows data and events to be matched across multiple user devices.
|
|
382
|
-
|
|
383
|
-
@param userId user identifier
|
|
384
|
-
@param emails user's emails array
|
|
385
|
-
*/
|
|
386
|
-
- (void)setUser:(NSString *)userId emails:(NSArray *)emails;
|
|
387
|
-
|
|
388
|
-
/**
|
|
389
|
-
Set User indentifier. This could be Facebook ID, username or email, or any other user ID.
|
|
390
|
-
This allows data and events to be matched across multiple user devices.
|
|
391
|
-
If setUser succeeds competion is called with nil argument. If setUser fails completion is called with error.
|
|
392
|
-
|
|
393
|
-
@param userId user identifier
|
|
394
|
-
@param email user's email string
|
|
395
|
-
*/
|
|
396
|
-
- (void)setUser:(NSString *)userId email:(NSString *)email completion:(void(^)(NSError * error))completion;
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
Register emails list associated to the current user.
|
|
400
|
-
If setEmails succeeds competion is called with nil argument. If setEmails fails completion is called with error.
|
|
401
|
-
|
|
402
|
-
@param emails user's emails array
|
|
403
|
-
*/
|
|
404
|
-
- (void)setEmails:(NSArray *)emails completion:(void(^)(NSError * error))completion;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
Register emails list associated to the current user.
|
|
408
|
-
|
|
409
|
-
@param emails user's emails array
|
|
410
|
-
*/
|
|
411
|
-
- (void)setEmails:(NSArray *)emails;
|
|
412
|
-
|
|
413
|
-
/**
|
|
414
|
-
Register email associated to the current user. Email should be a string and could not be null or empty.
|
|
415
|
-
If setEmail succeeds competion is called with nil argument. If setEmail fails completion is called with error.
|
|
416
|
-
|
|
417
|
-
@param email user's email string
|
|
418
|
-
*/
|
|
419
|
-
- (void)setEmail:(NSString *)email completion:(void(^)(NSError * error))completion;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
Register email associated to the current user. Email should be a string and could not be null or empty.
|
|
423
|
-
|
|
424
|
-
@param email user's email string
|
|
425
|
-
*/
|
|
426
|
-
- (void)setEmail:(NSString *)email;
|
|
427
|
-
|
|
428
|
-
/**
|
|
429
|
-
Move all events from oldUserId to newUserId if doMerge is true. If doMerge is false all events for oldUserId are removed.
|
|
430
|
-
|
|
431
|
-
@param oldUserId source user
|
|
432
|
-
@param newUserId destination user
|
|
433
|
-
@param doMerge if false all events for oldUserId are removed, if true all events for oldUserId are moved to newUserId
|
|
434
|
-
@param completion callback
|
|
435
|
-
*/
|
|
436
|
-
- (void)mergeUserId:(NSString *)oldUserId to:(NSString *)newUserId doMerge:(BOOL)doMerge completion:(void (^)(NSError *error))completion;
|
|
437
|
-
|
|
438
|
-
/**
|
|
439
|
-
Starts communication with Pushwoosh server.
|
|
440
|
-
*/
|
|
441
|
-
- (void)startServerCommunication;
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
Stops communication with Pushwoosh server.
|
|
445
|
-
*/
|
|
446
|
-
- (void)stopServerCommunication;
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
Process URL of some deep link. Primarly used for register test devices.
|
|
450
|
-
|
|
451
|
-
@param url Deep Link URL
|
|
452
|
-
*/
|
|
453
|
-
#if TARGET_OS_IOS || TARGET_OS_WATCH
|
|
454
|
-
- (BOOL)handleOpenURL:(NSURL *)url;
|
|
455
|
-
#endif
|
|
456
|
-
|
|
457
|
-
@end
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
`PWNotificationCenterDelegateProxy` class handles notifications on iOS 10 and forwards methods of UNUserNotificationCenterDelegate to all added delegates.
|
|
461
|
-
*/
|
|
462
|
-
#if TARGET_OS_IOS || TARGET_OS_WATCH
|
|
463
|
-
@interface PWNotificationCenterDelegateProxy : NSObject <UNUserNotificationCenterDelegate>
|
|
464
|
-
#elif TARGET_OS_OSX
|
|
465
|
-
@interface PWNotificationCenterDelegateProxy : NSObject <NSUserNotificationCenterDelegate>
|
|
466
|
-
#endif
|
|
467
|
-
/**
|
|
468
|
-
Returns UNUserNotificationCenterDelegate that handles foreground push notifications on iOS10
|
|
469
|
-
*/
|
|
470
|
-
#if TARGET_OS_IOS || TARGET_OS_WATCH
|
|
471
|
-
@property (nonatomic, strong, readonly) id<UNUserNotificationCenterDelegate> defaultNotificationCenterDelegate;
|
|
472
|
-
#elif TARGET_OS_OSX
|
|
473
|
-
@property (nonatomic, strong, readonly) id<NSUserNotificationCenterDelegate> defaultNotificationCenterDelegate;
|
|
474
|
-
#endif
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
Adds extra UNUserNotificationCenterDelegate that handles foreground push notifications on iOS10.
|
|
478
|
-
*/
|
|
479
|
-
#if TARGET_OS_IOS || TARGET_OS_WATCH
|
|
480
|
-
- (void)addNotificationCenterDelegate:(id<UNUserNotificationCenterDelegate>)delegate;
|
|
481
|
-
#endif
|
|
482
|
-
@end
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
`PWTagsBuilder` class encapsulates the methods for creating tags parameters for sending them to the server.
|
|
487
|
-
*/
|
|
488
|
-
@interface PWTagsBuilder : NSObject
|
|
489
|
-
/**
|
|
490
|
-
Creates a dictionary for incrementing/decrementing a numeric tag on the server.
|
|
491
|
-
|
|
492
|
-
Example:
|
|
493
|
-
@code
|
|
494
|
-
NSDictionary *tags = @{
|
|
495
|
-
@"Alias" : aliasField.text,
|
|
496
|
-
@"FavNumber" : @([favNumField.text intValue]),
|
|
497
|
-
@"price": [PWTags incrementalTagWithInteger:5],
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
[[PushNotificationManager pushManager] setTags:tags];
|
|
501
|
-
@endcode
|
|
502
|
-
|
|
503
|
-
@param delta Difference that needs to be applied to the tag's counter.
|
|
504
|
-
|
|
505
|
-
@return Dictionary, that needs to be sent as the value for the tag
|
|
506
|
-
*/
|
|
507
|
-
+ (NSDictionary *)incrementalTagWithInteger:(NSInteger)delta;
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
Creates a dictionary for extending Tag’s values list with additional values
|
|
511
|
-
|
|
512
|
-
Example:
|
|
513
|
-
|
|
514
|
-
@code
|
|
515
|
-
NSDictionary *tags = @{
|
|
516
|
-
@"Alias" : aliasField.text,
|
|
517
|
-
@"FavNumber" : @([favNumField.text intValue]),
|
|
518
|
-
@"List" : [PWTags appendValuesToListTag:@[ @"Item1" ]]
|
|
519
|
-
};
|
|
520
|
-
|
|
521
|
-
[[PushNotificationManager pushManager] setTags:tags];
|
|
522
|
-
@endcode
|
|
523
|
-
|
|
524
|
-
@param array Array of values to be added to the tag.
|
|
525
|
-
|
|
526
|
-
@return Dictionary to be sent as the value for the tag
|
|
527
|
-
*/
|
|
528
|
-
+ (NSDictionary *)appendValuesToListTag:(NSArray<NSString *> *)array;
|
|
529
|
-
|
|
530
|
-
@end
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PWIInboxStyle.h
|
|
3
|
-
// PushwooshInboxUI
|
|
4
|
-
//
|
|
5
|
-
// Created by Pushwoosh on 01/11/2017.
|
|
6
|
-
// Copyright © 2017 Pushwoosh. All rights reserved.
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
#import <Foundation/Foundation.h>
|
|
10
|
-
#import <UIKit/UIKit.h>
|
|
11
|
-
|
|
12
|
-
typedef NSString * (^PWIDateFormatterBlock)(NSDate *date, NSObject *owner);
|
|
13
|
-
|
|
14
|
-
//! This class is designed to customize the Inbox appearance
|
|
15
|
-
@interface PWIInboxStyle : NSObject
|
|
16
|
-
|
|
17
|
-
//! This block customizes the date formatting
|
|
18
|
-
@property (nonatomic, readwrite) PWIDateFormatterBlock dateFormatterBlock;
|
|
19
|
-
|
|
20
|
-
//! The default icon in the cell next to the message; if not specified, the app icon is used
|
|
21
|
-
@property (nonatomic, readwrite) UIImage *defaultImageIcon;
|
|
22
|
-
|
|
23
|
-
//! The default font
|
|
24
|
-
@property (nonatomic, readwrite) UIFont *defaultFont;
|
|
25
|
-
|
|
26
|
-
//! The default text color
|
|
27
|
-
@property (nonatomic, readwrite) UIColor *defaultTextColor;
|
|
28
|
-
|
|
29
|
-
//! The text color of a read notification
|
|
30
|
-
@property (nonatomic, readwrite) UIColor *readTextColor;
|
|
31
|
-
|
|
32
|
-
//! The default background color
|
|
33
|
-
@property (nonatomic, readwrite) UIColor *backgroundColor;
|
|
34
|
-
|
|
35
|
-
//! The default selection color
|
|
36
|
-
@property (nonatomic, readwrite) UIColor *selectionColor;
|
|
37
|
-
|
|
38
|
-
//! The appearance of the unread messages mark
|
|
39
|
-
@property (nonatomic, readwrite) UIImage *unreadImage;
|
|
40
|
-
|
|
41
|
-
//! The image which is displayed if an error occurs and the list of inbox messages is empty
|
|
42
|
-
@property (nonatomic, readwrite) UIImage *listErrorImage;
|
|
43
|
-
|
|
44
|
-
//! The error text which is displayed when an error occurs; cannot be localized
|
|
45
|
-
@property (nonatomic, readwrite) NSString *listErrorMessage;
|
|
46
|
-
|
|
47
|
-
//! The image which is displayed if the list of inbox messages is empty
|
|
48
|
-
@property (nonatomic, readwrite) UIImage *listEmptyImage;
|
|
49
|
-
|
|
50
|
-
//! The text which is displayed if the list of inbox messages is empty; cannot be localized
|
|
51
|
-
@property (nonatomic, readwrite) NSString *listEmptyMessage;
|
|
52
|
-
|
|
53
|
-
//! The accent color
|
|
54
|
-
@property (nonatomic, readwrite) UIColor *accentColor;
|
|
55
|
-
|
|
56
|
-
//! The color of message titles
|
|
57
|
-
@property (nonatomic, readwrite) UIColor *titleColor;
|
|
58
|
-
|
|
59
|
-
//! The title color for read notifications
|
|
60
|
-
@property (nonatomic, readwrite) UIColor *readTitleColor;
|
|
61
|
-
|
|
62
|
-
//! The color of messages descriptions
|
|
63
|
-
@property (nonatomic, readwrite) UIColor *descriptionColor;
|
|
64
|
-
|
|
65
|
-
//! The color of message dates
|
|
66
|
-
@property (nonatomic, readwrite) UIColor *dateColor;
|
|
67
|
-
|
|
68
|
-
//! The color of the separator
|
|
69
|
-
@property (nonatomic, readwrite) UIColor *separatorColor;
|
|
70
|
-
|
|
71
|
-
//! The font of message titles
|
|
72
|
-
@property (nonatomic, readwrite) UIFont *titleFont;
|
|
73
|
-
|
|
74
|
-
//! The font of message descriptions
|
|
75
|
-
@property (nonatomic, readwrite) UIFont *descriptionFont;
|
|
76
|
-
|
|
77
|
-
//! The font of message dates
|
|
78
|
-
@property (nonatomic, readwrite) UIFont *dateFont;
|
|
79
|
-
|
|
80
|
-
//! The default bar color
|
|
81
|
-
@property (nonatomic, readwrite) UIColor *barBackgroundColor;
|
|
82
|
-
|
|
83
|
-
//! The default back button color
|
|
84
|
-
@property(nonatomic, readwrite) UIColor *barAccentColor;
|
|
85
|
-
|
|
86
|
-
//! The default bar accent color
|
|
87
|
-
@property (nonatomic, readwrite) UIColor *barTextColor;
|
|
88
|
-
|
|
89
|
-
//! The default bar title text
|
|
90
|
-
@property (nonatomic, readwrite) NSString *barTitle;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
The method returning the default style; all parameters might be changed
|
|
94
|
-
|
|
95
|
-
@retutn instance of default style
|
|
96
|
-
*/
|
|
97
|
-
+ (instancetype)defaultStyle;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
This method updates the default style for PWInboxViewController
|
|
101
|
-
|
|
102
|
-
@param style the new default style for PWInboxViewController
|
|
103
|
-
*/
|
|
104
|
-
+ (void)setupDefaultStyle:(PWIInboxStyle *)style;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
The method filling style's fields based on following parameters: icon, textColor, accentColor, date; all parameters might be changed
|
|
108
|
-
*/
|
|
109
|
-
+ (instancetype)customStyleWithDefaultImageIcon:(UIImage *)icon
|
|
110
|
-
textColor:(UIColor *)textColor
|
|
111
|
-
accentColor:(UIColor *)accentColor
|
|
112
|
-
font:(UIFont *)font;
|
|
113
|
-
/**
|
|
114
|
-
The method filling style's fields based on following parameters: icon, textColor, accentColor, font, dateFormatterBlock; all parameters might be changed
|
|
115
|
-
*/
|
|
116
|
-
+ (instancetype)customStyleWithDefaultImageIcon:(UIImage *)icon
|
|
117
|
-
textColor:(UIColor *)textColor
|
|
118
|
-
accentColor:(UIColor *)accentColor
|
|
119
|
-
font:(UIFont *)font
|
|
120
|
-
dateFromatterBlock:(PWIDateFormatterBlock)dateFormatterBlock;
|
|
121
|
-
|
|
122
|
-
@end
|