@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.
Files changed (71) hide show
  1. package/README.md +215 -205
  2. package/RNSelligent.podspec +2 -2
  3. package/android/build.gradle +7 -7
  4. package/android/libs/sdk-release.aar +0 -0
  5. package/android/src/main/java/com/selligent/RNSelligent.java +0 -1
  6. package/constants.d.ts +6 -0
  7. package/constants.js +14 -2
  8. package/index.d.ts +3 -0
  9. package/index.ios.js +12 -0
  10. package/ios/ClientSettings.h +1 -0
  11. package/ios/ClientSettings.m +2 -0
  12. package/ios/EnumMapper.h +4 -0
  13. package/ios/EnumMapper.m +10 -0
  14. package/ios/RNSelligent.m +7 -1
  15. package/ios/RemoteMessageDisplayType.h +5 -0
  16. package/ios/SMManagerSetting+ClientSettings.m +10 -4
  17. package/ios/include/SMBaseMessage.h +8 -12
  18. package/ios/include/SMBlock.h +2 -2
  19. package/ios/include/SMClearCache.h +0 -2
  20. package/ios/include/SMContentAlignment.h +1 -2
  21. package/ios/include/SMDeviceInfos.h +9 -7
  22. package/ios/include/SMDisplayMode.h +1 -2
  23. package/ios/include/SMEvent.h +20 -16
  24. package/ios/include/SMEventUser.h +0 -1
  25. package/ios/include/SMEventUserLogin.h +11 -16
  26. package/ios/include/SMEventUserLogout.h +12 -16
  27. package/ios/include/SMEventUserRegistration.h +12 -17
  28. package/ios/include/SMEventUserUnregistration.h +12 -16
  29. package/ios/include/SMFailure.h +1 -6
  30. package/ios/include/SMHelper.h +9 -5
  31. package/ios/include/SMInAppContentHTMLViewController.h +11 -9
  32. package/ios/include/SMInAppContentImageViewController.h +6 -5
  33. package/ios/include/SMInAppContentMessage.h +12 -12
  34. package/ios/include/SMInAppContentStyleOptions.h +91 -79
  35. package/ios/include/SMInAppContentType.h +2 -3
  36. package/ios/include/SMInAppContentURLViewController.h +10 -9
  37. package/ios/include/SMInAppContentViewController.h +3 -5
  38. package/ios/include/SMInAppMessage.h +22 -14
  39. package/ios/include/SMInAppMessageType.h +1 -5
  40. package/ios/include/SMInAppRefreshType.h +1 -1
  41. package/ios/include/SMLink.h +7 -11
  42. package/ios/include/SMLog.h +1 -1
  43. package/ios/include/SMManager+DataTransaction.h +6 -13
  44. package/ios/include/SMManager+InAppContent.h +20 -23
  45. package/ios/include/SMManager+InAppMessage.h +22 -21
  46. package/ios/include/SMManager+Location.h +5 -8
  47. package/ios/include/SMManager+Log.h +3 -14
  48. package/ios/include/SMManager+RemoteNotification.h +38 -34
  49. package/ios/include/SMManager+SMEvent.h +10 -10
  50. package/ios/include/SMManager+SMLink.h +44 -0
  51. package/ios/include/SMManager+SilentPush.h +5 -22
  52. package/ios/include/SMManager+StyleOptions.h +5 -8
  53. package/ios/include/SMManager+UserNotification.h +44 -32
  54. package/ios/include/SMManager+ViewController.h +45 -0
  55. package/ios/include/SMManager.h +11 -26
  56. package/ios/include/SMManagerInAppMessageDelegate.h +4 -5
  57. package/ios/include/SMManagerSetting+Location.h +27 -0
  58. package/ios/include/SMManagerSetting.h +53 -35
  59. package/ios/include/SMManagerSettingIAC.h +6 -17
  60. package/ios/include/SMManagerSettingIAM.h +7 -16
  61. package/ios/include/SMManagerUniversalLinksDelegate.h +23 -0
  62. package/ios/include/SMMessage.h +1 -3
  63. package/ios/include/SMNSNotification.h +2 -2
  64. package/ios/include/SMNotificationAnnotationData.h +4 -8
  65. package/ios/include/SMNotificationButtonData.h +1 -6
  66. package/ios/include/SMNotificationButtonType.h +1 -2
  67. package/ios/include/SMNotificationMessage.h +31 -0
  68. package/ios/include/SMRemoteMessageDisplayType.h +32 -0
  69. package/ios/include/SMSuccess.h +1 -4
  70. package/ios/{libSelligentMobile2.6.1.a → libSelligentMobile2.7.a} +0 -0
  71. package/package.json +1 -1
@@ -8,14 +8,12 @@
8
8
 
9
9
  #import <UIKit/UIKit.h>
10
10
 
11
- @class SMManagerSetting;
12
-
13
-
14
11
  #import "SMManagerHelper.h"
15
12
 
13
+ @class SMManagerSetting;
16
14
 
17
15
  /*!
18
- * #Start Library :#
16
+ * ##Start Library
19
17
  * In order to start the library, please follow the steps bellow (will mainly happen in your UIApplication's delegate):
20
18
  *
21
19
  * - Use startWithLaunchOptions:Setting: in your application:didFinishLaunchingWithOptions:
@@ -26,30 +24,20 @@
26
24
  * Don't forget to call registerForRemoteNotification according to your application's need.
27
25
  *
28
26
  * From there, your application is ready to handle all incoming remote-notifications.
29
- *
30
- * #SMManager Singleton :#
31
- * @discussion This manager is the main interface third party developers will be using.
32
- *
33
27
  */
34
28
  @interface SMManager : NSObject
35
29
 
36
-
37
30
  /**
38
31
  * The current version of the library
39
32
  */
40
- @property (strong, nonatomic) NSString *_Nonnull versionLib ;
41
-
33
+ @property (readonly, nonatomic) NSString *_Nonnull versionLib;
42
34
 
43
35
  /*!
44
36
  * Singleton for SellMobileSDK Class which allow to access public SellMobileSDK methods and properties
45
37
  *
46
- * @return SMManager : singleton instance of SMManager class
38
+ * @return SMManager: singleton instance of SMManager class
47
39
  */
48
- + (instancetype _Nonnull) sharedInstance ;
49
-
50
-
51
-
52
-
40
+ + (instancetype _Nonnull) sharedInstance;
53
41
 
54
42
  /*!
55
43
  * Mandatory method which allows sdk initialisation. To be included in application:didFinishLaunchingWithOptions:
@@ -57,28 +45,25 @@
57
45
  *
58
46
  * @param launchOptions NSDictionary instance indicating the reason the app was launched (if any). This dictionary is provided by application:didFinishLaunchingWithOptions
59
47
  * @param setting mandatory SMManagerSetting instance to start-up the library
60
- * @see SMManagerSetting
48
+ * @see SMManagerSetting
61
49
  * @discussion This method is mandatory in order to start / initialise the library and should be called in application:didFinishLaunchingWithOptions:
62
50
  */
63
- - (void)startWithLaunchOptions:(NSDictionary* _Nullable)launchOptions Setting:(SMManagerSetting* _Null_unspecified)setting;
64
-
65
-
66
-
51
+ - (void) startWithLaunchOptions:(NSDictionary* _Nullable)launchOptions Setting:(SMManagerSetting* _Null_unspecified)setting;
67
52
 
68
53
  /*!
69
54
  * Optional + used for testing only. This method will re-configure the SMManager with the newly provided information
55
+ *
70
56
  * @discussion This is a handy API in case you would like to switch between two backend environements without rebuilding your target.
71
57
  * @param setting mandatory SMManagerSetting instance to start-up the library
72
58
  * @warning This API is provided for testing purposes only. Never use it in production.
73
59
  * Make sure to re-enable any service after calling this API.
60
+ * @see SMManagerSetting
74
61
  */
75
- - (void)reloadSetting:(SMManagerSetting* _Null_unspecified)setting;
76
-
62
+ - (void) reloadSetting:(SMManagerSetting* _Null_unspecified)setting;
77
63
 
78
64
  /*!
79
65
  * Device id used by the sdk
80
- * @discussion NSString
81
66
  */
82
- - (NSString*_Nullable)deviceID;
67
+ - (NSString*_Nullable) deviceID;
83
68
 
84
69
  @end
@@ -9,8 +9,9 @@
9
9
  #import <Foundation/Foundation.h>
10
10
  #import "SMInAppMessage.h"
11
11
 
12
- NS_ASSUME_NONNULL_BEGIN
13
-
12
+ /**
13
+ * This protocol will help you intercept the inapp messages and allow you to display them your own way or store them somewhere to be shown later.
14
+ */
14
15
  @protocol SMManagerInAppMessageDelegate <NSObject>
15
16
  @optional
16
17
 
@@ -18,8 +19,6 @@ NS_ASSUME_NONNULL_BEGIN
18
19
  * @abstract Invoked when an inapp message linked to a remote notification is received by sdk.
19
20
  * @param inAppMessage The inAppMessage object containing all necessary datas for you to display content of the message
20
21
  */
21
- - (void)displayInAppMessage:(SMInAppMessage*)inAppMessage;
22
+ - (void) displayInAppMessage:(SMInAppMessage*_Nonnull)inAppMessage;
22
23
 
23
24
  @end
24
-
25
- NS_ASSUME_NONNULL_END
@@ -0,0 +1,27 @@
1
+ //
2
+ // SMManagerSetting+Location.h
3
+ // MobileSDK
4
+ //
5
+ // Created by Marc Biosca on 6/28/21.
6
+ // Copyright © 2021 Selligent. All rights reserved.
7
+ //
8
+
9
+ #import "SMManagerSetting.h"
10
+
11
+ /**
12
+ * This category will help you to enable the geolocation service.
13
+ */
14
+ @interface SMManagerSetting (Location)
15
+
16
+ /**
17
+ * Optional API to enable location services.
18
+ *
19
+ * @discussion This call is useless if the sdk version is not the one associated to the plotproject framework
20
+ * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service.
21
+ * It is the first step to inform the sdk that geo location services are going to be used by the
22
+ *
23
+ * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library
24
+ */
25
+ - (void) configureLocationService;
26
+
27
+ @end
@@ -7,21 +7,21 @@
7
7
  //
8
8
 
9
9
  #import <Foundation/Foundation.h>
10
-
11
10
  #import "SMClearCache.h"
11
+ #import "SMRemoteMessageDisplayType.h"
12
12
 
13
13
  @class SMManagerSettingIAM;
14
14
  @class SMManagerSettingIAC;
15
15
 
16
-
17
16
  /**
18
- * #Note about the SMManagerSetting object :#
17
+ * This class allow you to configure the SMManager.
18
+ * Such instance must be created before starting the library.
19
19
  * Creating an SMManagerSetting's instance is pretty straightforward as there's only [one constructor for doing so](settingWithUrl:ClientID:PrivateKey:).
20
20
  * This sole constructor is sufficent to get you started.
21
21
  *
22
22
  * Additional parameters described in this header will provide you with additional control and ***are all optional***.
23
23
  *
24
- * #Being user-friendly :#
24
+ * ##Being user-friendly
25
25
  * When the application is in foreground and receive a remote-notification, by default, the library will display it on the current visible UIViewController. This behaviour might be unwanted and may disturb the user if he appears to navigate in a different context. Should you want to prevent that behaviour and display the remote-notification shortly after (when the user will be in a more appropriate context), please follow these steps :
26
26
  *
27
27
  * * Create an SMManagerSetting with the default constructor as usual.
@@ -39,21 +39,16 @@
39
39
  *
40
40
  * * Display the last known remote notification by calling : [SMManager(RemoteNotification) displayLastReceivedRemotePushNotification]
41
41
  *
42
- * #IAM :#
42
+ * ##IAM
43
43
  * In-Application-Message-service is configurable using SMManagerSettingIAM which you'll inject using the API configureInAppMessageServiceWithSetting:
44
44
  * A dedicated topic regarding this topic can be found in SMManager(InAppMessage)
45
45
  *
46
- * #IAC :#
46
+ * ##IAC
47
47
  * In-Application-Content-service is configurable using SMManagerSettingIAC which you'll inject using the API configureInAppContentServiceWithSetting:
48
48
  * A dedicated topic regarding this topic can be found in SMManager(InAppContent)
49
- *
50
- * #SMManagerSetting :#
51
- * This class allow you to configure the SMManager.
52
- * Such instance must be created before starting the library.
53
49
  */
54
50
  @interface SMManagerSetting : NSObject
55
51
 
56
-
57
52
  /**
58
53
  * Once a new remote-notification is displayed, the badge is automaticly reseted.
59
54
  * Should you want to handle this property yourself, you can set this property to FALSE before starting the library
@@ -62,27 +57,28 @@
62
57
  @property (nonatomic) BOOL shouldClearBadge;
63
58
 
64
59
  /**
65
- * Used to configure the remote-notification-display
66
- * @discussion When the app is active, once a new remote-notification is received, it is automatically diplayed on the device
60
+ * @discussion This setting will enable or disable the display of inapp-messages linked to a remote-notification by the SDK.
61
+ * In iOS 10+ after tapping a notification, the inapp will be displayed (if any).
62
+ * In iOS 9-, and when the app is in foreground, once a new remote-notification is received, the linked inapp-notification will be displayed (if any).
67
63
  * Should you want to prevent that behaviour, you can set this property to FALSE before starting the library.
68
64
  * Default value is set to TRUE.
69
- * @warning This property does not have an impact when app is open from a notification selected by user in the notification center or when [SMManager(RemoteNotification) displayNotificationID:] or [SMManager(RemoteNotification) displayLastReceivedRemotePushNotification] are called.
70
- * Once you set this value to TRUE, the application becomes responsable about displaying the remote-notification. (Make sure to read the header file of SMManagerSetting before doing so).
65
+ * @warning This property does not have an impact when [SMManager(RemoteNotification) displayNotificationID:] or [SMManager(RemoteNotification) displayLastReceivedRemotePushNotification] are called.
66
+ * Once you set this value to TRUE, the application becomes responsable about displaying the inapp-notification linked to the received remote-notification.
71
67
  */
72
68
  @property (nonatomic) BOOL shouldDisplayRemoteNotification;
73
69
 
74
-
75
70
  /**
76
71
  * Used to add the inapp message associated to a remote notification to the inapp message list
72
+ *
77
73
  * @discussion Once a new remote-notification is received, if it contains in the payload datas for an inapp message, this setting will add the inapp message to the in app messages list . You will need to listen to kSMNotification_Event_DidReceiveInAppMessage NSNotification to be informed that an inapp message is available and you can then retrieve it with [SMManager(InAppMessages) getInAppMessages] helper method and use in an inbox for example
78
74
  * by default the in app message will be displayed if you wish to display it by yourself you will need to provide a class by calling [SMManager(InAppMessage) inAppMessageDelegate:] . This class will conform to SMManagerInAppMessageDelegate protocol and implement [SMManagerInAppMessageDelegate displayInAppMessage:] method
79
75
  * Default value is set to FALSE
80
76
  */
81
77
  @property (nonatomic) BOOL shouldAddInAppMessageFromPushToInAppMessageList;
82
78
 
83
-
84
79
  /**
85
80
  * This value tells how often the SDK's cache mechanism should clear itself.
81
+ *
86
82
  * @discussion Internally, each notification-messages has a life-span.
87
83
  * Clearing the cache stands for deleting notification-messages with an expired life-span.
88
84
  * In other words, only old notification-messages are deletesd from the cache.
@@ -101,16 +97,47 @@
101
97
  * @warning As soon as IAM-service is enabled, the SDK will consider kSMClearCache_Weekly as being the default value. Except if you explicitly overide the property.
102
98
  * In 99% of the cases, you should not overide this property as the SDK is smart enough to handle the cache mechanism by itself.
103
99
  * Keep also in mind that this behavior is only applicable for notification and IAM that doesn't have a n expiration date set
100
+ * @see SMClearCache
104
101
  */
105
102
  @property (nonatomic) SMClearCache clearCacheIntervalValue;
106
103
 
107
104
  /**
108
- * This value provides to the sdk the app group id that you have previously defined in your apple developer portal.
109
- * @discussion it is used to allow the sdk to share data between the main app and the notifications extensions (service and/or content)
110
- * The deviceid provided by selligent mobile platform is stored encrypted in this container
105
+ * This value provides to the sdk the app group id that you have previously defined in your apple developer portal.
106
+ *
107
+ * @discussion it is used to allow the sdk to share data between the main app and the notifications extensions (service and/or content)
108
+ * The deviceid provided by selligent mobile platform is stored encrypted in this container
111
109
  */
112
- @property (nonatomic, strong) NSString *appGroupId;
110
+ @property (nonatomic, strong) NSString *_Nullable appGroupId;
113
111
 
112
+ /**
113
+ * This value defines the behaviour that the SDK will adopt when a remote-notification is received when in Foreground.
114
+ *
115
+ * @discussion The behaviour will be as:
116
+ *
117
+ * iOS 10+:
118
+ *
119
+ * * kSMRemoteMessageDisplayType_None: nothing will be displayed.
120
+ * * kSMRemoteMessageDisplayType_Notification: a Push Notification will be displayed.
121
+ * * kSMRemoteMessageDisplayType_Automatic:<br/>
122
+ * "Push + in-app notifications":<br/>
123
+ * 1) With "Message Action": a Push Notification will be displayed (UNNotificationPresentationOptionAlert and UNNotificationPresentationOptionBanner | UNNotificationPresentationOptionList for iOS 14+).<br/>
124
+ * 2) With "Push Notification Buttons": a Push Notification will be displayed (UNNotificationPresentationOptionAlert and UNNotificationPresentationOptionBanner | UNNotificationPresentationOptionList for iOS 14+).<br/>
125
+ * 3) With "Rich Push Content": a Push Notification will be displayed (UNNotificationPresentationOptionAlert and UNNotificationPresentationOptionBanner | UNNotificationPresentationOptionList for iOS 14+).<br/>
126
+ * 4) Others: an in-app message will be displayed (UNNotificationPresentationOptionNone).<br/><br/>
127
+ * "Mobile push": a Push Notification will be displayed (UNNotificationPresentationOptionAlert and UNNotificationPresentationOptionBanner | UNNotificationPresentationOptionList for iOS 14+).
128
+ *
129
+ * iOS 9-:
130
+ *
131
+ * * kSMRemoteMessageDisplayType_None: nothing will be displayed.
132
+ * * kSMRemoteMessageDisplayType_Notification: nothing will be displayed.
133
+ * * kSMRemoteMessageDisplayType_Automatic:<br/>
134
+ * "Push + in-app notifications": an in-app message will be displayed.<br/>
135
+ * "Mobile push": the "Message Action" will be executed<br/>
136
+ * @warning For iOS 10+, the SDK will only take this setting into account when the UNNotificationPresentationOptions delegate is provided (see SMManager(UserNotification) for more information).
137
+ * @warning If not set, the default value (kSMRemoteMessageDisplayType_Unknown) will use kSMRemoteMessageDisplayType_Notification for iOS 10+ and kSMRemoteMessageDisplayType_Automatic for iOS 9-.
138
+ * @see SMRemoteMessageDisplayType
139
+ */
140
+ @property (nonatomic) SMRemoteMessageDisplayType remoteMessageDisplayType;
114
141
 
115
142
  /*!
116
143
  * Default-mandatory constructor to start the SMManager shared-instance
@@ -124,7 +151,7 @@
124
151
  *
125
152
  * @return SMManagerSetting new instance. SMFailure in case of error
126
153
  */
127
- + (instancetype)settingWithUrl:(NSString*)urlName ClientID:(NSString*)clientID PrivateKey:(NSString*)privateKey;
154
+ + (instancetype _Nonnull) settingWithUrl:(NSString*_Nullable)urlName ClientID:(NSString*_Nullable)clientID PrivateKey:(NSString*_Nullable)privateKey;
128
155
 
129
156
  /**
130
157
  * @discussion This call is optional. It is not needed to successfully start the SDK.
@@ -134,9 +161,9 @@
134
161
  * @param settingIAM The SMManagerSettingIAM instance containing the IAM desired configuration.
135
162
  * @warning An invalid or nil setting is considered as an error and will not startUp the IAM-service.
136
163
  * Don't forget to enable In App message according to application need by calling [SMManager(InAppMessage) enableInAppMessage:]
164
+ * @see SMManagerSettingIAM
137
165
  */
138
- - (void)configureInAppMessageServiceWithSetting:(SMManagerSettingIAM*)settingIAM;
139
-
166
+ - (void) configureInAppMessageServiceWithSetting:(SMManagerSettingIAM*_Nullable)settingIAM;
140
167
 
141
168
  /**
142
169
  * @discussion This call is optional. It is not needed to successfully start the SDK.
@@ -146,17 +173,8 @@
146
173
  * @param settingIAC The SMManagerSettingIAC instance containing the IAC desired configuration.
147
174
  * @warning An invalid or nil setting is considered as an error and will not startUp the IAC-service.
148
175
  * Don't forget to enable In App content according to application need by calling [SMManager(InAppContent) enableInAppContent:]
176
+ * @see SMManagerSettingIAC
149
177
  */
150
- - (void)configureInAppContentServiceWithSetting:(SMManagerSettingIAC*)settingIAC;
151
-
152
- /**
153
- * @discussion This call is optional. It is not needed to successfully start the SDK.
154
- * This call is useless if the sdk version is not the one associated to the plotproject framework
155
- * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service.
156
- * It is the first step to inform the sdk that geo location services are going to be used by the
157
- *
158
- * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library
159
- */
160
- - (void)configureLocationService;
178
+ - (void) configureInAppContentServiceWithSetting:(SMManagerSettingIAC*_Nullable)settingIAC;
161
179
 
162
180
  @end
@@ -6,7 +6,6 @@
6
6
  // Copyright © 2016 Selligent. All rights reserved.
7
7
  //
8
8
 
9
-
10
9
  #import <Foundation/Foundation.h>
11
10
  #import "SMInAppRefreshType.h"
12
11
 
@@ -16,9 +15,6 @@
16
15
  */
17
16
  @interface SMManagerSettingIAC : NSObject
18
17
 
19
-
20
-
21
-
22
18
  /**
23
19
  * Constructor to be used in order to create the SMManagerSettingIAC instance
24
20
  * @discussion use this constructor to enable background-mode only.
@@ -26,9 +22,7 @@
26
22
  * @warning If background-fetch is not enabled in Application's Capabilities, the IAC-service will not start.
27
23
  * See SMManager(InAppContent) for additional information.
28
24
  */
29
- + (instancetype)settingWithBackgroundFetchOnly;
30
-
31
-
25
+ + (instancetype _Nonnull) settingWithBackgroundFetchOnly;
32
26
 
33
27
  /**
34
28
  * Constructor to be used in order to create the SMManagerSettingIAC instance
@@ -36,24 +30,19 @@
36
30
  * @param refreshType The type of refresh to consider when the application is in foreground
37
31
  * @discussion Use this constructor should you want to perform periodic refresh when the application is in foreground-state only.
38
32
  * For enabling backgroundState, use settingWithRefreshType:ShouldPerformBackgroundFetch: instead
33
+ * @see SMInAppRefreshType
39
34
  */
40
- + (instancetype)settingWithRefreshType:(SMInAppRefreshType)refreshType;
41
-
42
-
43
-
35
+ + (instancetype _Nonnull) settingWithRefreshType:(SMInAppRefreshType)refreshType;
44
36
 
45
37
  /**
46
38
  * Constructor to be used in order to create the SMManagerSettingIAC instance
47
39
  *
48
- * @param refreshType The type of refresh to consider when the application is in foreground
40
+ * @param refreshType The type of refresh to consider when the application is in foreground
49
41
  * @param shouldPerformBackgroundFetch If set to TRUE, it will activate UIApplication-BackGround-Fetch-mode automaticly
50
42
  * @discussion This constructor provides you with more control on foreground / background fetch.
51
43
  * Should you want to restrict to only one fetch-mode, feel free to use other constructors.
44
+ * @see SMInAppRefreshType
52
45
  */
53
- + (instancetype)settingWithRefreshType:(SMInAppRefreshType)refreshType ShouldPerformBackgroundFetch:(BOOL)shouldPerformBackgroundFetch;
54
-
55
-
56
-
57
-
46
+ + (instancetype _Nonnull) settingWithRefreshType:(SMInAppRefreshType)refreshType ShouldPerformBackgroundFetch:(BOOL)shouldPerformBackgroundFetch;
58
47
 
59
48
  @end
@@ -15,19 +15,15 @@
15
15
  */
16
16
  @interface SMManagerSettingIAM : NSObject
17
17
 
18
-
19
-
20
-
21
18
  /**
22
19
  * Constructor to be used in order to create the SMManagerSettingIAM instance
20
+ *
23
21
  * @discussion use this constructor to enable background-mode only.
24
22
  * The OS will refresh automaticly the IAM based on how often the user interacts with the application
25
23
  * @warning If background-fetch is not enabled in Application's Capabilities, the IAM-service will not start.
26
24
  * See SMManager(InAppMessage) for additional information.
27
25
  */
28
- + (instancetype)settingWithBackgroundFetchOnly;
29
-
30
-
26
+ + (instancetype _Nonnull) settingWithBackgroundFetchOnly;
31
27
 
32
28
  /**
33
29
  * Constructor to be used in order to create the SMManagerSettingIAM instance
@@ -35,24 +31,19 @@
35
31
  * @param refreshType The type of refresh to consider when the application is in foreground
36
32
  * @discussion Use this constructor should you want to perform periodic refresh when the application is in foreground-state only.
37
33
  * For enabling backgroundState, use settingWithRefreshType:ShouldPerformBackgroundFetch: instead
34
+ * @see SMInAppRefreshType
38
35
  */
39
- + (instancetype)settingWithRefreshType:(SMInAppRefreshType)refreshType;
40
-
41
-
42
-
36
+ + (instancetype _Nonnull) settingWithRefreshType:(SMInAppRefreshType)refreshType;
43
37
 
44
38
  /**
45
39
  * Constructor to be used in order to create the SMManagerSettingIAM instance
46
40
  *
47
- * @param refreshType The type of refresh to consider when the application is in foreground
41
+ * @param refreshType The type of refresh to consider when the application is in foreground
48
42
  * @param shouldPerformBackgroundFetch If set to TRUE, it will activate UIApplication-BackGround-Fetch-mode automaticly
49
43
  * @discussion This constructor provides you with more control on foreground / background fetch.
50
44
  * Should you want to restrict to only one fetch-mode, feel free to use other constructors.
45
+ * @see SMInAppRefreshType
51
46
  */
52
- + (instancetype)settingWithRefreshType:(SMInAppRefreshType)refreshType ShouldPerformBackgroundFetch:(BOOL)shouldPerformBackgroundFetch;
53
-
54
-
55
-
56
-
47
+ + (instancetype _Nonnull) settingWithRefreshType:(SMInAppRefreshType)refreshType ShouldPerformBackgroundFetch:(BOOL)shouldPerformBackgroundFetch;
57
48
 
58
49
  @end
@@ -0,0 +1,23 @@
1
+ //
2
+ // SMManagerUniversalLinksDelegate.h
3
+ // MobileSDK
4
+ //
5
+ // Created by Marc Biosca on 7/12/21.
6
+ // Copyright © 2021 Selligent. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ /**
12
+ * This protocol will give you the possibility to manage the behaviour when clicking a "deeplink" button type containing an universal link.
13
+ */
14
+ @protocol SMManagerUniversalLinksDelegate <NSObject>
15
+ @optional
16
+
17
+ /*!
18
+ * @abstract Invoked when a "deeplink" button type, whose URL scheme is HTTP or HTTPS, is clicked
19
+ * @param url The NSURL introduced as value of the button that has been clicked
20
+ */
21
+ - (void) executeLinkAction:(NSURL*_Nonnull)url;
22
+
23
+ @end
@@ -8,7 +8,6 @@
8
8
 
9
9
  #import <Foundation/Foundation.h>
10
10
 
11
-
12
11
  /**
13
12
  * This Class is provided as a root Class and should not be used.
14
13
  */
@@ -17,7 +16,6 @@
17
16
  /*!
18
17
  * NSString instance providing a brief description of the message
19
18
  */
20
- @property(nonatomic, strong) NSString *messageSM;
21
-
19
+ @property(readonly, nonatomic) NSString *_Nullable messageSM;
22
20
 
23
21
  @end
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * NSString representing a notification name you can listen to.
8
8
  * An NSNotification with this name is broadcasted when the user interacts with a remote-notification
9
- * Usefull to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter.
9
+ * Useful to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter.
10
10
  */
11
11
  extern NSString* kSMNotification_Event_ButtonClicked;
12
12
 
@@ -21,7 +21,7 @@ extern NSString* kSMNotification_Event_WillDisplayNotification;
21
21
  /**
22
22
  * NSString representing a notification name you can listen to.
23
23
  * An NSNotification with this name is broadcasted shortly before Dismissing the current remote-notification
24
- * Primary-application may use this notification to resume any paused work. (see kSMNotification_Event_WillDisplayNotification)
24
+ * Primary-application may use this notification to resume any paused work (see kSMNotification_Event_WillDisplayNotification).
25
25
  */
26
26
  extern NSString* kSMNotification_Event_WillDismissNotification;
27
27
 
@@ -8,30 +8,26 @@
8
8
 
9
9
  #import <Foundation/Foundation.h>
10
10
 
11
- /*!
12
- *
13
- * #SMNotificationAnnotationData :#
14
- */
15
11
  @interface SMNotificationAnnotationData : NSObject
16
12
 
17
13
  /*!
18
14
  * NSString instance providing the title of the annotation
19
15
  */
20
- @property (nonatomic, strong) NSString *titleAnnotation;
16
+ @property (readonly, nonatomic) NSString *_Nullable titleAnnotation;
21
17
 
22
18
  /*!
23
19
  * NSString instance providing the description of the annotation
24
20
  */
25
- @property (nonatomic, strong) NSString *descriptionAnnotation;
21
+ @property (readonly, nonatomic) NSString *_Nullable descriptionAnnotation;
26
22
 
27
23
  /*!
28
24
  * NSString instance providing the latitude of the annotation
29
25
  */
30
- @property (nonatomic) float latitude;
26
+ @property (readonly, nonatomic) float latitude;
31
27
 
32
28
  /*!
33
29
  * NSString instance providing the longitude of the message
34
30
  */
35
- @property (nonatomic) float longitude;
31
+ @property (readonly, nonatomic) float longitude;
36
32
 
37
33
  @end
@@ -10,16 +10,11 @@
10
10
 
11
11
  #import "SMLink.h"
12
12
 
13
-
14
-
15
-
16
13
  /*!
17
- * @brief SMNotificationButtonData
18
- * @discussion This class is used to wrap informations about a notification button.
14
+ * This class is used to wrap informations about a notification button.
19
15
  *
20
16
  * Additional information provided in [SMManager](SMManager)
21
17
  */
22
18
  @interface SMNotificationButtonData : SMLink
23
19
 
24
-
25
20
  @end
@@ -6,9 +6,8 @@
6
6
  // Copyright (c) 2015 Selligent. All rights reserved.
7
7
  //
8
8
 
9
-
10
9
  /*!
11
- * This enumeration declares all known buttun-type
10
+ * This enumeration declares all known button-type
12
11
  */
13
12
  typedef NS_ENUM(NSInteger, SMNotificationButtonType) {
14
13
  /*!
@@ -0,0 +1,31 @@
1
+ //
2
+ // SMNotificationMessage.h
3
+ // MobileSDK
4
+ //
5
+ // Created by Walter Tricknot on 17/01/2017.
6
+ // Copyright © 2017 Selligent. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "SMInAppMessage.h"
11
+ #import "SMNotificationButtonData.h"
12
+
13
+ @interface SMNotificationMessage : SMInAppMessage
14
+
15
+ /*!
16
+ * NSString instance providing url of the Rich media attached to the remote-notification
17
+ */
18
+ @property (readonly, nonatomic) NSString*_Nullable mediaUrl;
19
+
20
+ /*!
21
+ * SMNotificationButtonData instance providing the main action behind the remote-notification banner
22
+ * @see SMNotificationButtonData
23
+ */
24
+ @property (readonly, nonatomic) SMNotificationButtonData*_Nullable mainAction;
25
+
26
+ /*!
27
+ * NSArray of SMLink objects from the remote-notification
28
+ */
29
+ @property (readonly, nonatomic) NSArray*_Nullable notificationButtons;
30
+
31
+ @end
@@ -0,0 +1,32 @@
1
+ //
2
+ // SMRemoteMessageDisplayType.h
3
+ // MobileSDK
4
+ //
5
+ // Created by Marc Biosca on 9/10/21.
6
+ // Copyright © 2021 Selligent. All rights reserved.
7
+ //
8
+
9
+ /*!
10
+ * Defines the behaviour that the SDK will apply when receiving a remote-notification in foreground.
11
+ */
12
+ typedef NS_ENUM (NSInteger, SMRemoteMessageDisplayType) {
13
+ /*!
14
+ * Default value when not explicitly set.
15
+ */
16
+ kSMRemoteMessageDisplayType_Unknown = 0,
17
+
18
+ /*!
19
+ * No Push nor in-app notifications will be displayed.
20
+ */
21
+ kSMRemoteMessageDisplayType_None = 1,
22
+
23
+ /*!
24
+ * A Push notification will be displayed.
25
+ */
26
+ kSMRemoteMessageDisplayType_Notification = 2,
27
+
28
+ /*!
29
+ * An in-app notification will be displayed (when there is an in-app notification available within the remote-notification payload).
30
+ */
31
+ kSMRemoteMessageDisplayType_Automatic = 3
32
+ };
@@ -8,12 +8,9 @@
8
8
 
9
9
  #import "SMMessage.h"
10
10
 
11
-
12
11
  /*!
13
- * @discussion This class is used to return a successfull action
14
- * #SMSuccess:#
12
+ * This class is used to return a successfull action
15
13
  */
16
14
  @interface SMSuccess : SMMessage
17
15
 
18
-
19
16
  @end
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@selligent-marketing-cloud/selligent-react-native",
3
3
  "title": "Selligent React Native",
4
- "version": "2.5.0",
4
+ "version": "2.6.0",
5
5
  "description": "React Native bridge for Selligent SDK",
6
6
  "main": "index.js",
7
7
  "scripts": {