@selligent-marketing-cloud/selligent-react-native 2.6.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 (33) hide show
  1. package/README.md +47 -94
  2. package/RNSelligent.podspec +3 -4
  3. package/android/build.gradle +6 -6
  4. package/android/libs/sdk-release.aar +0 -0
  5. package/android/src/main/java/com/selligent/RNSelligent.java +0 -15
  6. package/android/src/main/java/com/selligent/SMSettingsFactory.java +0 -1
  7. package/android/src/main/java/com/selligent/Settings.java +0 -9
  8. package/constants.d.ts +0 -12
  9. package/constants.js +0 -24
  10. package/index.d.ts +0 -6
  11. package/index.js +0 -31
  12. package/ios/ClientSettings.h +0 -1
  13. package/ios/ClientSettings.m +0 -2
  14. package/ios/EnumMapper.h +0 -2
  15. package/ios/EnumMapper.m +0 -2
  16. package/ios/RNSelligent.m +0 -14
  17. package/ios/SMManagerSetting+ClientSettings.m +0 -5
  18. package/ios/SelligentReactNative.xcodeproj/project.pbxproj +4 -12
  19. package/ios/include/SMHelper.h +3 -6
  20. package/ios/include/SMInAppContentImageViewController.h +0 -1
  21. package/ios/include/SMInAppContentViewController.h +0 -1
  22. package/ios/include/SMInAppMessageType.h +1 -1
  23. package/ios/include/SMManager+InAppMessage.h +1 -1
  24. package/ios/include/SMManager+RemoteNotification.h +1 -1
  25. package/ios/include/SMManager+UserNotification.h +1 -1
  26. package/ios/include/SMNotificationButtonType.h +0 -12
  27. package/ios/{libSelligentMobile2.7.a → libSelligentMobile.a} +0 -0
  28. package/package.json +3 -3
  29. package/trigger.yml +9 -0
  30. package/ios/LocationAuthorisationStatus.h +0 -6
  31. package/ios/LocationAuthorisationType.h +0 -4
  32. package/ios/include/SMManager+Location.h +0 -41
  33. package/ios/include/SMManagerSetting+Location.h +0 -27
package/README.md CHANGED
@@ -7,7 +7,14 @@ This module provides an API for the usage of the Selligent SDK in React Native.
7
7
  - Android
8
8
  - iOS
9
9
 
10
- > _**Important:** Since version 2.4.0 of this module we require your app to use the Android Gradle Plugin version 4.1.0 or higher in order to build on Android. This is the default Android Gradle Plugin version since React Native version 0.64.0 but can be manually increased in older versions of React Native._
10
+ > _**Important:** Since version 2.6.0 of this module we require your app to use the Android Gradle Plugin version 4.2.0 or higher in order to build on Android. This is the default Android Gradle Plugin version since React Native version 0.64.0 but can be manually increased in older versions of React Native._
11
+
12
+ This module uses the native Selligent SDKs:
13
+
14
+ | SDK | Version |
15
+ | ----------------------------------------------------------------------- | ------- |
16
+ | [Android](https://github.com/SelligentMarketingCloud/MobileSDK-Android) | 3.8.0 |
17
+ | [iOS](https://github.com/SelligentMarketingCloud/MobileSDK-iOS) | 2.7.1 |
11
18
 
12
19
  ## ToC
13
20
 
@@ -50,7 +57,6 @@ This module provides an API for the usage of the Selligent SDK in React Native.
50
57
  | clientId | string | Yes | Both |
51
58
  | privateKey | string | Yes | Both |
52
59
  | clearCacheIntervalValue | enum [Selligent.ClearCacheIntervalValue](#selligentclearcacheintervalvalue) | No | Both |
53
- | configureLocationServices | boolean | No | Both |
54
60
  | inAppMessageRefreshType | enum [Selligent.InAppMessageRefreshType](#selligentinappmessagerefreshtype) | No | Both |
55
61
  | addInAppMessageFromPushToInAppMessageList | boolean | No | Both |
56
62
  | remoteMessageDisplayType | enum [Selligent.RemoteMessagesDisplayType](#selligentremotemessagesdisplaytype) | No | Both |
@@ -68,6 +74,45 @@ This module provides an API for the usage of the Selligent SDK in React Native.
68
74
 
69
75
  ### Android Specific Installation
70
76
 
77
+ > ### **Atention for Huawei developers!**
78
+ >
79
+ > In order to use this module on Huawei devices (without Goggle Play services), you should add the following dependencies in the `build.gradle` files of the Android project in your React Native project:
80
+ >
81
+ > In your Android project's root `build.gradle` file:
82
+ >
83
+ > ```gradle
84
+ >
85
+ > buildscript {
86
+ > repositories {
87
+ > maven { url 'https://developer.huawei.com/repo/' }
88
+ > }
89
+ > dependencies {
90
+ > classpath: 'com.huawei.agconnect.agcp:1.6.0.300'
91
+ > }
92
+ > }
93
+ >
94
+ > allProjects: {
95
+ > repositories: {
96
+ > maven: { url 'https://developer.huawei.com/repo/' }
97
+ > }
98
+ > }
99
+ >
100
+ > ```
101
+ >
102
+ > In your app module's `build.gradle` file:
103
+ >
104
+ > ```gradle
105
+ >
106
+ > apply plugin 'com.huawei.agconnect'
107
+ >
108
+ > dependencies {
109
+ > api 'com.huawei.hms:base:6.2.0.300'
110
+ > api 'com.huawei.hms:push:6.1.0.300'
111
+ > api 'com.huawei.hms:maps:6.2.0.301'
112
+ > }
113
+ >
114
+ > ```
115
+
71
116
  <details>
72
117
  <summary>Without autolinking (RN 0.59 and below)</summary>
73
118
 
@@ -99,11 +144,6 @@ This module provides an API for the usage of the Selligent SDK in React Native.
99
144
  flatDir {
100
145
  dirs "$rootDir/../node_modules/@selligent-marketing-cloud/selligent-react-native/android/libs"
101
146
  }
102
-
103
- // Add the following:
104
- maven {
105
- url 'https://maven-repo.plotprojects.com'
106
- }
107
147
  }
108
148
  }
109
149
  ```
@@ -187,11 +227,6 @@ This module provides an API for the usage of the Selligent SDK in React Native.
187
227
  flatDir {
188
228
  dirs "$rootDir/../node_modules/@selligent-marketing-cloud/selligent-react-native/android/libs"
189
229
  }
190
-
191
- // Add the following:
192
- maven {
193
- url 'https://maven-repo.plotprojects.com'
194
- }
195
230
  }
196
231
  }
197
232
  ```
@@ -370,10 +405,6 @@ Add the following properties to the `selligent.json` file:
370
405
  Make sure you add your `appGroupId` to the `selligent.json`.
371
406
  > **IMPORTANT!** make sure your `appGroupId` has the following structure or it will not work: `group.{MAIN_APP_BUNDLE_ID}`
372
407
 
373
- #### Geolocation
374
-
375
- For geolocation services, follow section [**Geolocation**](https://github.com/SelligentMarketingCloud/MobileSDK-iOS/tree/master/Documentation#geolocation), of the native documentation. You also need to configure several permissions described [**here**](https://github.com/SelligentMarketingCloud/MobileSDK-iOS/tree/master/Documentation#permission-for-geolocation).
376
-
377
408
  #### Deeplinking
378
409
 
379
410
  You can catch the deeplinks 2 ways:
@@ -502,10 +533,6 @@ You can catch the deeplinks 2 ways:
502
533
 
503
534
  - [Selligent.getVersionLib(successCallback)](#selligentgetversionlibsuccesscallback)
504
535
  - [getVersionLib example](#getversionlib-example)
505
- - [Selligent.enableGeolocation(successCallback, errorCallback, enabled)](#selligentenablegeolocationsuccesscallback-errorcallback-enabled)
506
- - [enableGeolocation example](#enablegeolocation-example)
507
- - [Selligent.isGeolocationEnabled(successCallback)](#selligentisgeolocationenabledsuccesscallback)
508
- - [isGeolocationEnabled example](#isgeolocationenabled-example)
509
536
  - [Selligent.getDeviceId(successCallback)](#selligentgetdeviceidsuccesscallback)
510
537
  - [getDeviceId example](#getdeviceid-example)
511
538
  - [Selligent.enableNotifications(successCallback, errorCallback, enabled)](#selligentenablenotificationssuccesscallback-errorcallback-enabled)
@@ -572,8 +599,6 @@ You can catch the deeplinks 2 ways:
572
599
  - [SelligentConstants.RemoteMessagesDisplayType](#selligentconstantsremotemessagesdisplaytype)
573
600
  - [SelligentConstants.iOSLogLevel](#selligentconstantsiosloglevel)
574
601
  - [SelligentConstants.iOSBackgroundFetchResult](#selligentconstantsiosbackgroundfetchresult)
575
- - [SelligentConstants.iOSLocationAuthorisationStatus](#selligentconstantsioslocationauthorisationstatus)
576
- - [SelligentConstants.iOSLocationAuthorisationType](#selligentconstantsioslocationauthorisationtype)
577
602
  - [SelligentConstants.EventType](#selligentconstantseventtype)
578
603
  - [SelligentConstants.iOSNotificationButtonType](#selligentconstantsiosnotificationbuttontype)
579
604
  - [SelligentConstants.BroadcastEventType](#selligentconstantsbroadcasteventtype)
@@ -599,50 +624,6 @@ Selligent.getVersionLib((versionLib) => {
599
624
  <b><a href="#api-reference">back to API ToC</a></b>
600
625
  </div>
601
626
 
602
- #### Selligent.enableGeolocation(successCallback, errorCallback, enabled)
603
-
604
- Enable or disable geolocation services.
605
-
606
- The `enabled` parameter is a required boolean to enable or disable geolocation services.
607
-
608
- ##### enableGeolocation example
609
-
610
- ```javascript
611
- Selligent.enableGeolocation(
612
- (response) => { // success callback
613
- ...
614
- },
615
- (error) => { // error callback
616
- ...
617
- },
618
- true
619
- );
620
- ```
621
-
622
- <div align="right">
623
- <b><a href="#api-reference">back to API ToC</a></b>
624
- </div>
625
-
626
- #### Selligent.isGeolocationEnabled(successCallback)
627
-
628
- Check if geolocation services are enabled or disabled.
629
-
630
- The response of the success callback is a boolean stating geolocation services are enabled or disabled.
631
-
632
- ##### isGeolocationEnabled example
633
-
634
- ```javascript
635
- Selligent.isGeolocationEnabled(
636
- (response) => { // success callback
637
- ...
638
- }
639
- );
640
- ```
641
-
642
- <div align="right">
643
- <b><a href="#api-reference">back to API ToC</a></b>
644
- </div>
645
-
646
627
  #### Selligent.getDeviceId(successCallback)
647
628
 
648
629
  Returns the device id.
@@ -1510,34 +1491,6 @@ Description of the possible results of a background fetch on iOS.
1510
1491
  <b><a href="#api-reference">back to API ToC</a></b>
1511
1492
  </div>
1512
1493
 
1513
- #### SelligentConstants.iOSLocationAuthorisationStatus
1514
-
1515
- Description of the possible status of use of location services on a device.
1516
-
1517
- | Name | Type | Value | Description |
1518
- | -------------- | ------ | ----- | ----------------------------------------------- |
1519
- | UNKNOWN | number | 70 | Status of use of location services is unknown |
1520
- | REFUSED | number | 71 | Use of location services is refused |
1521
- | GRANTED_IN_USE | number | 72 | Use of location services is granted when in use |
1522
- | GRANTED_ALWAYS | number | 72 | Use of location services is always granted |
1523
-
1524
- <div align="right">
1525
- <b><a href="#api-reference">back to API ToC</a></b>
1526
- </div>
1527
-
1528
- #### SelligentConstants.iOSLocationAuthorisationType
1529
-
1530
- Defines the level of request for the authorisation of usage of location services on a device.
1531
-
1532
- | Name | Type | Value | Description |
1533
- | ------ | ------ | ----- | --------------------------------------------------------- |
1534
- | IN_USE | number | 80 | Request authorisation when location services are in use |
1535
- | ALWAYS | number | 81 | Always request the authorisation of the location services |
1536
-
1537
- <div align="right">
1538
- <b><a href="#api-reference">back to API ToC</a></b>
1539
- </div>
1540
-
1541
1494
  #### SelligentConstants.EventType
1542
1495
 
1543
1496
  Defines the type of an event.
@@ -12,17 +12,16 @@ Pod::Spec.new do |s|
12
12
  DESC
13
13
  s.homepage = "https://github.com/SelligentMarketingCloud/MobileSDK-ReactNative"
14
14
  s.license = "MIT"
15
- s.platform = :ios, "7.0"
15
+ s.platform = :ios, "11.0"
16
16
  s.source = { :git => "https://github.com/SelligentMarketingCloud/MobileSDK-ReactNative.git", :tag => "#{s.version}" }
17
17
 
18
18
  s.source_files = "ios/**/*.{h,m}"
19
19
  s.requires_arc = true
20
20
 
21
- s.vendored_libraries = "ios/libSelligentMobile2.7.a"
22
- s.libraries = "SelligentMobile2.7"
21
+ s.vendored_libraries = "ios/libSelligentMobile.a"
22
+ s.libraries = "SelligentMobile"
23
23
 
24
24
  s.dependency "React"
25
- s.dependency 'PlotPlugin'
26
25
  end
27
26
 
28
27
 
@@ -1,7 +1,7 @@
1
1
  buildscript {
2
2
  repositories {
3
- jcenter()
4
3
  google()
4
+ mavenCentral()
5
5
  }
6
6
 
7
7
  dependencies {
@@ -13,12 +13,13 @@ apply plugin: 'com.android.library'
13
13
  apply plugin: 'maven'
14
14
 
15
15
  android {
16
- compileSdkVersion 27
17
- buildToolsVersion "29.0.2"
16
+ compileSdkVersion 30
17
+ buildToolsVersion "30.0.2"
18
18
 
19
19
  defaultConfig {
20
- minSdkVersion 16
21
- targetSdkVersion 27
20
+ minSdkVersion 21
21
+ targetSdkVersion 30
22
+ ndkVersion = "21.4.7075529"
22
23
  versionCode 1
23
24
  versionName "1.0"
24
25
  }
@@ -53,7 +54,6 @@ dependencies {
53
54
 
54
55
  implementation 'com.facebook.react:react-native:+'
55
56
  implementation 'com.android.support:cardview-v7:27.1.1'
56
- implementation 'com.plotprojects:plot-android:3.13.1'
57
57
  implementation 'com.google.code.gson:gson:2.8.5'
58
58
  implementation 'com.google.firebase:firebase-messaging:21.0.0'
59
59
  implementation 'androidx.work:work-runtime:2.4.0'
Binary file
@@ -249,21 +249,6 @@ public class RNSelligent extends ReactContextBaseJavaModule implements Lifecycle
249
249
  SMManager.DEBUG = enable;
250
250
  }
251
251
 
252
- @ReactMethod
253
- public void enableGeolocation(Boolean enable) {
254
- if (enable) {
255
- smManager.enableGeolocation();
256
- } else {
257
- smManager.disableGeolocation();
258
- }
259
- }
260
-
261
- @ReactMethod
262
- public void isGeolocationEnabled(Callback successCallback) {
263
- final Boolean isGeolocationEnabled = smManager.isGeolocationEnabled();
264
- successCallback.invoke(isGeolocationEnabled);
265
- }
266
-
267
252
  @ReactMethod
268
253
  public void sendEvent(ReadableMap eventMap, final Callback successCallback, final Callback errorCallback) {
269
254
  final Event event = Event.fromHashMap(eventMap.toHashMap());
@@ -10,7 +10,6 @@ class SMSettingsFactory {
10
10
  smSettings.ClientId = settings.getClientId();
11
11
  smSettings.PrivateKey = settings.getPrivateKey();
12
12
  smSettings.GoogleApplicationId = settings.getGoogleApplicationId();
13
- smSettings.ConfigureGeolocation = settings.getConfigureLocationServices();
14
13
  smSettings.AddInAppMessageFromPushToInAppMessageList = settings.getAddInAppMessageFromPushToInAppMessageList();
15
14
  smSettings.DoNotFetchTheToken = settings.getDoNotFetchTheToken();
16
15
  smSettings.DoNotListenToThePush = settings.getDoNotListenToThePush();
@@ -17,7 +17,6 @@ class Settings {
17
17
  private Boolean doNotFetchTheToken = false;
18
18
  private Boolean doNotListenToThePush = false;
19
19
  private Boolean loadCacheAsynchronously = false;
20
- private Boolean configureLocationServices = false;
21
20
  private ClearCacheIntervalValue clearCacheIntervalValue;
22
21
  private InAppMessageRefreshType inAppMessageRefreshType;
23
22
  private RemoteMessageDisplayType remoteMessageDisplayType;
@@ -56,10 +55,6 @@ class Settings {
56
55
  return notificationIconColor;
57
56
  }
58
57
 
59
- public Boolean getConfigureLocationServices() {
60
- return configureLocationServices;
61
- }
62
-
63
58
  public Boolean getDoNotListenToThePush() { return doNotListenToThePush; }
64
59
 
65
60
  public Boolean getAddInAppMessageFromPushToInAppMessageList() { return addInAppMessageFromPushToInAppMessageList; }
@@ -89,10 +84,6 @@ class Settings {
89
84
  if (settingsHashMap.containsKey("googleApplicationId")) {
90
85
  settings.googleApplicationId = (String) settingsHashMap.get("googleApplicationId");
91
86
  }
92
- if (settingsHashMap.containsKey("configureLocationServices")) {
93
- settings.configureLocationServices = (Boolean) settingsHashMap.get("configureLocationServices");
94
-
95
- }
96
87
  settings.activityName = (String) settingsHashMap.get("fullyQualifiedNotificationActivityClassName");
97
88
 
98
89
  if (settingsHashMap.containsKey("notificationSmallIcon")) {
package/constants.d.ts CHANGED
@@ -53,18 +53,6 @@ export namespace iOSBackgroundFetchResult {
53
53
  const FAILED = 62;
54
54
  }
55
55
 
56
- export namespace iOSLocationAuthorisationStatus {
57
- const UNKNOWN = 70;
58
- const REFUSED = 71;
59
- const GRANTED_IN_USE = 72;
60
- const GRANTED_ALWAYS = 73;
61
- }
62
-
63
- export namespace iOSLocationAuthorisationType {
64
- const IN_USE = 80;
65
- const ALWAYS = 81;
66
- }
67
-
68
56
  export namespace EventType {
69
57
  const USER_REGISTER = 90;
70
58
  const USER_UNREGISTER = 91;
package/constants.js CHANGED
@@ -102,30 +102,6 @@ var SelligentConstants = {
102
102
  /** Background fetch failed */
103
103
  FAILED: 62
104
104
  },
105
- /**
106
- * @description
107
- * Description of the possible status of use of location services on a device.
108
- */
109
- iOSLocationAuthorisationStatus: {
110
- /** Status of use of location services is unknown */
111
- UNKNOWN: 70,
112
- /** Use of location services is refused */
113
- REFUSED: 71,
114
- /** Use of location services is granted when in use */
115
- GRANTED_IN_USE: 72,
116
- /** Use of location services is always granted */
117
- GRANTED_ALWAYS: 73
118
- },
119
- /**
120
- * @description
121
- * Defines the level of request for the authorisation of usage of location services on a device.
122
- */
123
- iOSLocationAuthorisationType: {
124
- /** Request authorisation when in location services are in use */
125
- IN_USE: 80,
126
- /** Always request the authorisation of the location services */
127
- ALWAYS: 81
128
- },
129
105
  /**
130
106
  * @description
131
107
  * Defines the type of an event.
package/index.d.ts CHANGED
@@ -11,12 +11,6 @@ export function executeButtonAction(
11
11
  buttonId: string,
12
12
  messageId: string
13
13
  ): void;
14
- export function enableGeolocation(
15
- successCallback: Function,
16
- errorCallback: Function,
17
- enabled: boolean
18
- ): void;
19
- export function isGeolocationEnabled(successCallback: Function): void;
20
14
  export function sendEvent(
21
15
  successCallback: Function,
22
16
  errorCallback: Function,
package/index.js CHANGED
@@ -98,37 +98,6 @@ export default Object.assign(
98
98
  return
99
99
  },
100
100
 
101
- // Location
102
-
103
- /**
104
- * Enable/disable geolocation.
105
- *
106
- * @param {function} successCallback Callback function on success.
107
- * @param {function} errorCallback Callback function on error.
108
- * @param {boolean} enabled Boolean to enable or disable geolocation.
109
- */
110
- enableGeolocation: function (successCallback, errorCallback, enabled) {
111
- // check if required options are valid
112
- if (!SelligentHelpers.typeMatches(enabled, 'boolean')) {
113
- errorCallback(SelligentHelpers.wrongArgumentError('Expected a boolean.'))
114
- return
115
- }
116
-
117
- // continue if options are valid
118
- successCallback(SelligentHelpers.SUCCESS)
119
- RNSelligent.enableGeolocation(enabled)
120
- return
121
- },
122
-
123
- /**
124
- * Check if geolocation is enabled or disabled.
125
- *
126
- * @param {function} successCallback Callback function on success.
127
- */
128
- isGeolocationEnabled: function (successCallback) {
129
- RNSelligent.isGeolocationEnabled(successCallback)
130
- return
131
- },
132
101
  // Event
133
102
 
134
103
  /**
@@ -11,7 +11,6 @@
11
11
  @property (nonatomic, strong, readonly) NSNumber *shouldAddInAppMessageFromPushToInAppMessageList;
12
12
  @property (nonatomic, strong, readonly) NSNumber *shouldClearBadge;
13
13
  @property (nonatomic, strong, readonly) NSNumber *shouldDisplayRemoteNotification;
14
- @property (nonatomic, strong, readonly) NSNumber *configureLocationServices;
15
14
  @property (nonatomic, strong, readonly) NSNumber *clearCacheIntervalValue;
16
15
  @property (nonatomic, strong, readonly) NSNumber *remoteMessageDisplayType;
17
16
  @property (nonatomic, strong, readonly) InAppMessageSettings *inAppMessageSettings;
@@ -11,7 +11,6 @@
11
11
  @property (nonatomic, strong) NSNumber *shouldAddInAppMessageFromPushToInAppMessageList;
12
12
  @property (nonatomic, strong) NSNumber *shouldClearBadge;
13
13
  @property (nonatomic, strong) NSNumber *shouldDisplayRemoteNotification;
14
- @property (nonatomic, strong) NSNumber *configureLocationServices;
15
14
  @property (nonatomic, strong) NSNumber *clearCacheIntervalValue;
16
15
  @property (nonatomic, strong) NSNumber *remoteMessageDisplayType;
17
16
  @property (nonatomic, strong) InAppMessageSettings *inAppMessageSettings;
@@ -29,7 +28,6 @@
29
28
  clientSettings.shouldAddInAppMessageFromPushToInAppMessageList = dictionary[@"addInAppMessageFromPushToInAppMessageList"];
30
29
  clientSettings.shouldClearBadge = dictionary[@"shouldClearBadge"];
31
30
  clientSettings.shouldDisplayRemoteNotification = dictionary[@"shouldDisplayRemoteNotification"];
32
- clientSettings.configureLocationServices = dictionary[@"configureLocationServices"];
33
31
  clientSettings.clearCacheIntervalValue = dictionary[@"clearCacheIntervalValue"];
34
32
  clientSettings.remoteMessageDisplayType = dictionary[@"remoteMessageDisplayType"];
35
33
  clientSettings.inAppMessageSettings = [InAppMessageSettings fromDictionary:dictionary];
package/ios/EnumMapper.h CHANGED
@@ -2,8 +2,6 @@
2
2
  #import "LogLevel.h"
3
3
  #import "InAppMessageRefreshType.h"
4
4
  #import "RemoteMessageDisplayType.h"
5
- #import "LocationAuthorisationStatus.h"
6
- #import "LocationAuthorisationType.h"
7
5
  #import "ClearCacheInterval.h"
8
6
  #import "SMLog.h"
9
7
  #import "SMClearCache.h"
package/ios/EnumMapper.m CHANGED
@@ -5,8 +5,6 @@
5
5
  NSDictionary *_clearCacheIntervalEnumMapping;
6
6
  NSDictionary *_inAppRefreshTypeEnumMapping;
7
7
  NSDictionary *_remoteMessageDisplayTypeEnumMapping;
8
- NSDictionary *_locationAuthorisationStatusMapping;
9
- NSDictionary *_locationAuthorisationTypeMapping;
10
8
  NSDictionary *_backgroundFetchResult;
11
9
  NSDictionary *_notificationButtonTypeMapping;
12
10
  }
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"
@@ -189,11 +188,6 @@ RCT_EXPORT_METHOD(applyLogLevel:(NSArray<NSNumber *> *)logLevels) {
189
188
  [[SMManager sharedInstance] applyLogLevel:(SMLogLevel) requestedBitShiftedLogLevel];
190
189
  }
191
190
 
192
- RCT_EXPORT_METHOD(isGeolocationEnabled:(RCTResponseSenderBlock)callback) {
193
- BOOL enabled = [[SMManager sharedInstance] isGeoLocationEnabled];
194
- callback(@[@(enabled), [NSNull null]]);
195
- }
196
-
197
191
  RCT_EXPORT_METHOD(sendEvent:(NSDictionary *)data successCallback:(RCTResponseSenderBlock)successCallback errorCallback:(RCTResponseSenderBlock)errorCallback) {
198
192
  Event *event = [Event fromDictionary:data];
199
193
  SMEvent *smEvent = [event smEventWithBlockSuccess:^(SMSuccess *success) {
@@ -204,14 +198,6 @@ RCT_EXPORT_METHOD(sendEvent:(NSDictionary *)data successCallback:(RCTResponseSen
204
198
  [[SMManager sharedInstance] sendSMEvent:smEvent];
205
199
  }
206
200
 
207
- RCT_EXPORT_METHOD(enableGeolocation:(BOOL)enable) {
208
- if (enable) {
209
- [[SMManager sharedInstance] enableGeoLocation];
210
- } else {
211
- [[SMManager sharedInstance] disableGeoLocation];
212
- }
213
- }
214
-
215
201
  RCT_EXPORT_METHOD(forceRemoteNotificationBackgroundFetchResult:(nonnull NSNumber *)remoteNotificationBackgroundFetchResult) {
216
202
  self.requestedForcedRemoteNotificationBackgroundFetchResult = @([[EnumMapper sharedEnumMapper] uiBackgroundFetchResultForBackgroundFetchResult:remoteNotificationBackgroundFetchResult.integerValue]);
217
203
  }
@@ -1,5 +1,4 @@
1
1
  #import "SMManagerSetting+ClientSettings.h"
2
- #import "SMManagerSetting+Location.h"
3
2
  #import "SMManagerSettingIAM.h"
4
3
  #import "ClientSettings.h"
5
4
  #import "EnumMapper.h"
@@ -36,10 +35,6 @@
36
35
  settings.shouldClearBadge = shouldClearBadgeAsNumber.boolValue;
37
36
  }
38
37
 
39
- if(clientSettings.configureLocationServices.boolValue) {
40
- [settings configureLocationService];
41
- }
42
-
43
38
  NSNumber *shouldDisplayRemoteNotificationAsNumber = clientSettings.shouldDisplayRemoteNotification;
44
39
  if(shouldDisplayRemoteNotificationAsNumber) {
45
40
  settings.shouldDisplayRemoteNotification = shouldDisplayRemoteNotificationAsNumber.boolValue;
@@ -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;
@@ -1,14 +1,11 @@
1
1
  //
2
- // SMHelper+Location.h
2
+ // SMHelper.h
3
3
  // MobileSDK
4
4
  //
5
- // Created by Marc Biosca on 6/29/21.
6
- // Copyright © 2021 Selligent. All rights reserved.
5
+ // Created by Samy Ziat on 29/09/15.
6
+ // Copyright (c) 2015 Selligent. All rights reserved.
7
7
  //
8
8
 
9
- #import "SMManager+Location.h"
10
- #import "SMManagerSetting+Location.h"
11
-
12
9
  #import "SMManagerHelper.h"
13
10
 
14
11
  #import "SMNSNotification.h"
@@ -33,5 +33,4 @@
33
33
  */
34
34
  + (instancetype _Nonnull) viewControllerForCategory:(NSString*_Nullable)category AndOptions:(SMInAppContentStyleOptions*_Nullable)options;
35
35
 
36
-
37
36
  @end
@@ -28,5 +28,4 @@
28
28
  */
29
29
  @property (nonatomic) bool isEmpty;
30
30
 
31
-
32
31
  @end
@@ -1,6 +1,6 @@
1
1
  //
2
2
  // SMInAppMessageType.h
3
- // SelligentMobileLib
3
+ // MobileSDK
4
4
  //
5
5
  // Created by Gilbert Schakal on 24/9/2020.
6
6
  // Copyright © 2020 Selligent. All rights reserved.
@@ -48,7 +48,7 @@
48
48
  * Since sdk v 2.5 you have the possibility to store the In App Message on your side and process them the way you want
49
49
  * In order to do that, once you are notified that In App Messages are available you can call getInAppMessages to receive a NSArray of SMInAppMessage
50
50
  * Once a SMInAppMessage has been displayed and has been seen by the user you need to call setInAppMessageAsSeen: to inform Selligent that the In App message has been opened
51
- * In case there is links in the In App Message and in case one of the link is triggered by user please call executeLinkAction:: to process teh action related to the link and inform Selligent that the link has been clicked
51
+ * In case there is links in the In App Message and in case one of the link is triggered by user please call executeLinkAction:: to process the action related to the link and inform Selligent that the link has been clicked
52
52
  *
53
53
  * ##Fetching modes
54
54
  * IAM may be retrieved from two different modes corresponding to the application's state:
@@ -153,7 +153,7 @@
153
153
  * At this stage, only the very last remote-notification can be recovered, previous ones are automaticly overriden.
154
154
  * To learn more about this API, please read documentation in [SMManagerSetting](SMManagerSetting), more particularly [SMManagerSetting shouldDisplayRemoteNotification]
155
155
  */
156
- - (NSDictionary*_Nullable)retrieveLastRemotePushNotification;
156
+ - (NSDictionary*_Nullable) retrieveLastRemotePushNotification;
157
157
 
158
158
  /**
159
159
  * Tells to the SDK that a certain SMNotificationMessage object has been seen.
@@ -142,7 +142,7 @@
142
142
  *
143
143
  * @param request An UNNotificationRequest that contains the original notification request.
144
144
  * @param contentHandler The block to execute with the modified content
145
- * @discussion you can use this method if you want the sdk to manage the display of the notification after teh decryption has been processed
145
+ * @discussion you can use this method if you want the sdk to manage the display of the notification after the decryption has been processed
146
146
  */
147
147
  - (void) didReceiveNotificationRequest:(UNNotificationRequest*_Nonnull)request withContentHandler:(void (^_Nullable)(UNNotificationContent*_Nonnull))contentHandler;
148
148
 
@@ -88,15 +88,3 @@ typedef NS_ENUM(NSInteger, SMNotificationButtonType) {
88
88
  */
89
89
  kSMNotificationButtonType_DeepLink = 13
90
90
  };
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
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.6.0",
4
+ "version": "2.7.0",
5
5
  "description": "React Native bridge for Selligent SDK",
6
6
  "main": "index.js",
7
7
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "react-native": "*"
27
27
  },
28
28
  "devDependencies": {
29
- "react": "17.0.1",
30
- "react-native": "^0.64.2"
29
+ "react": "17.0.2",
30
+ "react-native": "^0.66.3"
31
31
  }
32
32
  }
package/trigger.yml ADDED
@@ -0,0 +1,9 @@
1
+ trigger:
2
+ branches:
3
+ include:
4
+ - master
5
+
6
+ pr: none
7
+
8
+ steps:
9
+ - checkout: none
@@ -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;
@@ -1,41 +0,0 @@
1
- //
2
- // SMManager+Location.h
3
- // MobileSDK
4
- //
5
- // Created by Samy Ziat on 02/12/15.
6
- // Copyright © 2015 Selligent. All rights reserved.
7
- //
8
-
9
- #import "SMManager.h"
10
-
11
- /*!
12
- * In order to use the location services features provided by the sdk you will mandatory need to use the lsdk library supporting the plotproject framework .
13
- * Otherwise calling the method in this SMManager category will have no effect and no ios api related to geofencing will be called (as this is all done by the plot project framework)
14
- */
15
- @interface SMManager (Location)
16
-
17
- /**
18
- * Enable geolocation services
19
- *
20
- * @discussion This optional call will enable geolocation services at sdk level. it is independent of iOS location authorisation
21
- * If you use plotproject for geolocation it will be mandatory to call it if you have set enableOnFirstRun to false in the plotconfig.json
22
- * Call this API according to your application's need.
23
- */
24
- - (void) enableGeoLocation;
25
-
26
- /**
27
- * Disable geolocation services
28
- *
29
- * @discussion This optional call will disable geolocation services at sdk level. it is independent of iOS location authorisation
30
- * Call this API according to your application's need.
31
- */
32
- - (void) disableGeoLocation;
33
-
34
- /**
35
- * Check the geolocation services status
36
- *
37
- * @discussion This optional call will inform you if geolocation services at sdk level are enabled. it is independent of iOS location authorisation
38
- */
39
- - (BOOL) isGeoLocationEnabled;
40
-
41
- @end
@@ -1,27 +0,0 @@
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