@selligent-marketing-cloud/selligent-react-native 2.5.0 → 2.6.0
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 +215 -205
- package/RNSelligent.podspec +2 -2
- package/android/build.gradle +7 -7
- package/android/libs/sdk-release.aar +0 -0
- package/android/src/main/java/com/selligent/RNSelligent.java +0 -1
- package/constants.d.ts +6 -0
- package/constants.js +14 -2
- package/index.d.ts +3 -0
- package/index.ios.js +12 -0
- package/ios/ClientSettings.h +1 -0
- package/ios/ClientSettings.m +2 -0
- package/ios/EnumMapper.h +4 -0
- package/ios/EnumMapper.m +10 -0
- package/ios/RNSelligent.m +7 -1
- package/ios/RemoteMessageDisplayType.h +5 -0
- package/ios/SMManagerSetting+ClientSettings.m +10 -4
- package/ios/include/SMBaseMessage.h +8 -12
- package/ios/include/SMBlock.h +2 -2
- package/ios/include/SMClearCache.h +0 -2
- package/ios/include/SMContentAlignment.h +1 -2
- package/ios/include/SMDeviceInfos.h +9 -7
- package/ios/include/SMDisplayMode.h +1 -2
- package/ios/include/SMEvent.h +20 -16
- package/ios/include/SMEventUser.h +0 -1
- package/ios/include/SMEventUserLogin.h +11 -16
- package/ios/include/SMEventUserLogout.h +12 -16
- package/ios/include/SMEventUserRegistration.h +12 -17
- package/ios/include/SMEventUserUnregistration.h +12 -16
- package/ios/include/SMFailure.h +1 -6
- package/ios/include/SMHelper.h +9 -5
- package/ios/include/SMInAppContentHTMLViewController.h +11 -9
- package/ios/include/SMInAppContentImageViewController.h +6 -5
- package/ios/include/SMInAppContentMessage.h +12 -12
- package/ios/include/SMInAppContentStyleOptions.h +91 -79
- package/ios/include/SMInAppContentType.h +2 -3
- package/ios/include/SMInAppContentURLViewController.h +10 -9
- package/ios/include/SMInAppContentViewController.h +3 -5
- package/ios/include/SMInAppMessage.h +22 -14
- package/ios/include/SMInAppMessageType.h +1 -5
- package/ios/include/SMInAppRefreshType.h +1 -1
- package/ios/include/SMLink.h +7 -11
- package/ios/include/SMLog.h +1 -1
- package/ios/include/SMManager+DataTransaction.h +6 -13
- package/ios/include/SMManager+InAppContent.h +20 -23
- package/ios/include/SMManager+InAppMessage.h +22 -21
- package/ios/include/SMManager+Location.h +5 -8
- package/ios/include/SMManager+Log.h +3 -14
- package/ios/include/SMManager+RemoteNotification.h +38 -34
- package/ios/include/SMManager+SMEvent.h +10 -10
- package/ios/include/SMManager+SMLink.h +44 -0
- package/ios/include/SMManager+SilentPush.h +5 -22
- package/ios/include/SMManager+StyleOptions.h +5 -8
- package/ios/include/SMManager+UserNotification.h +44 -32
- package/ios/include/SMManager+ViewController.h +45 -0
- package/ios/include/SMManager.h +11 -26
- package/ios/include/SMManagerInAppMessageDelegate.h +4 -5
- package/ios/include/SMManagerSetting+Location.h +27 -0
- package/ios/include/SMManagerSetting.h +53 -35
- package/ios/include/SMManagerSettingIAC.h +6 -17
- package/ios/include/SMManagerSettingIAM.h +7 -16
- package/ios/include/SMManagerUniversalLinksDelegate.h +23 -0
- package/ios/include/SMMessage.h +1 -3
- package/ios/include/SMNSNotification.h +2 -2
- package/ios/include/SMNotificationAnnotationData.h +4 -8
- package/ios/include/SMNotificationButtonData.h +1 -6
- package/ios/include/SMNotificationButtonType.h +1 -2
- package/ios/include/SMNotificationMessage.h +31 -0
- package/ios/include/SMRemoteMessageDisplayType.h +32 -0
- package/ios/include/SMSuccess.h +1 -4
- package/ios/{libSelligentMobile2.6.1.a → libSelligentMobile2.7.a} +0 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
//
|
|
2
|
+
// SMInAppMessage.h
|
|
3
3
|
// MobileSDK
|
|
4
4
|
//
|
|
5
5
|
// Created by Gilbert Schakal on 19/05/15.
|
|
@@ -10,34 +10,42 @@
|
|
|
10
10
|
#import "SMBaseMessage.h"
|
|
11
11
|
#import "SMInAppMessageType.h"
|
|
12
12
|
|
|
13
|
+
@interface SMInAppMessage : SMBaseMessage
|
|
14
|
+
|
|
13
15
|
/*!
|
|
14
|
-
*
|
|
15
|
-
* #SMInAppMessage :#
|
|
16
|
+
* NSString instance providing the title of the inapp-notification
|
|
16
17
|
*/
|
|
17
|
-
@
|
|
18
|
+
@property (readonly, nonatomic) NSString *_Nullable title;
|
|
18
19
|
|
|
19
20
|
/*!
|
|
20
|
-
* NSString instance providing the
|
|
21
|
+
* NSString instance providing the content of the inapp-notification
|
|
21
22
|
*/
|
|
22
|
-
@property (nonatomic) NSString
|
|
23
|
+
@property (readonly, nonatomic) NSString *_Nullable body;
|
|
24
|
+
|
|
25
|
+
/*!
|
|
26
|
+
* NSArray of SMNotificationAnnotationData objects for map inapp-notification
|
|
27
|
+
*/
|
|
28
|
+
@property (readonly, nonatomic) NSArray *_Nullable arrayMapAnnotations;
|
|
29
|
+
|
|
23
30
|
/*!
|
|
24
|
-
*
|
|
31
|
+
* NSArray of SMLink objects from the inapp-notification
|
|
25
32
|
*/
|
|
26
|
-
@property (nonatomic)
|
|
33
|
+
@property (readonly, nonatomic) NSArray *_Nullable arrayIAMLinks;
|
|
27
34
|
|
|
28
35
|
/*!
|
|
29
|
-
*
|
|
36
|
+
* SMInAppMessageType instance providing the in inapp-notification type
|
|
37
|
+
* @see SMInAppMessageType
|
|
30
38
|
*/
|
|
31
|
-
@property (nonatomic)
|
|
39
|
+
@property (readonly, nonatomic) SMInAppMessageType iamType;
|
|
32
40
|
|
|
33
41
|
/*!
|
|
34
|
-
*
|
|
42
|
+
* NSString instance providing the title of the remote-notification
|
|
35
43
|
*/
|
|
36
|
-
@property (nonatomic)
|
|
44
|
+
@property (readonly, nonatomic) NSString *_Nullable apsTitle;
|
|
37
45
|
|
|
38
46
|
/*!
|
|
39
|
-
*
|
|
47
|
+
* NSString instance providing the body of the remote-notification
|
|
40
48
|
*/
|
|
41
|
-
@property (nonatomic)
|
|
49
|
+
@property (readonly, nonatomic) NSString *_Nullable apsBody;
|
|
42
50
|
|
|
43
51
|
@end
|
|
@@ -6,11 +6,7 @@
|
|
|
6
6
|
// Copyright © 2020 Selligent. All rights reserved.
|
|
7
7
|
//
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
* #SMInAppMessageType :#
|
|
11
|
-
*/
|
|
12
|
-
typedef NS_ENUM (NSInteger, SMInAppMessageType){
|
|
13
|
-
|
|
9
|
+
typedef NS_ENUM (NSInteger, SMInAppMessageType) {
|
|
14
10
|
/*!
|
|
15
11
|
* In App message of unknown type.
|
|
16
12
|
*/
|
package/ios/include/SMLink.h
CHANGED
|
@@ -7,37 +7,33 @@
|
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
#import <Foundation/Foundation.h>
|
|
10
|
-
|
|
11
|
-
|
|
12
10
|
#import "SMNotificationButtonType.h"
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
13
|
+
*
|
|
18
14
|
*/
|
|
19
15
|
@interface SMLink : NSObject
|
|
20
16
|
|
|
21
17
|
/*!
|
|
22
18
|
* NSString instance providing the id of the button
|
|
23
19
|
*/
|
|
24
|
-
@property (nonatomic, strong) NSString
|
|
20
|
+
@property (readonly, nonatomic, strong) NSString *_Nullable idButtonData;
|
|
25
21
|
|
|
26
22
|
/*!
|
|
27
23
|
* NSString instance providing the label of the button
|
|
28
24
|
*/
|
|
29
|
-
@property (nonatomic, strong) NSString
|
|
25
|
+
@property (readonly, nonatomic, strong) NSString *_Nullable label;
|
|
30
26
|
|
|
31
27
|
/*!
|
|
32
28
|
* NSString instance providing the value of the button
|
|
33
29
|
*/
|
|
34
|
-
@property (nonatomic, strong) NSString
|
|
30
|
+
@property (readonly, nonatomic, strong) NSString *_Nullable value;
|
|
35
31
|
|
|
36
32
|
/*!
|
|
37
33
|
* The type (SMNotificationButtonType) of action that the button will execute.
|
|
38
|
-
*
|
|
34
|
+
*
|
|
35
|
+
* @see SMNotificationButtonType
|
|
39
36
|
*/
|
|
40
|
-
@property (nonatomic) SMNotificationButtonType type;
|
|
41
|
-
|
|
37
|
+
@property (readonly, nonatomic) SMNotificationButtonType type;
|
|
42
38
|
|
|
43
39
|
@end
|
package/ios/include/SMLog.h
CHANGED
|
@@ -5,36 +5,29 @@
|
|
|
5
5
|
// Created by Gilbert Schakal on 08/02/2017.
|
|
6
6
|
// Copyright © 2017 Selligent. All rights reserved.
|
|
7
7
|
//
|
|
8
|
+
|
|
8
9
|
#import "SMManager.h"
|
|
9
10
|
#import "SMDeviceInfos.h"
|
|
10
11
|
|
|
11
|
-
|
|
12
12
|
/**
|
|
13
13
|
* This category will help you to retrieve or send specific information to the selligent platform.
|
|
14
|
-
*
|
|
15
|
-
* #SMManager+DataTransaction :#
|
|
16
14
|
*/
|
|
17
15
|
@interface SMManager (DataTransaction)
|
|
18
16
|
|
|
19
|
-
|
|
20
17
|
/**
|
|
21
|
-
* @warning Deprecated method
|
|
22
18
|
* @discussion In order to send device informations to the back-end you can use
|
|
23
|
-
*
|
|
24
|
-
* - sendDeviceInfo:(SMDeviceInfos*)infos;
|
|
19
|
+
* @warning Deprecated method
|
|
25
20
|
*/
|
|
26
|
-
-(void)sendDeviceInfo __deprecated;
|
|
27
|
-
|
|
21
|
+
- (void) sendDeviceInfo __deprecated __deprecated_msg("Use sendDeviceInfo: instead.");
|
|
28
22
|
|
|
29
23
|
/*!
|
|
30
24
|
* This method allow you to send an event with pre-defined devices informations to the back-end
|
|
31
|
-
*
|
|
32
|
-
* @discussion The informations to be sent will be set in a SMDeviceInfos object. Each property of the created object will be a data that will be provided to the back-end. For additional informations you can refer to SMDevicesInfos.
|
|
33
25
|
*
|
|
26
|
+
* @discussion The informations to be sent will be set in a SMDeviceInfos object. Each property of the created object will be a data that will be provided to the back-end. For additional informations you can refer to SMDevicesInfos.
|
|
34
27
|
* This call can be done at any time after starting the library and if the properties of SMDeviceInfos object has not changed from a previous call, the event will not be sent to avoid platform unnecessarily overload.
|
|
35
|
-
*
|
|
36
28
|
* @param deviceInfos SMDeviceInfos object
|
|
29
|
+
* @see SMDeviceInfos
|
|
37
30
|
*/
|
|
38
|
-
-(void)sendDeviceInfo:(SMDeviceInfos*)deviceInfos;
|
|
31
|
+
- (void) sendDeviceInfo:(SMDeviceInfos*_Nullable)deviceInfos;
|
|
39
32
|
|
|
40
33
|
@end
|
|
@@ -13,16 +13,14 @@
|
|
|
13
13
|
|
|
14
14
|
@class SMInAppContentViewController;
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
/*!
|
|
18
|
-
* #Introduction :#
|
|
19
17
|
* In-Application-Content (IAC) is an optional service which will retrieve messages from the back-end each time the application enters foregrounds at specific frequencies and if connection is available.
|
|
20
18
|
*
|
|
21
19
|
* Once new messages were retrieved, the library notifies the application about it.
|
|
22
20
|
*
|
|
23
|
-
* Each IAC is is from a specific type
|
|
21
|
+
* Each IAC is is from a specific type (SMInAppContentType) and is also linked to a category defined by yourself
|
|
24
22
|
*
|
|
25
|
-
*
|
|
23
|
+
* ##Implementation
|
|
26
24
|
* In a nutshell, activate the IAC-service is a one step process:
|
|
27
25
|
*
|
|
28
26
|
* * Create an SMManagerSettingIAC instance and inject it in SMManagerSetting with [SMManagerSetting configureInAppContentServiceWithSetting:]
|
|
@@ -32,7 +30,7 @@
|
|
|
32
30
|
* This notification will provide you with the number of IAC's by category.
|
|
33
31
|
* Please be aware that it’s the unique application’s chance to capture and store that information.
|
|
34
32
|
*
|
|
35
|
-
*
|
|
33
|
+
* ##Displaying IAC
|
|
36
34
|
*
|
|
37
35
|
* * With the SDK view controllers:
|
|
38
36
|
*
|
|
@@ -64,7 +62,7 @@
|
|
|
64
62
|
*
|
|
65
63
|
* ` -(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
|
|
66
64
|
* {
|
|
67
|
-
* if([segue.identifier isEqualToString:@"YourSegue"]){
|
|
65
|
+
* if ([segue.identifier isEqualToString:@"YourSegue"]) {
|
|
68
66
|
* _sminappcontentviewcontroller = segue.destinationViewController;
|
|
69
67
|
* [self.sminappcontentviewcontroller setCategory:@"anycategory"];
|
|
70
68
|
* }
|
|
@@ -78,7 +76,7 @@
|
|
|
78
76
|
*
|
|
79
77
|
* If you decide to use this way of interacting with IAC it is important that you keep in mind that you will be responsible of the display of the content and you will have to call to setInAppContentAsSeen: whenever an InAppContent is showed to the user and to executeLinkAction:InAppContent: whenever user interact with an action link of the in app content.
|
|
80
78
|
*
|
|
81
|
-
*
|
|
79
|
+
* ##Fetching modes
|
|
82
80
|
* IAC may be retrieved from two different modes corresponding to the application's state:
|
|
83
81
|
*
|
|
84
82
|
* * Foreground-fetch -- When the application is in foreground.
|
|
@@ -90,13 +88,13 @@
|
|
|
90
88
|
*
|
|
91
89
|
* Following documentation explains how to activate each mode:
|
|
92
90
|
*
|
|
93
|
-
*
|
|
91
|
+
* ##Fetching IAC in foreground
|
|
94
92
|
* In order to retrieve IAC while the application is running, make sure to do the folllowing:
|
|
95
93
|
*
|
|
96
94
|
* - Create and configure an SMManagerSettingIAC instance accordingly.
|
|
97
95
|
* - Provide the created SMManagerSettingIAC instance to SMManager before starting the library
|
|
98
96
|
*
|
|
99
|
-
*
|
|
97
|
+
* ##Fetching IAC in background
|
|
100
98
|
* Initially, this mode has been added as a complementary-option to the foreground-mode.
|
|
101
99
|
* However, it can be used as a single-fetch-mode if fits best your application's need.
|
|
102
100
|
*
|
|
@@ -108,22 +106,19 @@
|
|
|
108
106
|
* - Provide the created SMManagerSettingIAC instance to SMManager before starting the library.
|
|
109
107
|
* - In the application's target, enable the following: Capabilities > Background Modes > Background Fetch
|
|
110
108
|
* - Implement performFetchWithCompletionHandler: in UIApplication's delegate (under delegate method application:performFetchWithCompletionHandler:)
|
|
111
|
-
*
|
|
112
|
-
* #SMManager+InAppContent :#
|
|
113
109
|
*/
|
|
114
110
|
|
|
115
111
|
@interface SMManager (InAppContent)
|
|
116
112
|
|
|
117
|
-
|
|
118
113
|
/*!
|
|
119
114
|
* Call when SDK has already provided you with a SMInAppContentViewController (of any type : SMInAppContentHTMLViewController , SMInAppContentImageViewController or SMInAppContentURLViewController) and you want to display it in a UIContainerView defined anywhere in your app.
|
|
120
115
|
* @discussion The viewcontroller will take all available space in the UIContainerView
|
|
121
116
|
* @param smViewController a SMInAppContentViewController
|
|
122
117
|
* @param containerView the UIContainerView in which In App Content will be displayed
|
|
123
118
|
* @param parentViewController the parent UIViewController of your UIContainerView
|
|
119
|
+
* @see SMInAppContentViewController
|
|
124
120
|
*/
|
|
125
|
-
-(void) showSMController:
|
|
126
|
-
|
|
121
|
+
- (void) showSMController:(SMInAppContentViewController*_Nullable)smViewController InContainerView:(UIView*_Nullable)containerView OfParentViewController:(UIViewController*_Nullable)parentViewController;
|
|
127
122
|
|
|
128
123
|
/*!
|
|
129
124
|
* @abstract This will return an array of In App Contents
|
|
@@ -131,8 +126,9 @@
|
|
|
131
126
|
* @param category NSString the category for which you want your In App Contents
|
|
132
127
|
* @param type An SMInAppContentType - Url, Html or image
|
|
133
128
|
* @return returns an NSArray of SMInAppContentMessage
|
|
129
|
+
* @see SMInAppContentType
|
|
134
130
|
*/
|
|
135
|
-
- (NSArray*) getInAppContentsForCategory:(NSString*)category Type:(SMInAppContentType)type;
|
|
131
|
+
- (NSArray*_Nonnull) getInAppContentsForCategory:(NSString*_Nullable)category Type:(SMInAppContentType)type;
|
|
136
132
|
|
|
137
133
|
/*!
|
|
138
134
|
* @abstract This will return an array of In App Contents
|
|
@@ -141,25 +137,27 @@
|
|
|
141
137
|
* @param type An SMInAppContentType - Url, Html or image
|
|
142
138
|
* @param max An int
|
|
143
139
|
* @return returns an NSArray of SMInAppContentMessage
|
|
140
|
+
* @see SMInAppContentType
|
|
144
141
|
*/
|
|
145
|
-
- (NSArray*) getInAppContentsForCategory:(NSString*)category Type:(SMInAppContentType)type Max:(int)max;
|
|
142
|
+
- (NSArray*_Nonnull) getInAppContentsForCategory:(NSString*_Nullable)category Type:(SMInAppContentType)type Max:(int)max;
|
|
146
143
|
|
|
147
144
|
/*!
|
|
148
145
|
* @abstract This method will mark an IAC as viewed, save it in the cache and send the Open event to the server
|
|
149
146
|
* @discussion If the display mode is set to 0 (display once), the IAC will be discarded from the cache and will not be provided to you anymore with getInAppContentsForCategory:Type: or getInAppContentsForCategory:Type:Max:
|
|
150
147
|
* @param inAppContent an SMInAppContentMessage object
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
* @see SMInAppContentMessage
|
|
149
|
+
*/
|
|
150
|
+
- (void) setInAppContentAsSeen:(SMInAppContentMessage*_Nullable)inAppContent;
|
|
154
151
|
|
|
155
152
|
/*!
|
|
156
153
|
* @abstract This method must be called whenever a user has clicked on a link that you manage to display
|
|
157
154
|
* @discussion This will allow the sdk to inform the services that a link has been clicked and to process the action associated with the link
|
|
158
155
|
* @param link a SMLink object
|
|
159
156
|
* @param inAppContent a SMInAppContentMessage object
|
|
157
|
+
* @see SMLink
|
|
158
|
+
* @see SMInAppContentMessage
|
|
160
159
|
*/
|
|
161
|
-
- (void) executeLinkAction:(SMLink*)link InAppContent:(SMInAppContentMessage*)inAppContent;
|
|
162
|
-
|
|
160
|
+
- (void) executeLinkAction:(SMLink*_Nullable)link InAppContent:(SMInAppContentMessage*_Nullable)inAppContent;
|
|
163
161
|
|
|
164
162
|
/**
|
|
165
163
|
* This will allow the SDK to fetch the IAC when the OS will allow so.
|
|
@@ -167,7 +165,6 @@
|
|
|
167
165
|
* @param completionHandler The block-completion to be processed. Provided by the delegate call
|
|
168
166
|
* @warning Make sure to enable background-fetch in the application's capabilities
|
|
169
167
|
*/
|
|
170
|
-
- (void)performIACFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
|
171
|
-
|
|
168
|
+
- (void) performIACFetchWithCompletionHandler:(void (^_Nullable)(UIBackgroundFetchResult))completionHandler;
|
|
172
169
|
|
|
173
170
|
@end
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
@class WKNavigationDelegate;
|
|
18
18
|
|
|
19
19
|
/*!
|
|
20
|
-
* #Introduction :#
|
|
21
20
|
* In-Application-Message (IAM) is an optional service which will **automatically** retrieve messages from the back-end at specific frequencies.
|
|
22
21
|
* Once new messages were retrieved, the library notifies the application about it.
|
|
23
22
|
* Then, the application may display any IAM as a usual notification.
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
* Remote-push-notificaitons are almost live messages that are pushed to devices.
|
|
28
27
|
* While IAM are non-live-messages that the SDK fetch at specific intervals according to provided fetch-mode.
|
|
29
28
|
*
|
|
30
|
-
*
|
|
29
|
+
* ##Implementation:
|
|
31
30
|
* In a nutshell, activate the IAM-service is a two steps process:
|
|
32
31
|
*
|
|
33
32
|
* * First, create an SMManagerSettingIAM instance and inject it in SMManagerSetting with [SMManagerSetting configureInAppMessageServiceWithSetting:]
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
* This notification will provide you with the IAM's unique ID.
|
|
42
41
|
* Please be aware that it’s the unique application’s chance to capture and store that information.
|
|
43
42
|
*
|
|
44
|
-
*
|
|
43
|
+
* ##Displaying IAM
|
|
45
44
|
*
|
|
46
45
|
* As IAM and remote-notification share the same format, they are both displayed using the same APIs.
|
|
47
46
|
* Please read the documentation in SMManager(RemoteNotification) to know how to display any kind of notification.
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
* Once a SMInAppMessage has been displayed and has been seen by the user you need to call setInAppMessageAsSeen: to inform Selligent that the In App message has been opened
|
|
52
51
|
* In case there is links in the In App Message and in case one of the link is triggered by user please call executeLinkAction:: to process teh action related to the link and inform Selligent that the link has been clicked
|
|
53
52
|
*
|
|
54
|
-
*
|
|
53
|
+
* ##Fetching modes
|
|
55
54
|
* IAM may be retrieved from two different modes corresponding to the application's state:
|
|
56
55
|
*
|
|
57
56
|
* * Foreground-fetch -- When the application is in foreground.
|
|
@@ -63,14 +62,14 @@
|
|
|
63
62
|
*
|
|
64
63
|
* Following documentation explains how to activate each mode:
|
|
65
64
|
*
|
|
66
|
-
*
|
|
65
|
+
* ##Fetching IAM in foreground
|
|
67
66
|
* In order to retrieve IAM while the application is running, make sure to do the folllowing:
|
|
68
67
|
*
|
|
69
68
|
* - Create and configure an SMManagerSettingIAM instance accordingly.
|
|
70
69
|
* - Provide the created SMManagerSettingIAM instance to SMManager before starting the library
|
|
71
70
|
* - Enable In App message by calling enableInAppMessage: when your application needs it.
|
|
72
71
|
*
|
|
73
|
-
*
|
|
72
|
+
* ##Fetching IAM in background
|
|
74
73
|
* Initially, this mode has been added as a complementary-option to the foreground-mode.
|
|
75
74
|
* However, it can be used as a single-fetch-mode if fits best your application's need.
|
|
76
75
|
*
|
|
@@ -83,8 +82,6 @@
|
|
|
83
82
|
* - In the application's target, enable the following: Capabilities > Background Modes > Background Fetch
|
|
84
83
|
* - Implement performFetchWithCompletionHandler: in UIApplicaiton's delegate (under delegate method application:performFetchWithCompletionHandler:)
|
|
85
84
|
* - Enable In App message by calling enableInAppMessage: when your application needs it.
|
|
86
|
-
*
|
|
87
|
-
* #SMManager+InAppMessage :#
|
|
88
85
|
*/
|
|
89
86
|
@interface SMManager (InAppMessage)
|
|
90
87
|
|
|
@@ -99,9 +96,7 @@
|
|
|
99
96
|
* * Configure correctly the IAM-service via [configureInAppMessageServiceWithSetting:]([SMManagerSetting configureInAppMessageServiceWithSetting:])
|
|
100
97
|
*
|
|
101
98
|
*/
|
|
102
|
-
- (void)enableInAppMessage:(BOOL)shouldEnable;
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
- (void) enableInAppMessage:(BOOL)shouldEnable;
|
|
105
100
|
|
|
106
101
|
/**
|
|
107
102
|
* This will allow the SDK to fetch the IAM when the OS will allow so.
|
|
@@ -109,63 +104,69 @@
|
|
|
109
104
|
* @param completionHandler The block-completion to be processed. Provided by the delegate call
|
|
110
105
|
* @warning Make sure to enable background-fetch in the application's capabilities
|
|
111
106
|
*/
|
|
112
|
-
- (void)performIAMFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
|
107
|
+
- (void) performIAMFetchWithCompletionHandler:(void (^_Nullable)(UIBackgroundFetchResult))completionHandler;
|
|
113
108
|
|
|
114
109
|
/*!
|
|
115
110
|
* @abstract This will return an array of In App Messages
|
|
116
111
|
* @discussion All the valid IAM will be retrieved even if they were already provided to the device
|
|
117
112
|
* @return returns an NSArray of SMInAppMessage
|
|
118
113
|
*/
|
|
119
|
-
- (NSArray*) getInAppMessages;
|
|
114
|
+
- (NSArray*_Nonnull) getInAppMessages;
|
|
120
115
|
|
|
121
116
|
/*!
|
|
122
117
|
* @abstract This method will mark an IAM as viewed, send the Open event to the server and update SMInAppMessage object in cache with isViewed property set to true
|
|
123
118
|
* @discussion The message will still be provided to the device with the flag isViewed set to true
|
|
124
119
|
* @param inAppMessage an SMInAppMessage object
|
|
120
|
+
* @see SMInAppMessage
|
|
125
121
|
*/
|
|
126
|
-
- (void) setInAppMessageAsSeen:(SMInAppMessage*)inAppMessage;
|
|
122
|
+
- (void) setInAppMessageAsSeen:(SMInAppMessage*_Nullable)inAppMessage;
|
|
127
123
|
|
|
128
124
|
/*!
|
|
129
125
|
* @abstract This method will mark an IAM as unseen
|
|
130
126
|
* @discussion The message will be provided to the device with the flag isViewed set to false
|
|
131
127
|
* @param inAppMessage an SMInAppMessage object
|
|
128
|
+
* @see SMInAppMessage
|
|
132
129
|
*/
|
|
133
|
-
- (void) setInAppMessageAsUnseen:(SMInAppMessage*)inAppMessage;
|
|
130
|
+
- (void) setInAppMessageAsUnseen:(SMInAppMessage*_Nullable)inAppMessage;
|
|
134
131
|
|
|
135
132
|
/*!
|
|
136
133
|
* @abstract This method will mark an IAM as deleted
|
|
137
134
|
* @discussion The message will be not be provided again to the device once deleted
|
|
138
135
|
* @param inAppMessage an SMInAppMessage object
|
|
136
|
+
* @see SMInAppMessage
|
|
139
137
|
*/
|
|
140
|
-
- (void) setInAppMessageAsDeleted:(SMInAppMessage*)inAppMessage;
|
|
138
|
+
- (void) setInAppMessageAsDeleted:(SMInAppMessage*_Nullable)inAppMessage;
|
|
141
139
|
|
|
142
140
|
/*!
|
|
143
141
|
* @abstract This method must be called whenever a user has clicked on a link that you manage to display
|
|
144
142
|
* @discussion This will allow the sdk to inform the services that a link has been clicked and to process the action associated with the link
|
|
145
143
|
* @param link a SMLink object
|
|
146
144
|
* @param inAppMessage a SMInAppMessage object
|
|
145
|
+
* @see SMLink
|
|
146
|
+
* @see SMInAppMessage
|
|
147
147
|
*/
|
|
148
|
-
- (void) executeLinkAction:(SMLink*)link InAppMessage:(SMInAppMessage*)inAppMessage;
|
|
148
|
+
- (void) executeLinkAction:(SMLink*_Nullable)link InAppMessage:(SMInAppMessage*_Nullable)inAppMessage;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* @abstract This method will allow you to provide an instance of a class to the sdk . This class will implement the WKNavigationDelegate methods
|
|
152
152
|
* In this case when the sdk displays an In App Message in a WKWebView you will for example be able to process the linked click on the app side by implementing decidePolicyForNavigationAction on the provided class
|
|
153
153
|
* @param delegate an object implementing WKNavigationDelegate methods
|
|
154
154
|
*/
|
|
155
|
-
- (void) inAppMessageWKNavigationDelegate:(id <WKNavigationDelegate>) delegate;
|
|
156
|
-
|
|
155
|
+
- (void) inAppMessageWKNavigationDelegate:(id <WKNavigationDelegate>_Nullable) delegate;
|
|
157
156
|
|
|
158
157
|
/*!
|
|
159
158
|
* @abstract This method must be called whenever a user has clicked on a link that you manage to display
|
|
160
159
|
* @discussion This will allow the sdk to inform the services that a link has been clicked and to process the action associated with the link
|
|
161
160
|
*/
|
|
162
|
-
- (void)removeViewController;
|
|
161
|
+
- (void) removeViewController;
|
|
163
162
|
|
|
164
163
|
/**
|
|
165
164
|
* Used to let the app display the inapp message linked to a remote notification
|
|
166
165
|
* @abstract this setting will allow you to manage on app side the display of the inapp message linked to a push remote notification
|
|
167
166
|
* In order to display it in your side the delegate object should implement [SMManagerInAppMessageDelegate displayInAppMessage:] method it will provide tha app with a SMInAppMessage object
|
|
168
167
|
* @param delegate an object implementing SMManagerInAppMessageDelegate methods
|
|
168
|
+
* @see SMManagerInAppMessageDelegate
|
|
169
169
|
*/
|
|
170
|
-
- (void) inAppMessageDelegate:(id <SMManagerInAppMessageDelegate>) delegate;
|
|
170
|
+
- (void) inAppMessageDelegate:(id <SMManagerInAppMessageDelegate>_Nullable) delegate;
|
|
171
|
+
|
|
171
172
|
@end
|
|
@@ -9,11 +9,8 @@
|
|
|
9
9
|
#import "SMManager.h"
|
|
10
10
|
|
|
11
11
|
/*!
|
|
12
|
-
* #Introduction :#
|
|
13
12
|
* In order to use the location services features provided by the sdk you will mandatory need to use the lsdk library supporting the plotproject framework .
|
|
14
13
|
* Otherwise calling the method in this SMManager category will have no effect and no ios api related to geofencing will be called (as this is all done by the plot project framework)
|
|
15
|
-
*
|
|
16
|
-
* #SMManager+Location :#
|
|
17
14
|
*/
|
|
18
15
|
@interface SMManager (Location)
|
|
19
16
|
|
|
@@ -24,7 +21,7 @@
|
|
|
24
21
|
* If you use plotproject for geolocation it will be mandatory to call it if you have set enableOnFirstRun to false in the plotconfig.json
|
|
25
22
|
* Call this API according to your application's need.
|
|
26
23
|
*/
|
|
27
|
-
-(void) enableGeoLocation;
|
|
24
|
+
- (void) enableGeoLocation;
|
|
28
25
|
|
|
29
26
|
/**
|
|
30
27
|
* Disable geolocation services
|
|
@@ -32,13 +29,13 @@
|
|
|
32
29
|
* @discussion This optional call will disable geolocation services at sdk level. it is independent of iOS location authorisation
|
|
33
30
|
* Call this API according to your application's need.
|
|
34
31
|
*/
|
|
35
|
-
-(void) disableGeoLocation;
|
|
36
|
-
|
|
32
|
+
- (void) disableGeoLocation;
|
|
37
33
|
|
|
38
34
|
/**
|
|
39
|
-
*
|
|
35
|
+
* Check the geolocation services status
|
|
40
36
|
*
|
|
41
37
|
* @discussion This optional call will inform you if geolocation services at sdk level are enabled. it is independent of iOS location authorisation
|
|
42
38
|
*/
|
|
43
|
-
-(BOOL) isGeoLocationEnabled;
|
|
39
|
+
- (BOOL) isGeoLocationEnabled;
|
|
40
|
+
|
|
44
41
|
@end
|
|
@@ -7,36 +7,25 @@
|
|
|
7
7
|
//
|
|
8
8
|
|
|
9
9
|
#import "SMManager.h"
|
|
10
|
-
|
|
11
10
|
#import "SMLog.h"
|
|
12
11
|
|
|
13
|
-
|
|
14
12
|
/**
|
|
15
13
|
* This category will help you debug the library.
|
|
16
|
-
* Please check SMLogLevel for all available possibilities.
|
|
17
|
-
*
|
|
18
14
|
* Should you want to get back to us, please set logLevel to kSMLogLevel_All and provide with console logs.
|
|
19
|
-
*
|
|
20
|
-
* #SMManager+Log :#
|
|
21
15
|
*/
|
|
22
16
|
@interface SMManager (Log)
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
18
|
/*!
|
|
27
19
|
* Set the log level of the library console
|
|
28
20
|
* @discussion This is an optional setting that may help you debug the library calls.
|
|
29
21
|
* This call can be done at any time (before or after starting the library).
|
|
30
22
|
* However, in order to avoid missing any error log, we recommand setting this value before starting the library.
|
|
31
|
-
* @param logLevel SMLogLevel enumeration type. Default =
|
|
23
|
+
* @param logLevel SMLogLevel enumeration type. Default = kSMLogLevel_None
|
|
32
24
|
* @warning It is developer's responsability to enable log-level in Debug or release mode.
|
|
33
25
|
* No distinction are being aplied by the library.
|
|
34
26
|
* For obvious performance reason, it is always recommended to turn log off in release mode.
|
|
27
|
+
* @see SMLogLevel
|
|
35
28
|
*/
|
|
36
|
-
- (void)applyLogLevel:(SMLogLevel)logLevel;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
- (void) applyLogLevel:(SMLogLevel)logLevel;
|
|
41
30
|
|
|
42
31
|
@end
|