@selligent-marketing-cloud/selligent-react-native 2.3.0 → 2.7.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 (79) hide show
  1. package/README.md +311 -315
  2. package/RNSelligent.podspec +3 -4
  3. package/android/build.gradle +39 -31
  4. package/android/libs/sdk-release.aar +0 -0
  5. package/android/src/main/java/com/selligent/RNSelligent.java +41 -18
  6. package/android/src/main/java/com/selligent/SMSettingsFactory.java +1 -1
  7. package/android/src/main/java/com/selligent/Settings.java +14 -7
  8. package/constants.d.ts +18 -12
  9. package/constants.js +29 -25
  10. package/index.android.js +42 -0
  11. package/index.d.ts +14 -12
  12. package/index.ios.js +12 -29
  13. package/index.js +11 -31
  14. package/ios/ClientSettings.h +2 -1
  15. package/ios/ClientSettings.m +4 -2
  16. package/ios/EnumMapper.h +3 -8
  17. package/ios/EnumMapper.m +8 -26
  18. package/ios/RNSelligent.m +25 -27
  19. package/ios/RemoteMessageDisplayType.h +5 -0
  20. package/ios/SMManagerSetting+ClientSettings.m +10 -4
  21. package/ios/SelligentReactNative.xcodeproj/project.pbxproj +4 -12
  22. package/ios/include/SMBaseMessage.h +8 -12
  23. package/ios/include/SMBlock.h +2 -2
  24. package/ios/include/SMClearCache.h +0 -2
  25. package/ios/include/SMContentAlignment.h +1 -2
  26. package/ios/include/SMDeviceInfos.h +10 -8
  27. package/ios/include/SMDisplayMode.h +1 -2
  28. package/ios/include/SMEvent.h +20 -16
  29. package/ios/include/SMEventUser.h +0 -1
  30. package/ios/include/SMEventUserLogin.h +11 -16
  31. package/ios/include/SMEventUserLogout.h +12 -16
  32. package/ios/include/SMEventUserRegistration.h +12 -17
  33. package/ios/include/SMEventUserUnregistration.h +12 -16
  34. package/ios/include/SMFailure.h +1 -6
  35. package/ios/include/SMHelper.h +7 -2
  36. package/ios/include/SMInAppContentHTMLViewController.h +11 -9
  37. package/ios/include/SMInAppContentImageViewController.h +6 -6
  38. package/ios/include/SMInAppContentMessage.h +12 -12
  39. package/ios/include/SMInAppContentStyleOptions.h +91 -79
  40. package/ios/include/SMInAppContentType.h +2 -3
  41. package/ios/include/SMInAppContentURLViewController.h +10 -9
  42. package/ios/include/SMInAppContentViewController.h +3 -6
  43. package/ios/include/SMInAppMessage.h +22 -14
  44. package/ios/include/SMInAppMessageType.h +2 -6
  45. package/ios/include/SMInAppRefreshType.h +1 -1
  46. package/ios/include/SMLink.h +7 -11
  47. package/ios/include/SMLog.h +1 -1
  48. package/ios/include/SMManager+DataTransaction.h +6 -13
  49. package/ios/include/SMManager+InAppContent.h +20 -23
  50. package/ios/include/SMManager+InAppMessage.h +65 -42
  51. package/ios/include/SMManager+Log.h +3 -14
  52. package/ios/include/SMManager+RemoteNotification.h +38 -34
  53. package/ios/include/SMManager+SMEvent.h +10 -10
  54. package/ios/include/SMManager+SMLink.h +44 -0
  55. package/ios/include/SMManager+SilentPush.h +5 -22
  56. package/ios/include/SMManager+StyleOptions.h +5 -8
  57. package/ios/include/SMManager+UserNotification.h +45 -33
  58. package/ios/include/SMManager+ViewController.h +45 -0
  59. package/ios/include/SMManager.h +14 -23
  60. package/ios/include/SMManagerInAppMessageDelegate.h +24 -0
  61. package/ios/include/SMManagerSetting.h +61 -33
  62. package/ios/include/SMManagerSettingIAC.h +6 -17
  63. package/ios/include/SMManagerSettingIAM.h +7 -16
  64. package/ios/include/SMManagerUniversalLinksDelegate.h +23 -0
  65. package/ios/include/SMMessage.h +1 -3
  66. package/ios/include/SMNSNotification.h +19 -5
  67. package/ios/include/SMNotificationAnnotationData.h +4 -8
  68. package/ios/include/SMNotificationButtonData.h +1 -6
  69. package/ios/include/SMNotificationButtonType.h +1 -14
  70. package/ios/include/SMNotificationMessage.h +31 -0
  71. package/ios/include/SMRemoteMessageDisplayType.h +32 -0
  72. package/ios/include/SMSuccess.h +1 -4
  73. package/ios/{libSelligentMobile2.5.2.a → libSelligentMobile.a} +0 -0
  74. package/package.json +3 -3
  75. package/trigger.yml +9 -0
  76. package/ios/LocationAuthorisationStatus.h +0 -6
  77. package/ios/LocationAuthorisationType.h +0 -4
  78. package/ios/include/SMLocationAuthorisationType.h +0 -57
  79. package/ios/include/SMManager+Location.h +0 -97
@@ -8,10 +8,11 @@
8
8
  @property (nonatomic, strong) NSString *clientId;
9
9
  @property (nonatomic, strong) NSString *privateKey;
10
10
  @property (nonatomic, strong) NSString *appGroupId;
11
+ @property (nonatomic, strong) NSNumber *shouldAddInAppMessageFromPushToInAppMessageList;
11
12
  @property (nonatomic, strong) NSNumber *shouldClearBadge;
12
13
  @property (nonatomic, strong) NSNumber *shouldDisplayRemoteNotification;
13
- @property (nonatomic, strong) NSNumber *configureLocationServices;
14
14
  @property (nonatomic, strong) NSNumber *clearCacheIntervalValue;
15
+ @property (nonatomic, strong) NSNumber *remoteMessageDisplayType;
15
16
  @property (nonatomic, strong) InAppMessageSettings *inAppMessageSettings;
16
17
 
17
18
  @end
@@ -24,10 +25,11 @@
24
25
  clientSettings.clientId = dictionary[@"clientId"];
25
26
  clientSettings.privateKey = dictionary[@"privateKey"];
26
27
  clientSettings.appGroupId = dictionary[@"appGroupId"];
28
+ clientSettings.shouldAddInAppMessageFromPushToInAppMessageList = dictionary[@"addInAppMessageFromPushToInAppMessageList"];
27
29
  clientSettings.shouldClearBadge = dictionary[@"shouldClearBadge"];
28
30
  clientSettings.shouldDisplayRemoteNotification = dictionary[@"shouldDisplayRemoteNotification"];
29
- clientSettings.configureLocationServices = dictionary[@"configureLocationServices"];
30
31
  clientSettings.clearCacheIntervalValue = dictionary[@"clearCacheIntervalValue"];
32
+ clientSettings.remoteMessageDisplayType = dictionary[@"remoteMessageDisplayType"];
31
33
  clientSettings.inAppMessageSettings = [InAppMessageSettings fromDictionary:dictionary];
32
34
  return clientSettings;
33
35
  }
package/ios/EnumMapper.h CHANGED
@@ -1,13 +1,12 @@
1
1
  #import <UIKit/UIKit.h>
2
2
  #import "LogLevel.h"
3
3
  #import "InAppMessageRefreshType.h"
4
- #import "LocationAuthorisationStatus.h"
5
- #import "LocationAuthorisationType.h"
4
+ #import "RemoteMessageDisplayType.h"
6
5
  #import "ClearCacheInterval.h"
7
- #import "SMLocationAuthorisationType.h"
8
6
  #import "SMLog.h"
9
7
  #import "SMClearCache.h"
10
8
  #import "SMInAppRefreshType.h"
9
+ #import "SMRemoteMessageDisplayType.h"
11
10
  #import "BackgroundFetchResult.h"
12
11
  #import "SMNotificationButtonType.h"
13
12
  #import "NotificationButtonType.h"
@@ -24,11 +23,7 @@
24
23
  - (SMInAppRefreshType)smInAppRefreshTypeForInAppMessageRefreshType:(InAppMessageRefreshType)inAppMessageRefreshType;
25
24
  - (InAppMessageRefreshType)inAppMessageRefreshTypeForSMInAppRefreshType:(SMInAppRefreshType)smInAppRefreshType;
26
25
 
27
- - (SMLocationAuthorisationStatus)smLocationAuthorisationStatusForLocationAuthorisationStatus:(LocationAuthorisationStatus)locationAuthorisationStatus;
28
- - (LocationAuthorisationStatus)locationAuthorisationStatusForSMLocationAuthorisationStatus:(SMLocationAuthorisationStatus)smLocationAuthorisationType;
29
-
30
- - (SMLocationAuthorisationType)smLocationAuthorisationTypeForLocationAuthorisationType:(LocationAuthorisationType)locationAuthorisationType;
31
- - (LocationAuthorisationType)locationAuthorisationTypeForSMLocationAuthorisationType:(SMLocationAuthorisationType)smLocationAuthorisationType;
26
+ - (SMRemoteMessageDisplayType)smRemoteMessageDisplayTypeForRemoteMessageDisplayType: (RemoteMessageDisplayType)remoteMessageDisplayType;
32
27
 
33
28
  - (UIBackgroundFetchResult)uiBackgroundFetchResultForBackgroundFetchResult:(BackgroundFetchResult)backgroundFetchResult;
34
29
  - (BackgroundFetchResult)backgroundFetchResultForUIBackgroundFetchResult:(UIBackgroundFetchResult)uiBackgroundFetchResult;
package/ios/EnumMapper.m CHANGED
@@ -4,8 +4,7 @@
4
4
  NSDictionary *_logLevelEnumMapping;
5
5
  NSDictionary *_clearCacheIntervalEnumMapping;
6
6
  NSDictionary *_inAppRefreshTypeEnumMapping;
7
- NSDictionary *_locationAuthorisationStatusMapping;
8
- NSDictionary *_locationAuthorisationTypeMapping;
7
+ NSDictionary *_remoteMessageDisplayTypeEnumMapping;
9
8
  NSDictionary *_backgroundFetchResult;
10
9
  NSDictionary *_notificationButtonTypeMapping;
11
10
  }
@@ -43,16 +42,11 @@
43
42
  @(iamrtHour) : @(kSMIA_RefreshType_Hourly),
44
43
  @(iamryDay ) : @(kSMIA_RefreshType_Daily),
45
44
  };
46
- _locationAuthorisationStatusMapping = @{
47
- @(ilasUnknown) : @(kSMLocationAuthorisationStatus_Unknown),
48
- @(ilasRefused) : @(kSMLocationAuthorisationStatus_Refused),
49
- @(ilasGrantedInUse) : @(kSMLocationAuthorisationStatus_GrantedInUse),
50
- @(ilasGrantedAlways) : @(kSMLocationAuthorisationStatus_GrantedAlways),
51
- };
52
- _locationAuthorisationTypeMapping = @{
53
- @(ilatInUse) : @(kSMLocationAuthorisationType_InUse),
54
- @(ilatAlways) : @(kSMLocationAuthorisationType_Always),
55
- };
45
+ _remoteMessageDisplayTypeEnumMapping = @{
46
+ @(rmdtAutomatic) : @(kSMRemoteMessageDisplayType_Automatic),
47
+ @(rmdtNone) : @(kSMRemoteMessageDisplayType_None),
48
+ @(rmdtNotification) : @(kSMRemoteMessageDisplayType_Notification),
49
+ };
56
50
  _backgroundFetchResult = @{
57
51
  @(bfrNewData) : @(UIBackgroundFetchResultNewData),
58
52
  @(bfrNoData) : @(UIBackgroundFetchResultNoData),
@@ -101,20 +95,8 @@
101
95
  return (InAppMessageRefreshType) ((NSNumber *)[_inAppRefreshTypeEnumMapping allKeysForObject:@(smInAppRefreshType)].firstObject).integerValue;
102
96
  }
103
97
 
104
- - (SMLocationAuthorisationStatus)smLocationAuthorisationStatusForLocationAuthorisationStatus:(LocationAuthorisationStatus)locationAuthorisationStatus {
105
- return (SMLocationAuthorisationStatus) ((NSNumber *)_locationAuthorisationStatusMapping[@(locationAuthorisationStatus)]).integerValue;
106
- }
107
-
108
- - (LocationAuthorisationStatus)locationAuthorisationStatusForSMLocationAuthorisationStatus:(SMLocationAuthorisationStatus)smLocationAuthorisationType {
109
- return (LocationAuthorisationStatus) ((NSNumber *)[_locationAuthorisationStatusMapping allKeysForObject:@(smLocationAuthorisationType)].firstObject).integerValue;
110
- }
111
-
112
- - (SMLocationAuthorisationType)smLocationAuthorisationTypeForLocationAuthorisationType:(LocationAuthorisationType)locationAuthorisationType {
113
- return (SMLocationAuthorisationType) ((NSNumber *)_locationAuthorisationTypeMapping[@(locationAuthorisationType)]).integerValue;
114
- }
115
-
116
- - (LocationAuthorisationType)locationAuthorisationTypeForSMLocationAuthorisationType:(SMLocationAuthorisationType)smLocationAuthorisationType {
117
- return (LocationAuthorisationType) ((NSNumber *)[_locationAuthorisationTypeMapping allKeysForObject:@(smLocationAuthorisationType)].firstObject).integerValue;
98
+ -(SMRemoteMessageDisplayType)smRemoteMessageDisplayTypeForRemoteMessageDisplayType:(RemoteMessageDisplayType)remoteMessageDisplayType {
99
+ return (SMRemoteMessageDisplayType) ((NSNumber *)_remoteMessageDisplayTypeEnumMapping[@(remoteMessageDisplayType)]).integerValue;
118
100
  }
119
101
 
120
102
  - (UIBackgroundFetchResult)uiBackgroundFetchResultForBackgroundFetchResult:(BackgroundFetchResult)backgroundFetchResult {
package/ios/RNSelligent.m CHANGED
@@ -3,7 +3,6 @@
3
3
  #import "SMNSNotification.h"
4
4
  #import "SMManager+DataTransaction.h"
5
5
  #import "SMManagerSetting+ClientSettings.h"
6
- #import "SMManager+Location.h"
7
6
  #import "SMManager+Log.h"
8
7
  #import "SMManager+SMEvent.h"
9
8
  #import "SMManager+RemoteNotification.h"
@@ -25,6 +24,7 @@ static NSString * const BROADCAST_BUTTON_CLICKED = @"ButtonClicked";
25
24
  static NSString * const BROADCAST_RECEIVED_IN_APP_MSG = @"ReceivedInAppMessage";
26
25
  static NSString * const BROADCAST_WILL_DISPLAY_NOTIFICATION = @"WillDisplayNotification";
27
26
  static NSString * const BROADCAST_WILL_DISMISS_NOTIFICATION = @"WillDismissNotification";
27
+ static NSString * const BROADCAST_RECEIVED_DEVICE_ID = @"ReceivedDeviceId";
28
28
  static NSString * const BROADCAST_RECEIVED_REMOTENOTIFICATION = @"ReceivedRemoteNotification";
29
29
  static NSString * const FETCHED_REMOTE_NOTIFICATION = @"FetchedRemoteNotification";
30
30
 
@@ -107,7 +107,7 @@ RCT_EXPORT_MODULE(RNSelligent)
107
107
  [[SMManager sharedInstance] willPresentNotification:notification withCompletionHandler:completionHandler];
108
108
  }
109
109
 
110
- + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler {
110
+ + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(UNNotificationContentExtensionResponseOption options))completionHandler {
111
111
  [[SMManager sharedInstance] didReceiveNotificationResponse:response withCompletionHandler:completionHandler];
112
112
  }
113
113
 
@@ -141,7 +141,8 @@ RCT_EXPORT_METHOD(getInAppMessages:(RCTResponseSenderBlock)callback) {
141
141
  @"creationDate" : @([[inAppMessage creationDate] timeIntervalSince1970]),
142
142
  @"expirationDate" : [inAppMessage expirationDate] ? @([[inAppMessage expirationDate] timeIntervalSince1970]) : [NSNull null],
143
143
  @"hasBeenSeen" : @([inAppMessage isViewed]),
144
- @"buttons" : mappedLinks
144
+ @"buttons" : mappedLinks,
145
+ @"type" : @([inAppMessage iamType])
145
146
  }];
146
147
  }
147
148
  callback(@[mappedMessages ?: [NSNull null], [NSNull null]]);
@@ -187,22 +188,6 @@ RCT_EXPORT_METHOD(applyLogLevel:(NSArray<NSNumber *> *)logLevels) {
187
188
  [[SMManager sharedInstance] applyLogLevel:(SMLogLevel) requestedBitShiftedLogLevel];
188
189
  }
189
190
 
190
- RCT_EXPORT_METHOD(currentAuthorisationStatus:(RCTResponseSenderBlock)callback) {
191
- SMLocationAuthorisationStatus smLocationAuthStatus = [[SMManager sharedInstance] currentAuthorisationStatus];
192
- LocationAuthorisationStatus status = [[EnumMapper sharedEnumMapper] locationAuthorisationStatusForSMLocationAuthorisationStatus:smLocationAuthStatus];
193
- callback(@[@(status), [NSNull null]]);
194
- }
195
-
196
- RCT_EXPORT_METHOD(requestLocationAuthorisation:(NSInteger)authorisationType) {
197
- SMLocationAuthorisationType smAuthType = [[EnumMapper sharedEnumMapper] smLocationAuthorisationTypeForLocationAuthorisationType:authorisationType];
198
- [[SMManager sharedInstance] requestLocationAuthorisation:smAuthType];
199
- }
200
-
201
- RCT_EXPORT_METHOD(isGeolocationEnabled:(RCTResponseSenderBlock)callback) {
202
- BOOL enabled = [[SMManager sharedInstance] isGeoLocationEnabled];
203
- callback(@[@(enabled), [NSNull null]]);
204
- }
205
-
206
191
  RCT_EXPORT_METHOD(sendEvent:(NSDictionary *)data successCallback:(RCTResponseSenderBlock)successCallback errorCallback:(RCTResponseSenderBlock)errorCallback) {
207
192
  Event *event = [Event fromDictionary:data];
208
193
  SMEvent *smEvent = [event smEventWithBlockSuccess:^(SMSuccess *success) {
@@ -213,18 +198,15 @@ RCT_EXPORT_METHOD(sendEvent:(NSDictionary *)data successCallback:(RCTResponseSen
213
198
  [[SMManager sharedInstance] sendSMEvent:smEvent];
214
199
  }
215
200
 
216
- RCT_EXPORT_METHOD(enableGeolocation:(BOOL)enable) {
217
- if (enable) {
218
- [[SMManager sharedInstance] enableGeoLocation];
219
- } else {
220
- [[SMManager sharedInstance] disableGeoLocation];
221
- }
222
- }
223
-
224
201
  RCT_EXPORT_METHOD(forceRemoteNotificationBackgroundFetchResult:(nonnull NSNumber *)remoteNotificationBackgroundFetchResult) {
225
202
  self.requestedForcedRemoteNotificationBackgroundFetchResult = @([[EnumMapper sharedEnumMapper] uiBackgroundFetchResultForBackgroundFetchResult:remoteNotificationBackgroundFetchResult.integerValue]);
226
203
  }
227
204
 
205
+ RCT_EXPORT_METHOD(getDeviceId:(RCTResponseSenderBlock)callback) {
206
+ NSString *deviceId = [[SMManager sharedInstance] deviceID];
207
+ callback(@[deviceId, [NSNull null]]);
208
+ }
209
+
228
210
  RCT_EXPORT_METHOD(enableNotifications:(BOOL)enable) {
229
211
  if (enable) {
230
212
  [[SMManager sharedInstance] registerForRemoteNotification];
@@ -233,6 +215,12 @@ RCT_EXPORT_METHOD(enableNotifications:(BOOL)enable) {
233
215
  }
234
216
  }
235
217
 
218
+ RCT_EXPORT_METHOD(registerForProvisionalRemoteNotification) {
219
+ if (@available(iOS 12.0, *)) {
220
+ [[SMManager sharedInstance] registerForProvisionalRemoteNotification];
221
+ }
222
+ }
223
+
236
224
  RCT_EXPORT_METHOD(displayLastReceivedRemotePushNotification) {
237
225
  [[SMManager sharedInstance] displayLastReceivedRemotePushNotification];
238
226
  }
@@ -258,6 +246,7 @@ RCT_EXPORT_METHOD(subscribeToEvents) {
258
246
  [self _addOrReplaceObserverForSelector:@selector(_handleButtonClicked:) forName:kSMNotification_Event_ButtonClicked];
259
247
  [self _addOrReplaceObserverForSelector:@selector(_handleWillDisplayNotification:) forName:kSMNotification_Event_WillDisplayNotification];
260
248
  [self _addOrReplaceObserverForSelector:@selector(_handleWillDismissNotification:) forName:kSMNotification_Event_WillDismissNotification];
249
+ [self _addOrReplaceObserverForSelector:@selector(_handleReceivedDeviceId:) forName:kSMNotification_Data_DeviceId];
261
250
  [self _addOrReplaceObserverForSelector:@selector(_handleDidReceiveRemoteNotification:) forName:kSMNotification_Event_DidReceiveRemoteNotification];
262
251
  }
263
252
 
@@ -307,6 +296,15 @@ RCT_EXPORT_METHOD(subscribeToEvents) {
307
296
  [self _sendBroadcastEventResultWithData:nil andType:BROADCAST_WILL_DISMISS_NOTIFICATION];
308
297
  }
309
298
 
299
+ - (void)_handleReceivedDeviceId:(NSNotification*)notification {
300
+ NSDictionary *dict = [notification userInfo];
301
+ NSString *deviceId = [dict objectForKey:kSMNotification_Data_DeviceId];
302
+ NSDictionary *data = @{
303
+ @"deviceId": deviceId
304
+ };
305
+ [self _sendBroadcastEventResultWithData:data andType:BROADCAST_RECEIVED_DEVICE_ID];
306
+ }
307
+
310
308
  - (void)_sendBroadcastEventResultWithData:(NSDictionary *)data andType:(NSString *)type {
311
309
  [self sendEventWithName:type body:@{@"data": data ?: [NSNull null], @"broadcastEventType": type}];
312
310
  }
@@ -0,0 +1,5 @@
1
+ typedef enum RemoteMessageDisplayType : NSInteger {
2
+ rmdtAutomatic = 20,
3
+ rmdtNone = 21,
4
+ rmdtNotification = 22,
5
+ } RemoteMessageDisplayType;
@@ -25,6 +25,11 @@
25
25
  }
26
26
  }
27
27
 
28
+ NSNumber *shouldAddInAppMessageFromPushToInAppMessageList = clientSettings.shouldAddInAppMessageFromPushToInAppMessageList;
29
+ if(shouldAddInAppMessageFromPushToInAppMessageList) {
30
+ settings.shouldAddInAppMessageFromPushToInAppMessageList = shouldAddInAppMessageFromPushToInAppMessageList.boolValue;
31
+ }
32
+
28
33
  NSNumber *shouldClearBadgeAsNumber = clientSettings.shouldClearBadge;
29
34
  if(shouldClearBadgeAsNumber) {
30
35
  settings.shouldClearBadge = shouldClearBadgeAsNumber.boolValue;
@@ -35,14 +40,15 @@
35
40
  settings.shouldDisplayRemoteNotification = shouldDisplayRemoteNotificationAsNumber.boolValue;
36
41
  }
37
42
 
38
- if(clientSettings.configureLocationServices.boolValue) {
39
- [settings configureLocationService];
40
- }
41
-
42
43
  NSNumber *clearCacheIntervalValueAsNumber = clientSettings.clearCacheIntervalValue;
43
44
  if(clearCacheIntervalValueAsNumber) {
44
45
  settings.clearCacheIntervalValue = [[EnumMapper sharedEnumMapper] smClearCacheForClearCacheInterval:clearCacheIntervalValueAsNumber.integerValue]; //((SMClearCache) );
45
46
  }
47
+
48
+ NSNumber *remoteMessageDisplayType = clientSettings.remoteMessageDisplayType;
49
+ if(remoteMessageDisplayType) {
50
+ settings.remoteMessageDisplayType = [[EnumMapper sharedEnumMapper] smRemoteMessageDisplayTypeForRemoteMessageDisplayType:remoteMessageDisplayType.integerValue];
51
+ }
46
52
  }
47
53
 
48
54
  + (SMManagerSettingIAM *)_iamManagerSettingsFor:(ClientSettings *)clientSettings {
@@ -7,7 +7,7 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- 60A5C5B5261747570002B0A2 /* libSelligentMobile2.5.2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 60A5C5B4261747570002B0A2 /* libSelligentMobile2.5.2.a */; };
10
+ 60698C70276254340003E3AD /* libSelligentMobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 60698C6F276254340003E3AD /* libSelligentMobile.a */; };
11
11
  B3E7B58A1CC2AC0600A0062D /* RNSelligent.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNSelligent.m */; };
12
12
  E5002D3320F5002A00F68509 /* ClientSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = E5002D3120F5002A00F68509 /* ClientSettings.m */; };
13
13
  E5002D3620F5004200F68509 /* SMManagerSetting+ClientSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = E5002D3520F5004200F68509 /* SMManagerSetting+ClientSettings.m */; };
@@ -32,7 +32,7 @@
32
32
 
33
33
  /* Begin PBXFileReference section */
34
34
  134814201AA4EA6300B7C361 /* libRNSelligent.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNSelligent.a; sourceTree = BUILT_PRODUCTS_DIR; };
35
- 60A5C5B4261747570002B0A2 /* libSelligentMobile2.5.2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSelligentMobile2.5.2.a; sourceTree = "<group>"; };
35
+ 60698C6F276254340003E3AD /* libSelligentMobile.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libSelligentMobile.a; sourceTree = "<group>"; };
36
36
  B3E7B5881CC2AC0600A0062D /* RNSelligent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSelligent.h; sourceTree = "<group>"; };
37
37
  B3E7B5891CC2AC0600A0062D /* RNSelligent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNSelligent.m; sourceTree = "<group>"; };
38
38
  E5002D3120F5002A00F68509 /* ClientSettings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClientSettings.m; sourceTree = "<group>"; };
@@ -48,8 +48,6 @@
48
48
  E5002D3F20F5015A00F68509 /* EnumMapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumMapper.h; sourceTree = "<group>"; };
49
49
  E5002D4020F5015A00F68509 /* EnumMapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EnumMapper.m; sourceTree = "<group>"; };
50
50
  E5002D4220F5018200F68509 /* InAppMessageRefreshType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InAppMessageRefreshType.h; sourceTree = "<group>"; };
51
- E5002D4320F5019500F68509 /* LocationAuthorisationStatus.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocationAuthorisationStatus.h; sourceTree = "<group>"; };
52
- E5002D4420F5019500F68509 /* LocationAuthorisationType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocationAuthorisationType.h; sourceTree = "<group>"; };
53
51
  E5002D4520F501A400F68509 /* ClearCacheInterval.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ClearCacheInterval.h; sourceTree = "<group>"; };
54
52
  E5002D4620F501A400F68509 /* NotificationButtonType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotificationButtonType.h; sourceTree = "<group>"; };
55
53
  E5002D4720F501B000F68509 /* BackgroundFetchResult.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BackgroundFetchResult.h; sourceTree = "<group>"; };
@@ -99,9 +97,7 @@
99
97
  E58A8CD320F32CB4005EA433 /* SMContentAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMContentAlignment.h; sourceTree = "<group>"; };
100
98
  E58A8CD420F32CB4005EA433 /* SMHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMHelper.h; sourceTree = "<group>"; };
101
99
  E58A8CD520F32CB4005EA433 /* SMInAppContentViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMInAppContentViewController.h; sourceTree = "<group>"; };
102
- E58A8CD620F32CB4005EA433 /* SMLocationAuthorisationType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMLocationAuthorisationType.h; sourceTree = "<group>"; };
103
100
  E58A8CD720F32CB4005EA433 /* SMInAppContentImageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMInAppContentImageViewController.h; sourceTree = "<group>"; };
104
- E58A8CD820F32CB4005EA433 /* SMManager+Location.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SMManager+Location.h"; sourceTree = "<group>"; };
105
101
  E58A8CD920F32CB4005EA433 /* SMEventUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SMEventUser.h; sourceTree = "<group>"; };
106
102
  /* End PBXFileReference section */
107
103
 
@@ -110,7 +106,7 @@
110
106
  isa = PBXFrameworksBuildPhase;
111
107
  buildActionMask = 2147483647;
112
108
  files = (
113
- 60A5C5B5261747570002B0A2 /* libSelligentMobile2.5.2.a in Frameworks */,
109
+ 60698C70276254340003E3AD /* libSelligentMobile.a in Frameworks */,
114
110
  );
115
111
  runOnlyForDeploymentPostprocessing = 0;
116
112
  };
@@ -128,7 +124,7 @@
128
124
  58B511D21A9E6C8500147676 = {
129
125
  isa = PBXGroup;
130
126
  children = (
131
- 60A5C5B4261747570002B0A2 /* libSelligentMobile2.5.2.a */,
127
+ 60698C6F276254340003E3AD /* libSelligentMobile.a */,
132
128
  E58A8CAC20F32CB4005EA433 /* include */,
133
129
  E5002D3720F500C200F68509 /* SelligentLogger.h */,
134
130
  E5002D3820F500C200F68509 /* SelligentLogger.m */,
@@ -149,8 +145,6 @@
149
145
  E5002D4720F501B000F68509 /* BackgroundFetchResult.h */,
150
146
  E5002D4520F501A400F68509 /* ClearCacheInterval.h */,
151
147
  E5002D4620F501A400F68509 /* NotificationButtonType.h */,
152
- E5002D4320F5019500F68509 /* LocationAuthorisationStatus.h */,
153
- E5002D4420F5019500F68509 /* LocationAuthorisationType.h */,
154
148
  E5002D4220F5018200F68509 /* InAppMessageRefreshType.h */,
155
149
  E51D94E820FF88DB00069B07 /* EventType.h */,
156
150
  E5002D3F20F5015A00F68509 /* EnumMapper.h */,
@@ -203,9 +197,7 @@
203
197
  E58A8CD320F32CB4005EA433 /* SMContentAlignment.h */,
204
198
  E58A8CD420F32CB4005EA433 /* SMHelper.h */,
205
199
  E58A8CD520F32CB4005EA433 /* SMInAppContentViewController.h */,
206
- E58A8CD620F32CB4005EA433 /* SMLocationAuthorisationType.h */,
207
200
  E58A8CD720F32CB4005EA433 /* SMInAppContentImageViewController.h */,
208
- E58A8CD820F32CB4005EA433 /* SMManager+Location.h */,
209
201
  E58A8CD920F32CB4005EA433 /* SMEventUser.h */,
210
202
  );
211
203
  path = include;
@@ -10,43 +10,39 @@
10
10
 
11
11
  /*!
12
12
  * @discussion This is the Base class for message (push notif, in app message and in app content)
13
- * #SMBaseMessage :#
14
13
  */
15
14
  @interface SMBaseMessage : NSObject
16
15
 
17
16
  /*!
18
17
  * NSString instance providing the id of the message
19
18
  */
20
- @property (nonatomic) NSString *idMessage;
19
+ @property (readonly, nonatomic) NSString *_Nullable idMessage;
21
20
 
22
21
  /*!
23
22
  * NSDate instance providing the creation date of the message
24
- * @deprecated Deprecated use receptionDate instead
23
+ *
24
+ * @warning Deprecated - use receptionDate instead
25
25
  */
26
- @property (nonatomic) NSDate *dateCreation __deprecated __deprecated_msg("Use receptionDate instead");
26
+ @property (readonly, nonatomic) NSDate *_Nullable dateCreation __deprecated __deprecated_msg("Use receptionDate instead");
27
27
 
28
28
  /*!
29
29
  * NSDate instance providing the reception date on sdk side of the message
30
30
  */
31
- @property (nonatomic) NSDate *receptionDate;
31
+ @property (readonly, nonatomic) NSDate *_Nullable receptionDate;
32
32
 
33
33
  /*!
34
34
  * NSDate instance providing the expiration date of the message
35
35
  */
36
- @property (nonatomic) NSDate *expirationDate;
36
+ @property (readonly, nonatomic) NSDate *_Nullable expirationDate;
37
37
 
38
38
  /*!
39
39
  * NSDate instance providing the creation date of the message
40
40
  */
41
- @property (nonatomic) NSDate *creationDate;
41
+ @property (readonly, nonatomic) NSDate *_Nullable creationDate;
42
42
 
43
43
  /*!
44
44
  * bool instance infiorming if the message has already been displayed and viewed by user
45
45
  */
46
- @property (nonatomic) bool isViewed;
46
+ @property (readonly, nonatomic) bool isViewed;
47
47
 
48
- /*!
49
- * bool instance infiorming if the message has been deleted
50
- */
51
- @property (nonatomic) bool isDeleted;
52
48
  @end
@@ -12,10 +12,10 @@
12
12
  * @typedef type of block that will be triggered when an event has been succesfully sent
13
13
  * @param success a SMSuccess object
14
14
  */
15
- typedef void(^SMCompletionBlockSuccess)(SMSuccess *success);
15
+ typedef void(^SMCompletionBlockSuccess)(SMSuccess *_Nullable success);
16
16
 
17
17
  /**
18
18
  * @typedef type of block that will be triggered when an event has failed to be sent
19
19
  * @param failure a SMFailure failure
20
20
  */
21
- typedef void(^SMCompletionBlockFailure)(SMFailure *failure);
21
+ typedef void(^SMCompletionBlockFailure)(SMFailure *_Nullable failure);
@@ -6,10 +6,8 @@
6
6
  // Copyright (c) 2015 Selligent. All rights reserved.
7
7
  //
8
8
 
9
-
10
9
  /**
11
10
  * Enumeration used to define how often the SDK's cache should automaticaly clear itself
12
- * #SMClearCache :#
13
11
  */
14
12
  typedef NS_ENUM(NSInteger, SMClearCache) {
15
13
  /**
@@ -7,7 +7,7 @@
7
7
  //
8
8
 
9
9
  /**
10
- * #SMContentAlignment :#
10
+ *
11
11
  */
12
12
  typedef NS_ENUM(NSInteger, SMContentAlignment) {
13
13
  /*!
@@ -25,4 +25,3 @@ typedef NS_ENUM(NSInteger, SMContentAlignment) {
25
25
  */
26
26
  kSMAlignCenter
27
27
  };
28
-
@@ -9,28 +9,30 @@
9
9
  #import <Foundation/Foundation.h>
10
10
 
11
11
  /*!
12
- * #SMDeviceInfos :#
13
12
  */
14
13
  @interface SMDeviceInfos : NSObject
15
14
 
16
15
  /*!
17
16
  * Any External Id in your possession that you wish to transmit to the back-end
18
- * @discussion NSString
17
+ *
18
+ * @discussion NSString representing your external, custom identifier.
19
19
  * By default, it is an empty string
20
20
  */
21
- @property (nonatomic) NSString *externalId;
21
+ @property (nonatomic) NSString* _Nullable externalId;
22
22
 
23
23
  /*!
24
24
  * Create a generic deviceinfos object
25
- * @return a SMDeviceInfos object
25
+ *
26
+ * @return An SMDeviceInfos object
26
27
  */
27
- + (instancetype)defaultDeviceInfos;
28
+ + (instancetype _Nullable ) defaultDeviceInfos;
28
29
 
29
30
  /*!
30
31
  * Create a deviceinfos object with an external id property already set with the value provided
31
- * @param externalId a string containing the id you want to provide to the back-end
32
- * @return a SMDeviceInfos object
32
+ *
33
+ * @param externalId An string containing the id you want to provide to the back-end
34
+ * @return An SMDeviceInfos object
33
35
  */
34
- + (instancetype)deviceInfosWithExternalId:(NSString*) externalId;
36
+ + (instancetype _Nullable ) deviceInfosWithExternalId:(NSString*_Nullable) externalId;
35
37
 
36
38
  @end
@@ -6,9 +6,8 @@
6
6
  // Copyright © 2016 Selligent. All rights reserved.
7
7
  //
8
8
 
9
-
10
9
  /*!
11
- * #SMDisplayMode :#
10
+ *
12
11
  */
13
12
  typedef NS_ENUM(NSInteger, SMDisplayMode) {
14
13
  /*!
@@ -11,15 +11,11 @@
11
11
  #import "SMFailure.h"
12
12
  #import "SMSuccess.h"
13
13
 
14
-
15
-
16
14
  /*!
17
- * @discussion This is the Base class for all type of events
18
- * #SMEvent :#
15
+ * This is the Base class for all type of events
19
16
  */
20
17
  @interface SMEvent : NSObject
21
18
 
22
-
23
19
  /*!
24
20
  * Confirm if the current event should be cached or not
25
21
  * @discussion If the event fail to be delivered to your backend, then by default, it is cached into an internal queue.
@@ -29,36 +25,44 @@
29
25
  */
30
26
  @property (nonatomic) BOOL shouldCache;
31
27
 
32
-
33
-
34
28
  /*!
35
29
  * Create a generic event object that will be sent to platform
36
- * @param dict a Dictionary containing any kind of custom datas that must be stored and managed by platform
37
- * @return a SMEvent object
30
+ *
31
+ * @param dict A Dictionary containing any kind of custom datas that must be stored and managed by platform
32
+ * @return An SMEvent object
38
33
  */
39
- + (instancetype _Nonnull)eventWithDictionary:(NSDictionary* _Nullable)dict;
34
+ + (instancetype _Nonnull) eventWithDictionary:(NSDictionary* _Nullable)dict;
40
35
 
41
36
  /*!
42
37
  * Allow to initialise a success block and/or a failure block that will be triggered after an event is sent to the platform
43
38
  *
44
- * @param blockSuccess a SMCompletionBlockSuccess block that will be triggered if the send to the platform is successfull
45
- * @param blockFailure a SMCompletionBlockFailure block that will be triggered if the send to the platform has failed
39
+ * @param blockSuccess An SMCompletionBlockSuccess block that will be triggered if the send to the platform is successfull
40
+ * @param blockFailure An SMCompletionBlockFailure block that will be triggered if the send to the platform has failed
46
41
  * @discussion This method may be used as follow:
47
42
  *
48
43
  * @code
49
44
  * NSDictionary *dictMyCustomData = @{@"MyKey": @"MyValue"};
45
+ *
50
46
  * SMEvent *event = [SMEvent eventWithDictionary:dictMyCustomData];
51
- * [event applyBlockSuccess:^(SMSuccess *success) {
52
- * // My code for success}
53
- * BlockFailure:^(SMFailure *failure) {
47
+ *
48
+ * [event applyBlockSuccess:^(SMSuccess *success) {
49
+ *
50
+ * // My code for success}
51
+ *
52
+ * BlockFailure:^(SMFailure *failure) {
53
+ *
54
54
  * // My code for failure }];
55
+ *
55
56
  * [[SMManager sharedInstance] sendSMEvent:event];
56
57
  * @endcode
58
+ *
57
59
  * This method is optional. Use it only if you need it.
58
60
  * @warning It is developer's responsability to make sure no strong retrain cycles are added to the completion-blocks.
59
61
  * Make sure to read the following [Apple documentation.](https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW16)
62
+ * @see SMCompletionBlockSuccess
63
+ * @see SMCompletionBlockFailure
60
64
  */
61
- - (void)applyBlockSuccess:(SMCompletionBlockSuccess _Nullable)blockSuccess BlockFailure:(SMCompletionBlockFailure _Nullable)blockFailure;
65
+ - (void) applyBlockSuccess:(SMCompletionBlockSuccess _Nullable)blockSuccess BlockFailure:(SMCompletionBlockFailure _Nullable)blockFailure;
62
66
 
63
67
  @end
64
68
 
@@ -9,7 +9,6 @@
9
9
  #import "SMEvent.h"
10
10
 
11
11
  /*!
12
- * @inherits SMEvent
13
12
  * @discussion Class representing all User-eventing
14
13
  * Instances of this class should not be directly created.
15
14
  * Please use children classes instead.
@@ -9,38 +9,33 @@
9
9
  #import "SMEventUser.h"
10
10
 
11
11
  /*!
12
- * @class SMEventUserLogin
13
- * @inherits SMEventUser
14
- * @discussion user login event class
15
- * #SMEventUserLogin:#
12
+ * User login event class
16
13
  */
17
14
  @interface SMEventUserLogin : SMEventUser
18
15
 
19
-
20
16
  /*!
21
17
  * Create a UserLogin event object that will be sent to selligent platform when user logged in
22
18
  *
23
- * @param mail the e-mail of the user
24
- * @return a SMEventUserLogin object
19
+ * @param mail The e-mail of the user
20
+ * @return An SMEventUserLogin object
25
21
  */
26
- + (instancetype _Nonnull)eventWithEmail:(NSString*_Null_unspecified)mail;
22
+ + (instancetype _Nonnull) eventWithEmail:(NSString*_Null_unspecified)mail;
27
23
 
28
24
  /*!
29
25
  * Create a UserLogin event object that will be sent to selligent platform when user logged in
30
26
  *
31
- * @param mail the e-mail of the user
32
- * @param dict a Dictionary containing a string as data that must be stored and managed by platform
27
+ * @param mail The e-mail of the user
28
+ * @param dict A Dictionary containing a string as data that must be stored and managed by platform
33
29
  * If email is not provided you can use in the dictionary an alternate key/value field to search for the user
34
- * example: [SMEventUserLogin eventWithEmail @"" Dictionary: @{@"userID": @"1234"}];
35
- * @return a SMEventUserLogin object
30
+ * @return An SMEventUserLogin object
36
31
  */
37
- + (instancetype _Nonnull)eventWithEmail:(NSString*_Null_unspecified)mail Dictionary:(NSDictionary<NSString*,NSString*>*_Nullable)dict;
32
+ + (instancetype _Nonnull) eventWithEmail:(NSString*_Null_unspecified)mail Dictionary:(NSDictionary<NSString*,NSString*>*_Nullable)dict;
38
33
 
39
34
  /*!
40
35
  * Create a UserLogin event object that will be sent to platform
41
- * @param dict a Dictionary containing an alternate key/value field to search for the user
42
- * example: [SMEventUserLogin eventWithDictionary: @{@"userID": @"1234"}];
43
- * @return a SMEventUserLogin object
36
+ *
37
+ * @param dict A Dictionary containing an alternate key/value field to search for the user
38
+ * @return An SMEventUserLogin object
44
39
  */
45
40
  + (instancetype _Nonnull)eventWithDictionary:(NSDictionary* _Nullable)dict;
46
41