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.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +1 -0
- package/package.json +1 -1
- package/pushwoosh-react-native-plugin.podspec +2 -2
- package/src/android/build.gradle +1 -1
- package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshNotificationServiceExtension.java +1 -1
- package/src/ios/PushwooshPlugin/Pushwoosh.h +7 -7
- package/src/ios/PushwooshPlugin/Pushwoosh.m +113 -45
- 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/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/libPushwooshInboxUI.a +0 -0
|
@@ -58,6 +58,7 @@ body:
|
|
|
58
58
|
label: Your Pushwoosh React Native Plugin version
|
|
59
59
|
description: Your React Native Plugin version which was integrated to the app. You may find it on the [releases page](https://github.com/Pushwoosh/pushwoosh-react-native-plugin/releases)
|
|
60
60
|
options:
|
|
61
|
+
- 6.1.34
|
|
61
62
|
- 6.1.32
|
|
62
63
|
- 6.1.31
|
|
63
64
|
- 6.1.30
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = "pushwoosh-react-native-plugin"
|
|
3
|
-
s.version = "6.1.
|
|
3
|
+
s.version = "6.1.34"
|
|
4
4
|
s.summary = "React Native Pushwoosh Push Notifications module"
|
|
5
5
|
s.requires_arc = true
|
|
6
6
|
s.author = 'Pushwoosh'
|
|
@@ -15,6 +15,6 @@ Pod::Spec.new do |s|
|
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
|
|
17
17
|
s.dependency 'React'
|
|
18
|
-
s.dependency 'PushwooshXCFramework'
|
|
18
|
+
s.dependency 'PushwooshXCFramework', '6.7.9'
|
|
19
19
|
s.dependency 'PushwooshInboxUIXCFramework'
|
|
20
20
|
end
|
package/src/android/build.gradle
CHANGED
|
@@ -17,7 +17,7 @@ public class PushwooshNotificationServiceExtension extends NotificationServiceEx
|
|
|
17
17
|
ApplicationInfo ai = getApplicationContext().getPackageManager().getApplicationInfo(packageName, PackageManager.GET_META_DATA);
|
|
18
18
|
|
|
19
19
|
if (ai.metaData != null) {
|
|
20
|
-
showForegroundPush = ai.metaData.getBoolean("PW_BROADCAST_PUSH",
|
|
20
|
+
showForegroundPush = ai.metaData.getBoolean("PW_BROADCAST_PUSH", true) || ai.metaData.getBoolean("com.pushwoosh.foreground_push", true);
|
|
21
21
|
}
|
|
22
22
|
} catch (Exception e) {
|
|
23
23
|
PWLog.exception(e);
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
#import <React/RCTBridgeModule.h>
|
|
10
10
|
#import <React/RCTEventEmitter.h>
|
|
11
|
-
#import <
|
|
11
|
+
#import <PushwooshFramework/PushwooshFramework.h>
|
|
12
12
|
|
|
13
|
-
#if __has_include(<
|
|
14
|
-
#import <
|
|
15
|
-
#import <
|
|
13
|
+
#if __has_include(<PushwooshFramework/PushNotificationManager.h>)
|
|
14
|
+
#import <PushwooshFramework/PushNotificationManager.h>
|
|
15
|
+
#import <PushwooshFramework/PWInAppManager.h>
|
|
16
16
|
#import <PushwooshInboxUI/PushwooshInboxUI.h>
|
|
17
|
-
#import <
|
|
18
|
-
#import <
|
|
19
|
-
#import <
|
|
17
|
+
#import <PushwooshFramework/PWGDPRManager.h>
|
|
18
|
+
#import <PushwooshFramework/PWInlineInAppView.h>
|
|
19
|
+
#import <PushwooshFramework/PWInbox.h>
|
|
20
20
|
#else
|
|
21
21
|
#import "PushNotificationManager.h"
|
|
22
22
|
#import "PWInAppManager.h"
|
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
#import <React/RCTConvert.h>
|
|
14
14
|
|
|
15
15
|
#import <UserNotifications/UserNotifications.h>
|
|
16
|
-
#import <
|
|
16
|
+
#import <PushwooshFramework/PushNotificationManager.h>
|
|
17
17
|
|
|
18
18
|
#import <objc/runtime.h>
|
|
19
19
|
|
|
20
|
+
#define kPushwooshPluginImplementationInfoPlistKey @"Pushwoosh_PLUGIN_NOTIFICATION_HANDLER"
|
|
21
|
+
|
|
20
22
|
static id objectOrNull(id object) {
|
|
21
23
|
if (object) {
|
|
22
24
|
return object;
|
|
@@ -56,16 +58,18 @@ void pushwoosh_swizzle(Class class, SEL fromChange, SEL toChange, IMP impl, cons
|
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
@implementation PushwooshPlugin
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
@implementation PushwooshPlugin {
|
|
62
|
+
NSString *lastPushwooshHash;
|
|
63
|
+
|
|
64
|
+
API_AVAILABLE(ios(10))
|
|
65
|
+
__weak id<UNUserNotificationCenterDelegate> _originalNotificationCenterDelegate;
|
|
66
|
+
API_AVAILABLE(ios(10))
|
|
67
|
+
struct {
|
|
68
|
+
unsigned int willPresentNotification : 1;
|
|
69
|
+
unsigned int didReceiveNotificationResponse : 1;
|
|
70
|
+
unsigned int openSettingsForNotification : 1;
|
|
71
|
+
} _originalNotificationCenterDelegateResponds;
|
|
72
|
+
}
|
|
69
73
|
|
|
70
74
|
#pragma mark - Pushwoosh RCTBridgeModule
|
|
71
75
|
|
|
@@ -75,6 +79,10 @@ RCT_EXPORT_MODULE(Pushwoosh);
|
|
|
75
79
|
return dispatch_get_main_queue();
|
|
76
80
|
}
|
|
77
81
|
|
|
82
|
+
+ (NSString *)getPluginImplementationInfoPlistKey {
|
|
83
|
+
return [[NSBundle mainBundle] objectForInfoDictionaryKey:kPushwooshPluginImplementationInfoPlistKey];
|
|
84
|
+
}
|
|
85
|
+
|
|
78
86
|
RCT_EXPORT_METHOD(init:(NSDictionary*)config success:(RCTResponseSenderBlock)success error:(RCTResponseSenderBlock)error) {
|
|
79
87
|
NSString *appCode = config[@"pw_appid"];
|
|
80
88
|
NSString *notificationHandling = config[@"pw_notification_handling"];
|
|
@@ -100,35 +108,39 @@ RCT_EXPORT_METHOD(init:(NSDictionary*)config success:(RCTResponseSenderBlock)suc
|
|
|
100
108
|
|
|
101
109
|
// We set Pushwoosh UNUserNotificationCenter delegate unless CUSTOM is specified in the config
|
|
102
110
|
if(![notificationHandling isEqualToString:@"CUSTOM"]) {
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
if (![PushwooshPlugin getPluginImplementationInfoPlistKey]) {
|
|
112
|
+
[UNUserNotificationCenter currentNotificationCenter].delegate = [PushNotificationManager pushManager].notificationCenterDelegate;
|
|
113
|
+
} else {
|
|
114
|
+
if (@available(iOS 10, *)) {
|
|
115
|
+
BOOL shouldReplaceDelegate = YES;
|
|
116
|
+
|
|
117
|
+
UNUserNotificationCenter *notificationCenter = [UNUserNotificationCenter currentNotificationCenter];
|
|
118
|
+
|
|
108
119
|
#if !TARGET_OS_OSX
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
120
|
+
if ([notificationCenter.delegate conformsToProtocol:@protocol(PushNotificationDelegate)]) {
|
|
121
|
+
shouldReplaceDelegate = NO;
|
|
122
|
+
}
|
|
112
123
|
#endif
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
124
|
+
|
|
125
|
+
if (notificationCenter.delegate != nil && shouldReplaceDelegate) {
|
|
126
|
+
_originalNotificationCenterDelegate = notificationCenter.delegate;
|
|
127
|
+
_originalNotificationCenterDelegateResponds.openSettingsForNotification =
|
|
128
|
+
(unsigned int)[_originalNotificationCenterDelegate
|
|
129
|
+
respondsToSelector:@selector(userNotificationCenter:openSettingsForNotification:)];
|
|
130
|
+
_originalNotificationCenterDelegateResponds.willPresentNotification =
|
|
131
|
+
(unsigned int)[_originalNotificationCenterDelegate
|
|
132
|
+
respondsToSelector:@selector(userNotificationCenter:
|
|
133
|
+
willPresentNotification:withCompletionHandler:)];
|
|
134
|
+
_originalNotificationCenterDelegateResponds.didReceiveNotificationResponse =
|
|
135
|
+
(unsigned int)[_originalNotificationCenterDelegate
|
|
136
|
+
respondsToSelector:@selector(userNotificationCenter:
|
|
137
|
+
didReceiveNotificationResponse:withCompletionHandler:)];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (shouldReplaceDelegate) {
|
|
141
|
+
__strong PushwooshPlugin<UNUserNotificationCenterDelegate> *strongSelf = (PushwooshPlugin<UNUserNotificationCenterDelegate> *)self;
|
|
142
|
+
notificationCenter.delegate = (id<UNUserNotificationCenterDelegate>)strongSelf;
|
|
143
|
+
}
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
146
|
}
|
|
@@ -460,12 +472,37 @@ void pwplugin_didFailToRegisterForRemoteNotificationsWithError(id self, SEL _cmd
|
|
|
460
472
|
(void (^)(UNNotificationPresentationOptions options))completionHandler
|
|
461
473
|
API_AVAILABLE(ios(10.0)) {
|
|
462
474
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
475
|
+
UNMutableNotificationContent *content = notification.request.content.mutableCopy;
|
|
476
|
+
BOOL isPushwooshMessage = [PWMessage isPushwooshMessage:notification.request.content.userInfo];
|
|
477
|
+
NSString *currentHash = content.userInfo[@"p"];
|
|
478
|
+
BOOL isNeedToImplementInPlugin = [[PushwooshPlugin getPluginImplementationInfoPlistKey] boolValue];
|
|
479
|
+
|
|
480
|
+
if (isPushwooshMessage && isNeedToImplementInPlugin && ![lastPushwooshHash isEqualToString:currentHash]) {
|
|
481
|
+
lastPushwooshHash = currentHash;
|
|
482
|
+
|
|
483
|
+
if ([PushNotificationManager pushManager].showPushnotificationAlert) {
|
|
484
|
+
completionHandler(UNNotificationPresentationOptionSound | UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionAlert);
|
|
485
|
+
} else {
|
|
486
|
+
[[PushNotificationManager pushManager] handlePushReceived:content.userInfo];
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
[self sendJSEvent:kPushReceivedJSEvent withArgs:content.userInfo];
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
if (_originalNotificationCenterDelegate != nil &&
|
|
493
|
+
_originalNotificationCenterDelegateResponds.willPresentNotification) {
|
|
494
|
+
|
|
495
|
+
dispatch_block_t presentationBlock = ^{
|
|
496
|
+
[self->_originalNotificationCenterDelegate userNotificationCenter:center
|
|
497
|
+
willPresentNotification:notification
|
|
498
|
+
withCompletionHandler:completionHandler];
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
if (isPushwooshMessage) {
|
|
502
|
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.59 * NSEC_PER_SEC)), dispatch_get_main_queue(), presentationBlock);
|
|
503
|
+
} else {
|
|
504
|
+
presentationBlock();
|
|
505
|
+
}
|
|
469
506
|
}
|
|
470
507
|
|
|
471
508
|
if (_originalNotificationCenterDelegate != nil &&
|
|
@@ -493,6 +530,8 @@ API_AVAILABLE(ios(10.0)) {
|
|
|
493
530
|
didReceiveNotificationResponse:(UNNotificationResponse *)response
|
|
494
531
|
withCompletionHandler:(void (^)(void))completionHandler
|
|
495
532
|
API_AVAILABLE(ios(10.0)) {
|
|
533
|
+
BOOL isNeedToImplementInPlugin = [[PushwooshPlugin getPluginImplementationInfoPlistKey] boolValue];
|
|
534
|
+
|
|
496
535
|
dispatch_block_t handlePushAcceptanceBlock = ^{
|
|
497
536
|
if (![response.actionIdentifier isEqualToString:UNNotificationDismissActionIdentifier]) {
|
|
498
537
|
if (![response.actionIdentifier isEqualToString:UNNotificationDefaultActionIdentifier] && [[PushNotificationManager pushManager].delegate respondsToSelector:@selector(onActionIdentifierReceived:withNotification:)]) {
|
|
@@ -501,7 +540,13 @@ API_AVAILABLE(ios(10.0)) {
|
|
|
501
540
|
}
|
|
502
541
|
};
|
|
503
542
|
|
|
504
|
-
if ([self isRemoteNotification:response.notification]
|
|
543
|
+
if ([self isRemoteNotification:response.notification] && [PWMessage isPushwooshMessage:response.notification.request.content.userInfo]) {
|
|
544
|
+
NSDictionary *userInfo = response.notification.request.content.userInfo;
|
|
545
|
+
|
|
546
|
+
if (isNeedToImplementInPlugin) {
|
|
547
|
+
[[PushNotificationManager pushManager] handlePushAccepted:userInfo onStart:[self isOnStart:userInfo]];
|
|
548
|
+
}
|
|
549
|
+
|
|
505
550
|
handlePushAcceptanceBlock();
|
|
506
551
|
} else if ([response.notification.request.content.userInfo objectForKey:@"pw_push"]) {
|
|
507
552
|
handlePushAcceptanceBlock();
|
|
@@ -517,6 +562,29 @@ API_AVAILABLE(ios(10.0)) {
|
|
|
517
562
|
}
|
|
518
563
|
}
|
|
519
564
|
|
|
565
|
+
- (BOOL)isOnStart:(NSDictionary *)userInfo {
|
|
566
|
+
NSDictionary *pushStartDictionary = [self startPushInfoFromInfoDictionary:userInfo];
|
|
567
|
+
return pushStartDictionary != nil;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
- (NSDictionary *)startPushInfoFromInfoDictionary:(NSDictionary *)userInfo {
|
|
571
|
+
//try as launchOptions dictionary
|
|
572
|
+
NSDictionary *pushDict = userInfo[UIApplicationLaunchOptionsRemoteNotificationKey];
|
|
573
|
+
if (pushDict == nil) {
|
|
574
|
+
id notification = userInfo[UIApplicationLaunchOptionsLocalNotificationKey];
|
|
575
|
+
|
|
576
|
+
if (notification && [notification isKindOfClass:[UILocalNotification class]]) {
|
|
577
|
+
pushDict = [notification userInfo];
|
|
578
|
+
|
|
579
|
+
if (pushDict[@"pw_push"] == nil) {
|
|
580
|
+
pushDict = nil;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
return pushDict;
|
|
586
|
+
}
|
|
587
|
+
|
|
520
588
|
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
|
|
521
589
|
openSettingsForNotification:(nullable UNNotification *)notification
|
|
522
590
|
API_AVAILABLE(ios(10.0)) {
|
package/src/ios/PWAppDelegate.h
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PWAppDelegate.h
|
|
3
|
-
// Pushwoosh SDK
|
|
4
|
-
// (c) Pushwoosh 2018
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
#if TARGET_OS_IPHONE
|
|
8
|
-
|
|
9
|
-
#import <UIKit/UIKit.h>
|
|
10
|
-
|
|
11
|
-
/*
|
|
12
|
-
Base AppDelegate class for easier integration.
|
|
13
|
-
*/
|
|
14
|
-
@interface PWAppDelegate : UIResponder <UIApplicationDelegate>
|
|
15
|
-
|
|
16
|
-
@property (nonatomic, strong) UIWindow *window;
|
|
17
|
-
|
|
18
|
-
@end
|
|
19
|
-
|
|
20
|
-
#endif
|
package/src/ios/PWGDPRManager.h
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PWGDPRManager.h
|
|
3
|
-
// Pushwoosh SDK
|
|
4
|
-
// (c) Pushwoosh 2018
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
#import <Foundation/Foundation.h>
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
`PWGDPRManager` class offers access to the singleton-instance of the manager responsible for channels management required by GDPR.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
FOUNDATION_EXPORT NSString * const PWGDPRStatusDidChangeNotification;
|
|
14
|
-
|
|
15
|
-
@interface PWGDPRManager : NSObject
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
Indicates availability of the GDPR compliance solution.
|
|
19
|
-
*/
|
|
20
|
-
@property (nonatomic, readonly, getter=isAvailable) BOOL available;
|
|
21
|
-
|
|
22
|
-
@property (nonatomic, readonly, getter=isCommunicationEnabled) BOOL communicationEnabled;
|
|
23
|
-
|
|
24
|
-
@property (nonatomic, readonly, getter=isDeviceDataRemoved) BOOL deviceDataRemoved;
|
|
25
|
-
|
|
26
|
-
+ (instancetype)sharedManager;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
Enable/disable all communication with Pushwoosh. Enabled by default.
|
|
30
|
-
*/
|
|
31
|
-
- (void)setCommunicationEnabled:(BOOL)enabled completion:(void (^)(NSError *error))completion;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
Removes all device data from Pushwoosh and stops all interactions and communication permanently.
|
|
35
|
-
*/
|
|
36
|
-
- (void)removeAllDeviceDataWithCompletion:(void (^)(NSError *error))completion;
|
|
37
|
-
|
|
38
|
-
#if TARGET_OS_IOS || TARGET_OS_OSX
|
|
39
|
-
|
|
40
|
-
- (void)showGDPRConsentUI;
|
|
41
|
-
|
|
42
|
-
- (void)showGDPRDeletionUI;
|
|
43
|
-
|
|
44
|
-
#endif
|
|
45
|
-
|
|
46
|
-
@end
|
package/src/ios/PWIInboxStyle.h
DELETED
|
@@ -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
|
package/src/ios/PWIInboxUI.h
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// PWIInboxUI.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
|
-
@protocol PWInboxMessageProtocol;
|
|
13
|
-
|
|
14
|
-
@interface PWIInboxViewController : UIViewController
|
|
15
|
-
|
|
16
|
-
@property (nonatomic) void (^onMessageClickBlock)(id<PWInboxMessageProtocol> message);
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
Reloads everything from scratch.
|
|
20
|
-
*/
|
|
21
|
-
- (void)reloadData;
|
|
22
|
-
- (instancetype)init NS_UNAVAILABLE;
|
|
23
|
-
|
|
24
|
-
@end
|
|
25
|
-
|
|
26
|
-
@class PWIInboxStyle;
|
|
27
|
-
@interface PWIInboxUI : NSObject
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
@return PWIInboxViewController with a specified style
|
|
31
|
-
*/
|
|
32
|
-
+ (PWIInboxViewController *)createInboxControllerWithStyle:(PWIInboxStyle *)style;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
@return PWIInboxViewController with a specified style and height of table view
|
|
36
|
-
*/
|
|
37
|
-
+ (PWIInboxViewController *)createInboxControllerWithStyle:(PWIInboxStyle *)style andContentHeight:(CGFloat)contentHeight;
|
|
38
|
-
|
|
39
|
-
@end
|