react-native-insider 6.4.0-nh → 6.4.1-nh
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -38,11 +38,11 @@ dependencies {
|
|
|
38
38
|
implementation ('com.useinsider:insider:14.2.2-nh')
|
|
39
39
|
implementation ('com.useinsider:insiderhybrid:1.1.5')
|
|
40
40
|
|
|
41
|
-
implementation
|
|
41
|
+
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
|
42
42
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
43
43
|
implementation 'androidx.lifecycle:lifecycle-process:2.4.1'
|
|
44
44
|
|
|
45
45
|
implementation 'com.google.android.gms:play-services-location:21.0.1'
|
|
46
|
-
implementation 'com.google.android.play:
|
|
46
|
+
implementation 'com.google.android.play:review:2.0.1'
|
|
47
47
|
implementation 'com.google.firebase:firebase-messaging:23.0.5'
|
|
48
48
|
}
|
|
@@ -207,6 +207,15 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
@ReactMethod
|
|
211
|
+
public void setEmail(String email) {
|
|
212
|
+
try {
|
|
213
|
+
Insider.Instance.getCurrentUser().setEmail(email);
|
|
214
|
+
} catch (Exception e) {
|
|
215
|
+
Insider.Instance.putException(e);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
210
219
|
@ReactMethod
|
|
211
220
|
public void setSMSOptin(boolean smsOptin) {
|
|
212
221
|
try {
|
|
@@ -216,6 +225,15 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
216
225
|
}
|
|
217
226
|
}
|
|
218
227
|
|
|
228
|
+
@ReactMethod
|
|
229
|
+
public void setPhoneNumber(String phoneNumber) {
|
|
230
|
+
try {
|
|
231
|
+
Insider.Instance.getCurrentUser().setPhoneNumber(phoneNumber);
|
|
232
|
+
} catch (Exception e) {
|
|
233
|
+
Insider.Instance.putException(e);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
219
237
|
@ReactMethod
|
|
220
238
|
public void setPushOptin(boolean pushOptin) {
|
|
221
239
|
try {
|
|
@@ -144,6 +144,14 @@ RCT_EXPORT_METHOD(setEmailOptin:(BOOL)value) {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
RCT_EXPORT_METHOD(setEmail:(NSString *)value) {
|
|
148
|
+
@try {
|
|
149
|
+
[Insider getCurrentUser].setEmail(value);
|
|
150
|
+
} @catch (NSException *e) {
|
|
151
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
147
155
|
RCT_EXPORT_METHOD(setSMSOptin:(BOOL)value) {
|
|
148
156
|
@try {
|
|
149
157
|
[Insider getCurrentUser].setSMSOptin(value);
|
|
@@ -152,6 +160,14 @@ RCT_EXPORT_METHOD(setSMSOptin:(BOOL)value) {
|
|
|
152
160
|
}
|
|
153
161
|
}
|
|
154
162
|
|
|
163
|
+
RCT_EXPORT_METHOD(setPhoneNumber:(NSString *)value) {
|
|
164
|
+
@try {
|
|
165
|
+
[Insider getCurrentUser].setPhoneNumber(value);
|
|
166
|
+
} @catch (NSException *e) {
|
|
167
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
155
171
|
RCT_EXPORT_METHOD(setPushOptin:(BOOL)value) {
|
|
156
172
|
@try {
|
|
157
173
|
[Insider getCurrentUser].setPushOptin(value);
|
package/package.json
CHANGED
package/src/InsiderUser.js
CHANGED
|
@@ -62,25 +62,25 @@ export default class RNInsiderUser {
|
|
|
62
62
|
return this;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
setEmail(value: string) {
|
|
66
|
+
if (shouldNotProceed() || value == null) return this;
|
|
67
|
+
try {
|
|
68
|
+
Insider.setEmail(value);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
71
|
+
}
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
setPhoneNumber(value: string) {
|
|
76
|
+
if (shouldNotProceed() || value == null) return this;
|
|
77
|
+
try {
|
|
78
|
+
Insider.setPhoneNumber(value);
|
|
79
|
+
} catch (error) {
|
|
80
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
81
|
+
}
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
84
|
|
|
85
85
|
setLanguage(value: string) {
|
|
86
86
|
if (shouldNotProceed() || value == null) return this;
|