@selligent-marketing-cloud/selligent-react-native 3.0.0 → 3.2.6

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 (184) hide show
  1. package/README.md +43 -1550
  2. package/RNSelligent.podspec +8 -15
  3. package/android/build.gradle +48 -81
  4. package/android/src/main/java/com/selligent/BroadcastEventType.java +4 -1
  5. package/android/src/main/java/com/selligent/ButtonAction.java +81 -0
  6. package/android/src/main/java/com/selligent/ButtonBroadcastEventDataParser.java +9 -3
  7. package/android/src/main/java/com/selligent/DeviceIdBroadcastEventDataParser.java +15 -0
  8. package/android/src/main/java/com/selligent/EventType.java +1 -1
  9. package/android/src/main/java/com/selligent/GCMTokenBroadcastEventDataParser.java +6 -1
  10. package/android/src/main/java/com/selligent/InAppMessageBroadcastEventDataParser.java +7 -1
  11. package/android/src/main/java/com/selligent/NotificationMessageBroadcastEventDataParser.java +19 -0
  12. package/android/src/main/java/com/selligent/RNSelligent.java +195 -56
  13. package/android/src/main/java/com/selligent/SMSettingsFactory.java +0 -1
  14. package/android/src/main/java/com/selligent/Settings.java +0 -9
  15. package/constants.d.ts +7 -33
  16. package/constants.js +51 -85
  17. package/documentation/README.md +826 -0
  18. package/helpers.js +5 -6
  19. package/index.android.js +8 -83
  20. package/index.d.ts +33 -43
  21. package/index.ios.js +25 -76
  22. package/index.js +153 -45
  23. package/ios/RNSelligentMapper.h +21 -0
  24. package/ios/RNSelligentMapper.m +151 -0
  25. package/ios/RNSelligentMobileSDK.xcframework/Info.plist +40 -0
  26. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Headers/RNSelligentMobileSDK-Swift.h +350 -0
  27. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Info.plist +0 -0
  28. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios.abi.json +2603 -0
  29. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +59 -0
  30. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  31. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios.swiftinterface +59 -0
  32. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/Modules/module.modulemap +4 -0
  33. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/RNSelligentMobileSDK +0 -0
  34. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64/RNSelligentMobileSDK.framework/_CodeSignature/CodeResources +179 -0
  35. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Headers/RNSelligentMobileSDK-Swift.h +696 -0
  36. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Info.plist +0 -0
  37. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +2603 -0
  38. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +59 -0
  39. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  40. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +59 -0
  41. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +2603 -0
  42. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +59 -0
  43. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  44. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/RNSelligentMobileSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +59 -0
  45. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/Modules/module.modulemap +4 -0
  46. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/RNSelligentMobileSDK +0 -0
  47. package/ios/RNSelligentMobileSDK.xcframework/ios-arm64_x86_64-simulator/RNSelligentMobileSDK.framework/_CodeSignature/CodeResources +234 -0
  48. package/package.json +30 -11
  49. package/.gitattributes +0 -1
  50. package/CHANGELOG.md +0 -60
  51. package/android/README.md +0 -15
  52. package/android/build/generated/source/buildConfig/debug/com/selligent/BuildConfig.java +0 -12
  53. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +0 -9
  54. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
  55. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -4
  56. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  57. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  58. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  59. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -6548
  60. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  61. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  62. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  63. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  64. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  65. package/android/build/intermediates/javac/debug/classes/com/selligent/BroadcastDataFactory$1.class +0 -0
  66. package/android/build/intermediates/javac/debug/classes/com/selligent/BroadcastDataFactory.class +0 -0
  67. package/android/build/intermediates/javac/debug/classes/com/selligent/BroadcastEventDataParser.class +0 -0
  68. package/android/build/intermediates/javac/debug/classes/com/selligent/BroadcastEventType.class +0 -0
  69. package/android/build/intermediates/javac/debug/classes/com/selligent/BuildConfig.class +0 -0
  70. package/android/build/intermediates/javac/debug/classes/com/selligent/ButtonBroadcastEventDataParser.class +0 -0
  71. package/android/build/intermediates/javac/debug/classes/com/selligent/ClearCacheIntervalValue.class +0 -0
  72. package/android/build/intermediates/javac/debug/classes/com/selligent/Event.class +0 -0
  73. package/android/build/intermediates/javac/debug/classes/com/selligent/EventReceiver.class +0 -0
  74. package/android/build/intermediates/javac/debug/classes/com/selligent/EventType.class +0 -0
  75. package/android/build/intermediates/javac/debug/classes/com/selligent/GCMTokenBroadcastEventDataParser.class +0 -0
  76. package/android/build/intermediates/javac/debug/classes/com/selligent/InAppMessageBroadcastEventDataParser.class +0 -0
  77. package/android/build/intermediates/javac/debug/classes/com/selligent/InAppMessageRefreshType.class +0 -0
  78. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligent$1.class +0 -0
  79. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligent$2.class +0 -0
  80. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligent$3.class +0 -0
  81. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligent$4.class +0 -0
  82. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligent$5.class +0 -0
  83. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligent.class +0 -0
  84. package/android/build/intermediates/javac/debug/classes/com/selligent/RNSelligentPackage.class +0 -0
  85. package/android/build/intermediates/javac/debug/classes/com/selligent/RemoteMessageDisplayType.class +0 -0
  86. package/android/build/intermediates/javac/debug/classes/com/selligent/SMEventFactory$1.class +0 -0
  87. package/android/build/intermediates/javac/debug/classes/com/selligent/SMEventFactory.class +0 -0
  88. package/android/build/intermediates/javac/debug/classes/com/selligent/SMSettingsFactory.class +0 -0
  89. package/android/build/intermediates/javac/debug/classes/com/selligent/Settings.class +0 -0
  90. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -2
  91. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -11
  92. package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +0 -9
  93. package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
  94. package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +0 -18
  95. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  96. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -4894
  97. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -25
  98. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  99. package/android/libs/sdk-release.aar +0 -0
  100. package/documentation/add_json_file.png +0 -0
  101. package/documentation/add_lib_file.png +0 -0
  102. package/ios/BackgroundFetchResult.h +0 -5
  103. package/ios/ClearCacheInterval.h +0 -7
  104. package/ios/ClientSettings.h +0 -22
  105. package/ios/ClientSettings.m +0 -39
  106. package/ios/EnumMapper.h +0 -36
  107. package/ios/EnumMapper.m +0 -121
  108. package/ios/Event+SMEvent.h +0 -13
  109. package/ios/Event+SMEvent.m +0 -41
  110. package/ios/Event.h +0 -12
  111. package/ios/Event.m +0 -24
  112. package/ios/EventType.h +0 -7
  113. package/ios/InAppMessageRefreshType.h +0 -6
  114. package/ios/InAppMessageSettings.h +0 -9
  115. package/ios/InAppMessageSettings.m +0 -19
  116. package/ios/LocationAuthorisationStatus.h +0 -6
  117. package/ios/LocationAuthorisationType.h +0 -4
  118. package/ios/LogLevel.h +0 -9
  119. package/ios/NotificationButtonType.h +0 -15
  120. package/ios/ParsableObject.h +0 -5
  121. package/ios/RNSelligent.h +0 -22
  122. package/ios/RNSelligent.m +0 -347
  123. package/ios/RemoteMessageDisplayType.h +0 -5
  124. package/ios/SMManagerSetting+ClientSettings.h +0 -9
  125. package/ios/SMManagerSetting+ClientSettings.m +0 -73
  126. package/ios/SelligentLogger.h +0 -7
  127. package/ios/SelligentLogger.m +0 -9
  128. package/ios/SelligentReactNative.xcodeproj/project.pbxproj +0 -446
  129. package/ios/include/SMBaseMessage.h +0 -48
  130. package/ios/include/SMBlock.h +0 -21
  131. package/ios/include/SMClearCache.h +0 -34
  132. package/ios/include/SMContentAlignment.h +0 -27
  133. package/ios/include/SMDeviceInfos.h +0 -38
  134. package/ios/include/SMDisplayMode.h +0 -27
  135. package/ios/include/SMEvent.h +0 -69
  136. package/ios/include/SMEventUser.h +0 -20
  137. package/ios/include/SMEventUserLogin.h +0 -42
  138. package/ios/include/SMEventUserLogout.h +0 -42
  139. package/ios/include/SMEventUserRegistration.h +0 -42
  140. package/ios/include/SMEventUserUnregistration.h +0 -42
  141. package/ios/include/SMFailure.h +0 -19
  142. package/ios/include/SMHelper.h +0 -51
  143. package/ios/include/SMInAppContentHTMLViewController.h +0 -59
  144. package/ios/include/SMInAppContentImageViewController.h +0 -36
  145. package/ios/include/SMInAppContentMessage.h +0 -56
  146. package/ios/include/SMInAppContentStyleOptions.h +0 -511
  147. package/ios/include/SMInAppContentType.h +0 -35
  148. package/ios/include/SMInAppContentURLViewController.h +0 -36
  149. package/ios/include/SMInAppContentViewController.h +0 -31
  150. package/ios/include/SMInAppMessage.h +0 -51
  151. package/ios/include/SMInAppMessageType.h +0 -50
  152. package/ios/include/SMInAppRefreshType.h +0 -29
  153. package/ios/include/SMLink.h +0 -39
  154. package/ios/include/SMLog.h +0 -54
  155. package/ios/include/SMManager+DataTransaction.h +0 -33
  156. package/ios/include/SMManager+InAppContent.h +0 -170
  157. package/ios/include/SMManager+InAppMessage.h +0 -172
  158. package/ios/include/SMManager+Location.h +0 -41
  159. package/ios/include/SMManager+Log.h +0 -31
  160. package/ios/include/SMManager+RemoteNotification.h +0 -171
  161. package/ios/include/SMManager+SMEvent.h +0 -67
  162. package/ios/include/SMManager+SMLink.h +0 -44
  163. package/ios/include/SMManager+SilentPush.h +0 -53
  164. package/ios/include/SMManager+StyleOptions.h +0 -36
  165. package/ios/include/SMManager+UserNotification.h +0 -180
  166. package/ios/include/SMManager+ViewController.h +0 -45
  167. package/ios/include/SMManager.h +0 -69
  168. package/ios/include/SMManagerHelper.h +0 -18
  169. package/ios/include/SMManagerInAppMessageDelegate.h +0 -24
  170. package/ios/include/SMManagerSetting+Location.h +0 -27
  171. package/ios/include/SMManagerSetting.h +0 -180
  172. package/ios/include/SMManagerSettingIAC.h +0 -48
  173. package/ios/include/SMManagerSettingIAM.h +0 -49
  174. package/ios/include/SMManagerUniversalLinksDelegate.h +0 -23
  175. package/ios/include/SMMessage.h +0 -21
  176. package/ios/include/SMNSNotification.h +0 -81
  177. package/ios/include/SMNotificationAnnotationData.h +0 -33
  178. package/ios/include/SMNotificationButtonData.h +0 -20
  179. package/ios/include/SMNotificationButtonType.h +0 -90
  180. package/ios/include/SMNotificationMessage.h +0 -31
  181. package/ios/include/SMRemoteMessageDisplayType.h +0 -32
  182. package/ios/include/SMSuccess.h +0 -16
  183. package/ios/libSelligentMobile.a +0 -0
  184. package/trigger.yml +0 -9
@@ -1,25 +0,0 @@
1
- -- Merging decision tree log ---
2
- manifest
3
- ADDED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml:2:1-5:12
4
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml:2:1-5:12
5
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml:2:1-5:12
6
- package
7
- ADDED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml:3:11-34
8
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
9
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
10
- xmlns:android
11
- ADDED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml:2:11-69
12
- uses-sdk
13
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
14
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
15
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
16
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
17
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
18
- android:targetSdkVersion
19
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
20
- ADDED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
21
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
22
- android:minSdkVersion
23
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
24
- ADDED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
25
- INJECTED from /Users/ben/Documents/code/appfoundry/selligent/af-selligent-react-native-module-dev-env/node_modules/selligent-react-native/android/src/main/AndroidManifest.xml
Binary file
Binary file
Binary file
@@ -1,5 +0,0 @@
1
- typedef enum BackgroundFetchResult : NSInteger {
2
- bfrNewData = 60,
3
- bfrNoData = 61,
4
- bfrFailed = 62,
5
- } BackgroundFetchResult;
@@ -1,7 +0,0 @@
1
- typedef enum ClearCacheInterval : NSInteger {
2
- cciAuto = 30,
3
- cciNone = 31,
4
- cciWeek = 32,
5
- cciMonth = 33,
6
- cciQuarter = 34,
7
- } ClearCacheInterval;
@@ -1,22 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import "ParsableObject.h"
3
- #import "InAppMessageSettings.h"
4
-
5
- @interface ClientSettings : NSObject<ParsebleObject>
6
-
7
- @property (nonatomic, strong, readonly) NSString *url;
8
- @property (nonatomic, strong, readonly) NSString *clientId;
9
- @property (nonatomic, strong, readonly) NSString *privateKey;
10
- @property (nonatomic, strong, readonly) NSString *appGroupId;
11
- @property (nonatomic, strong, readonly) NSNumber *shouldAddInAppMessageFromPushToInAppMessageList;
12
- @property (nonatomic, strong, readonly) NSNumber *shouldClearBadge;
13
- @property (nonatomic, strong, readonly) NSNumber *shouldDisplayRemoteNotification;
14
- @property (nonatomic, strong, readonly) NSNumber *configureLocationServices;
15
- @property (nonatomic, strong, readonly) NSNumber *clearCacheIntervalValue;
16
- @property (nonatomic, strong, readonly) NSNumber *remoteMessageDisplayType;
17
- @property (nonatomic, strong, readonly) InAppMessageSettings *inAppMessageSettings;
18
-
19
- @end
20
-
21
-
22
-
@@ -1,39 +0,0 @@
1
- #import "ClientSettings.h"
2
- #import "LogLevel.h"
3
- #import "ParsableObject.h"
4
-
5
- @interface ClientSettings()
6
-
7
- @property (nonatomic, strong) NSString *url;
8
- @property (nonatomic, strong) NSString *clientId;
9
- @property (nonatomic, strong) NSString *privateKey;
10
- @property (nonatomic, strong) NSString *appGroupId;
11
- @property (nonatomic, strong) NSNumber *shouldAddInAppMessageFromPushToInAppMessageList;
12
- @property (nonatomic, strong) NSNumber *shouldClearBadge;
13
- @property (nonatomic, strong) NSNumber *shouldDisplayRemoteNotification;
14
- @property (nonatomic, strong) NSNumber *configureLocationServices;
15
- @property (nonatomic, strong) NSNumber *clearCacheIntervalValue;
16
- @property (nonatomic, strong) NSNumber *remoteMessageDisplayType;
17
- @property (nonatomic, strong) InAppMessageSettings *inAppMessageSettings;
18
-
19
- @end
20
-
21
- @implementation ClientSettings
22
-
23
- + (instancetype)fromDictionary:(NSDictionary *)dictionary {
24
- ClientSettings *clientSettings = [[ClientSettings alloc] init];
25
- clientSettings.url = dictionary[@"url"];
26
- clientSettings.clientId = dictionary[@"clientId"];
27
- clientSettings.privateKey = dictionary[@"privateKey"];
28
- clientSettings.appGroupId = dictionary[@"appGroupId"];
29
- clientSettings.shouldAddInAppMessageFromPushToInAppMessageList = dictionary[@"addInAppMessageFromPushToInAppMessageList"];
30
- clientSettings.shouldClearBadge = dictionary[@"shouldClearBadge"];
31
- clientSettings.shouldDisplayRemoteNotification = dictionary[@"shouldDisplayRemoteNotification"];
32
- clientSettings.configureLocationServices = dictionary[@"configureLocationServices"];
33
- clientSettings.clearCacheIntervalValue = dictionary[@"clearCacheIntervalValue"];
34
- clientSettings.remoteMessageDisplayType = dictionary[@"remoteMessageDisplayType"];
35
- clientSettings.inAppMessageSettings = [InAppMessageSettings fromDictionary:dictionary];
36
- return clientSettings;
37
- }
38
-
39
- @end
package/ios/EnumMapper.h DELETED
@@ -1,36 +0,0 @@
1
- #import <UIKit/UIKit.h>
2
- #import "LogLevel.h"
3
- #import "InAppMessageRefreshType.h"
4
- #import "RemoteMessageDisplayType.h"
5
- #import "LocationAuthorisationStatus.h"
6
- #import "LocationAuthorisationType.h"
7
- #import "ClearCacheInterval.h"
8
- #import "SMLog.h"
9
- #import "SMClearCache.h"
10
- #import "SMInAppRefreshType.h"
11
- #import "SMRemoteMessageDisplayType.h"
12
- #import "BackgroundFetchResult.h"
13
- #import "SMNotificationButtonType.h"
14
- #import "NotificationButtonType.h"
15
-
16
- @interface EnumMapper : NSObject
17
-
18
- + (instancetype)sharedEnumMapper;
19
- - (SMLogLevel)smLogLevelForLogLevel:(LogLevel)logLevel;
20
- - (LogLevel)logLevelForSMLogLevel:(SMLogLevel)smLogLevel;
21
-
22
- - (SMClearCache)smClearCacheForClearCacheInterval:(ClearCacheInterval)clearCacheInterval;
23
- - (SMClearCache)clearCacheIntervalForSMClearCache:(SMClearCache)smClearCache;
24
-
25
- - (SMInAppRefreshType)smInAppRefreshTypeForInAppMessageRefreshType:(InAppMessageRefreshType)inAppMessageRefreshType;
26
- - (InAppMessageRefreshType)inAppMessageRefreshTypeForSMInAppRefreshType:(SMInAppRefreshType)smInAppRefreshType;
27
-
28
- - (SMRemoteMessageDisplayType)smRemoteMessageDisplayTypeForRemoteMessageDisplayType: (RemoteMessageDisplayType)remoteMessageDisplayType;
29
-
30
- - (UIBackgroundFetchResult)uiBackgroundFetchResultForBackgroundFetchResult:(BackgroundFetchResult)backgroundFetchResult;
31
- - (BackgroundFetchResult)backgroundFetchResultForUIBackgroundFetchResult:(UIBackgroundFetchResult)uiBackgroundFetchResult;
32
-
33
- - (SMNotificationButtonType)smNotificationButtonTypeForNotificationButtonType:(NotificationButtonType)notificationButtonType;
34
- - (NotificationButtonType)notificationButtonTypeForSMNotificationButtonType:(SMNotificationButtonType)smNotificationButtonType;
35
-
36
- @end
package/ios/EnumMapper.m DELETED
@@ -1,121 +0,0 @@
1
- #import "EnumMapper.h"
2
-
3
- @implementation EnumMapper {
4
- NSDictionary *_logLevelEnumMapping;
5
- NSDictionary *_clearCacheIntervalEnumMapping;
6
- NSDictionary *_inAppRefreshTypeEnumMapping;
7
- NSDictionary *_remoteMessageDisplayTypeEnumMapping;
8
- NSDictionary *_locationAuthorisationStatusMapping;
9
- NSDictionary *_locationAuthorisationTypeMapping;
10
- NSDictionary *_backgroundFetchResult;
11
- NSDictionary *_notificationButtonTypeMapping;
12
- }
13
-
14
- + (instancetype)sharedEnumMapper {
15
- static EnumMapper *sharedSDKEnumMapper = nil;
16
- static dispatch_once_t onceToken;
17
- dispatch_once(&onceToken, ^{
18
- sharedSDKEnumMapper = [[self alloc] init];
19
- });
20
- return sharedSDKEnumMapper;
21
- }
22
-
23
- - (instancetype)init {
24
- if (self = [super init]) {
25
- _logLevelEnumMapping = @{
26
- @(llNone) : @(kSMLogLevel_None),
27
- @(llInfo) : @(kSMLogLevel_Info),
28
- @(llWarning) : @(kSMLogLevel_Warning),
29
- @(llError) : @(kSMLogLevel_Error),
30
- @(llHTTPCall) : @(kSMLogLevel_HTTPCall),
31
- @(llLocation) : @(kSMLogLevel_Location),
32
- @(llAll) : @(kSMLogLevel_All),
33
- };
34
- _clearCacheIntervalEnumMapping = @{
35
- @(cciAuto) : @(kSMClearCache_Auto),
36
- @(cciNone) : @(kSMClearCache_None),
37
- @(cciWeek) : @(kSMClearCache_Week),
38
- @(cciMonth) : @(kSMClearCache_Month),
39
- @(cciQuarter) : @(kSMClearCache_Quarter),
40
- };
41
- _inAppRefreshTypeEnumMapping = @{
42
- @(iamrtNone) : @(kSMIA_RefreshType_None),
43
- @(iamrtMinute) : @(kSMIA_RefreshType_Minutely),
44
- @(iamrtHour) : @(kSMIA_RefreshType_Hourly),
45
- @(iamryDay ) : @(kSMIA_RefreshType_Daily),
46
- };
47
- _remoteMessageDisplayTypeEnumMapping = @{
48
- @(rmdtAutomatic) : @(kSMRemoteMessageDisplayType_Automatic),
49
- @(rmdtNone) : @(kSMRemoteMessageDisplayType_None),
50
- @(rmdtNotification) : @(kSMRemoteMessageDisplayType_Notification),
51
- };
52
- _backgroundFetchResult = @{
53
- @(bfrNewData) : @(UIBackgroundFetchResultNewData),
54
- @(bfrNoData) : @(UIBackgroundFetchResultNoData),
55
- @(bfrFailed) : @(UIBackgroundFetchResultFailed),
56
- };
57
- _notificationButtonTypeMapping = @{
58
- @(nbtUnknown) : @(kSMNotificationButtonType_Unknown),
59
- @(nbtSimple) : @(kSMNotificationButtonType_Simple),
60
- @(nbtOpenPhoneCall) : @(kSMNotificationButtonType_OpenPhoneCall),
61
- @(nbtOpenSms) : @(kSMNotificationButtonType_OpenSms),
62
- @(nbtOpenMail) : @(kSMNotificationButtonType_OpenMail),
63
- @(nbtOpenBrowser) : @(kSMNotificationButtonType_OpenBrowser),
64
- @(nbtOpenApplication) : @(kSMNotificationButtonType_OpenApplication),
65
- @(nbtRateApplication) : @(kSMNotificationButtonType_RateApplication),
66
- @(nbtCustomActionBroadcastEvent) : @(kSMNotificationButtonType_CustomActionBroadcastEvent),
67
- @(nbtReturn_Text) : @(kSMNotificationButtonType_Return_Text),
68
- @(nbtReturn_Photo) : @(kSMNotificationButtonType_Return_Photo),
69
- @(nbtReturn_TextAndPhoto) : @(kSMNotificationButtonType_Return_TextAndPhoto),
70
- @(nbtPassbook) : @(kSMNotificationButtonType_Passbook)
71
- };
72
- }
73
- return self;
74
- }
75
-
76
- - (SMLogLevel)smLogLevelForLogLevel:(LogLevel)logLevel {
77
- return (SMLogLevel) ((NSNumber *) _logLevelEnumMapping[@(logLevel)]).integerValue;
78
- }
79
-
80
- - (LogLevel)logLevelForSMLogLevel:(SMLogLevel)smLogLevel {
81
- return (LogLevel) ((NSNumber *)[_logLevelEnumMapping allKeysForObject:@(smLogLevel)].firstObject).integerValue;
82
- }
83
-
84
- - (SMClearCache)smClearCacheForClearCacheInterval:(ClearCacheInterval)clearCacheInterval {
85
- return (SMClearCache) ((NSNumber *)_clearCacheIntervalEnumMapping[@(clearCacheInterval)]).integerValue;
86
- }
87
-
88
- - (SMClearCache)clearCacheIntervalForSMClearCache:(SMClearCache)smClearCache {
89
- return (SMClearCache) ((NSNumber *)[_clearCacheIntervalEnumMapping allKeysForObject:@(smClearCache)].firstObject).integerValue;
90
- }
91
-
92
- - (SMInAppRefreshType)smInAppRefreshTypeForInAppMessageRefreshType:(InAppMessageRefreshType)inAppMessageRefreshType {
93
- return (SMInAppRefreshType) ((NSNumber *)_inAppRefreshTypeEnumMapping[@(inAppMessageRefreshType)]).integerValue;
94
- }
95
-
96
- - (InAppMessageRefreshType)inAppMessageRefreshTypeForSMInAppRefreshType:(SMInAppRefreshType)smInAppRefreshType {
97
- return (InAppMessageRefreshType) ((NSNumber *)[_inAppRefreshTypeEnumMapping allKeysForObject:@(smInAppRefreshType)].firstObject).integerValue;
98
- }
99
-
100
- -(SMRemoteMessageDisplayType)smRemoteMessageDisplayTypeForRemoteMessageDisplayType:(RemoteMessageDisplayType)remoteMessageDisplayType {
101
- return (SMRemoteMessageDisplayType) ((NSNumber *)_remoteMessageDisplayTypeEnumMapping[@(remoteMessageDisplayType)]).integerValue;
102
- }
103
-
104
- - (UIBackgroundFetchResult)uiBackgroundFetchResultForBackgroundFetchResult:(BackgroundFetchResult)backgroundFetchResult {
105
- return (UIBackgroundFetchResult) ((NSNumber *)_backgroundFetchResult[@(backgroundFetchResult)]).integerValue;
106
- }
107
-
108
- - (BackgroundFetchResult)backgroundFetchResultForUIBackgroundFetchResult:(UIBackgroundFetchResult)uiBackgroundFetchResult {
109
- return (BackgroundFetchResult) ((NSNumber *)[_backgroundFetchResult allKeysForObject:@(uiBackgroundFetchResult)].firstObject).integerValue;
110
- }
111
-
112
- - (SMNotificationButtonType)smNotificationButtonTypeForNotificationButtonType:(NotificationButtonType)notificationButtonType {
113
- return (SMNotificationButtonType) ((NSNumber *)_notificationButtonTypeMapping[@(notificationButtonType)]).integerValue;
114
- }
115
-
116
- - (NotificationButtonType)notificationButtonTypeForSMNotificationButtonType:(SMNotificationButtonType)smNotificationButtonType {
117
- return (NotificationButtonType) ((NSNumber *)[_notificationButtonTypeMapping allKeysForObject:@(smNotificationButtonType)].firstObject).integerValue;
118
- }
119
-
120
-
121
- @end
@@ -1,13 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import "Event.h"
3
- #import "SMFailure.h"
4
- #import "SMSuccess.h"
5
- #import "SMBlock.h"
6
-
7
- @class SMEvent;
8
-
9
- @interface Event (SMEvent)
10
-
11
- - (SMEvent *)smEventWithBlockSuccess:(SMCompletionBlockSuccess)blockSuccess BlockFailure:(SMCompletionBlockFailure)blockFailure;
12
-
13
- @end
@@ -1,41 +0,0 @@
1
- #import "Event+SMEvent.h"
2
- #import "SMEvent.h"
3
- #import "SMEventUserRegistration.h"
4
- #import "SMEventUserUnregistration.h"
5
- #import "SMEventUserLogin.h"
6
- #import "SMEventUserLogout.h"
7
-
8
- @implementation Event (SMEvent)
9
-
10
- - (SMEvent *)smEventWithBlockSuccess:(SMCompletionBlockSuccess)blockSuccess BlockFailure:(SMCompletionBlockFailure)blockFailure {
11
- SMEvent *event;
12
-
13
- switch (self.type) {
14
- case etRegister:
15
- event = [SMEventUserRegistration eventWithEmail:self.email Dictionary:self.data];
16
- break;
17
-
18
- case etUnregister:
19
- event = [SMEventUserUnregistration eventWithEmail:self.email Dictionary:self.data];
20
- break;
21
-
22
- case etUserLogin:
23
- event = [SMEventUserLogin eventWithEmail:self.email Dictionary:self.data];
24
- break;
25
-
26
- case etUserLogout:
27
- event = [SMEventUserLogout eventWithEmail:self.email Dictionary:self.data];
28
- break;
29
-
30
- default:
31
- event = [SMEvent eventWithDictionary:self.data];
32
- break;
33
- }
34
-
35
- [event applyBlockSuccess:blockSuccess BlockFailure:blockFailure];
36
-
37
- return event;
38
-
39
- }
40
-
41
- @end
package/ios/Event.h DELETED
@@ -1,12 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import "ParsableObject.h"
3
- #import "EventType.h"
4
-
5
- @interface Event : NSObject<ParsebleObject>
6
-
7
- @property (nonatomic, readonly) EventType type;
8
- @property (nonatomic, strong, readonly) NSString *email;
9
- @property (nonatomic, strong, readonly) NSDictionary *data;
10
- @property (nonatomic, readonly) BOOL shouldCache;
11
-
12
- @end
package/ios/Event.m DELETED
@@ -1,24 +0,0 @@
1
- #import "Event.h"
2
-
3
- @interface Event()
4
-
5
- @property (nonatomic) EventType type;
6
- @property (nonatomic, strong) NSString *email;
7
- @property (nonatomic, strong) NSDictionary *data;
8
- @property (nonatomic) BOOL shouldCache;
9
-
10
- @end
11
-
12
- @implementation Event
13
-
14
- + (instancetype)fromDictionary:(NSDictionary *)dictionary{
15
- Event *event = [[Event alloc] init];
16
- EventType type = (EventType) [dictionary[@"type"] integerValue];
17
- event.type = type;
18
- event.email = dictionary[@"email"];
19
- event.data = dictionary[@"data"];
20
- event.shouldCache = [dictionary[@"shouldCache"] boolValue];
21
- return event;
22
- }
23
-
24
- @end
package/ios/EventType.h DELETED
@@ -1,7 +0,0 @@
1
- typedef enum EventType : NSInteger {
2
- etRegister = 90,
3
- etUnregister = 91,
4
- etUserLogin = 92,
5
- etUserLogout = 93,
6
- etCustom = 94,
7
- } EventType;
@@ -1,6 +0,0 @@
1
- typedef enum InAppMessageRefreshType : NSInteger {
2
- iamrtNone = 10,
3
- iamrtMinute = 11,
4
- iamrtHour = 12,
5
- iamryDay = 13,
6
- } InAppMessageRefreshType;
@@ -1,9 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import "ParsableObject.h"
3
-
4
- @interface InAppMessageSettings : NSObject<ParsebleObject>
5
-
6
- @property (nonatomic, strong, readonly) NSNumber *refreshType;
7
- @property (nonatomic, strong, readonly) NSNumber *shouldPerformBackgroundFetch;
8
-
9
- @end
@@ -1,19 +0,0 @@
1
- #import "InAppMessageSettings.h"
2
-
3
- @interface InAppMessageSettings()
4
-
5
- @property (nonatomic, strong) NSNumber *refreshType;
6
- @property (nonatomic, strong) NSNumber *shouldPerformBackgroundFetch;
7
-
8
- @end
9
-
10
- @implementation InAppMessageSettings
11
-
12
- + (instancetype)fromDictionary:(NSDictionary *)dictionary {
13
- InAppMessageSettings *inAppMessageSettings = [[InAppMessageSettings alloc] init];
14
- inAppMessageSettings.shouldPerformBackgroundFetch = dictionary[@"shouldPerformBackgroundFetch"];
15
- inAppMessageSettings.refreshType = dictionary[@"inAppMessageRefreshType"];
16
- return inAppMessageSettings;
17
- }
18
-
19
- @end
@@ -1,6 +0,0 @@
1
- typedef enum LocationAuthorisationStatus : NSInteger {
2
- ilasUnknown = 70,
3
- ilasRefused = 71,
4
- ilasGrantedInUse = 72,
5
- ilasGrantedAlways = 73
6
- } LocationAuthorisationStatus;
@@ -1,4 +0,0 @@
1
- typedef enum LocationAuthorisationType : NSInteger {
2
- ilatInUse = 80,
3
- ilatAlways = 81
4
- } LocationAuthorisationType;
package/ios/LogLevel.h DELETED
@@ -1,9 +0,0 @@
1
- typedef enum LogLevel : NSInteger {
2
- llNone = 50,
3
- llInfo = 51,
4
- llWarning = 52,
5
- llError = 53,
6
- llHTTPCall = 54,
7
- llLocation = 55,
8
- llAll = 56,
9
- } LogLevel;
@@ -1,15 +0,0 @@
1
- typedef enum NotificationButtonType : NSInteger {
2
- nbtUnknown = 100,
3
- nbtSimple = 101,
4
- nbtOpenPhoneCall = 102,
5
- nbtOpenSms = 103,
6
- nbtOpenMail = 104,
7
- nbtOpenBrowser = 105,
8
- nbtOpenApplication = 106,
9
- nbtRateApplication = 107,
10
- nbtCustomActionBroadcastEvent = 108,
11
- nbtReturn_Text = 109,
12
- nbtReturn_Photo = 110,
13
- nbtReturn_TextAndPhoto = 111,
14
- nbtPassbook = 112
15
- } NotificationButtonType;
@@ -1,5 +0,0 @@
1
- @protocol ParsebleObject
2
-
3
- + (instancetype)fromDictionary:(NSDictionary *)arguments;
4
-
5
- @end
package/ios/RNSelligent.h DELETED
@@ -1,22 +0,0 @@
1
- #if __has_include(<React/RCTBridgeModule.h>)
2
- #import <React/RCTBridgeModule.h>
3
- #import <React/RCTEventEmitter.h>
4
- #else
5
- #import "RCTBridgeModule.h"
6
- #import <RCTEventEmitter.h>
7
- #endif
8
-
9
- #import <UserNotifications/UserNotifications.h>
10
-
11
- @interface RNSelligent : RCTEventEmitter <RCTBridgeModule>
12
-
13
- + (void)configureWithLaunchOptions:(NSDictionary *)launchOptions;
14
- + (void)performIAMFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
15
- + (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
16
- + (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings;
17
- + (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error;
18
- + (void)didReceiveRemoteNotification:(NSDictionary *)notification;
19
- + (void)willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler;
20
- + (void)didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler;
21
-
22
- @end