react-native-insider 7.0.4-nh → 7.0.5
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/.git-hooks/README.md +22 -1
- package/.git-hooks/pre-push +25 -0
- package/README.md +672 -72
- package/RNInsider.podspec +4 -4
- package/android/build.gradle +8 -2
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +41 -0
- package/ios/RNInsider/RNInsider.m +41 -0
- package/package.json +1 -1
- package/src/InsiderProduct.d.ts +1 -0
- package/src/InsiderProduct.js +15 -0
- package/src/InsiderUser.d.ts +1 -0
- package/src/InsiderUser.js +14 -0
- package/android/.gradle/8.13/checksums/checksums.lock +0 -0
- package/android/.gradle/8.13/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.13/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.13/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.13/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.13/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.13/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.13/gc.properties +0 -0
- package/android/.gradle/9.0-milestone-1/checksums/checksums.lock +0 -0
- package/android/.gradle/9.0-milestone-1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/9.0-milestone-1/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/9.0-milestone-1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/9.0-milestone-1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.0-milestone-1/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.0-milestone-1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.0-milestone-1/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/9.0-milestone-1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/config.properties +0 -2
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/reports/problems/problems-report.html +0 -663
- package/android/local.properties +0 -8
- package/ios/RNInsider.xcodeproj/project.xcworkspace/xcuserdata/ozgur.vatansever.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNInsider.xcodeproj/xcuserdata/ozgur.vatansever.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
package/RNInsider.podspec
CHANGED
|
@@ -9,12 +9,12 @@ Pod::Spec.new do |s|
|
|
|
9
9
|
s.authors = package_json['author']
|
|
10
10
|
s.license = 'MIT'
|
|
11
11
|
s.platform = :ios, '12.0'
|
|
12
|
-
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/14.
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/14.2.2/InsiderMobileIOSFramework.zip'}
|
|
13
13
|
s.source_files = 'ios/RNInsider/*.{h,m}'
|
|
14
14
|
s.requires_arc = true
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
s.dependency 'React'
|
|
17
|
-
s.dependency 'InsiderMobile', '14.
|
|
18
|
-
s.dependency 'InsiderGeofence', '1.2.
|
|
19
|
-
s.dependency 'InsiderHybrid', '1.7.
|
|
17
|
+
s.dependency 'InsiderMobile', '14.2.2'
|
|
18
|
+
s.dependency 'InsiderGeofence', '1.2.4'
|
|
19
|
+
s.dependency 'InsiderHybrid', '1.7.6'
|
|
20
20
|
end
|
package/android/build.gradle
CHANGED
|
@@ -2,6 +2,7 @@ buildscript {
|
|
|
2
2
|
repositories {
|
|
3
3
|
google()
|
|
4
4
|
mavenCentral()
|
|
5
|
+
maven { url "https://developer.huawei.com/repo/"}
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
dependencies {
|
|
@@ -34,14 +35,15 @@ android {
|
|
|
34
35
|
repositories {
|
|
35
36
|
google()
|
|
36
37
|
mavenCentral()
|
|
38
|
+
maven { url "https://developer.huawei.com/repo/"}
|
|
37
39
|
maven { url "https://mobilesdk.useinsider.com/android" }
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
|
|
41
43
|
dependencies {
|
|
42
44
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
43
|
-
implementation 'com.useinsider:insider:15.1
|
|
44
|
-
implementation 'com.useinsider:insiderhybrid:1.3.
|
|
45
|
+
implementation 'com.useinsider:insider:15.2.1'
|
|
46
|
+
implementation 'com.useinsider:insiderhybrid:1.3.4'
|
|
45
47
|
|
|
46
48
|
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
|
47
49
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
@@ -51,4 +53,8 @@ dependencies {
|
|
|
51
53
|
implementation 'com.google.firebase:firebase-messaging:24.0.0'
|
|
52
54
|
implementation 'com.google.android.gms:play-services-location:21.3.0'
|
|
53
55
|
implementation 'com.google.android.play:review:2.0.1'
|
|
56
|
+
|
|
57
|
+
implementation 'com.huawei.hms:push:6.13.0.300'
|
|
58
|
+
implementation 'com.huawei.hms:ads-identifier:3.4.62.300'
|
|
59
|
+
implementation 'com.huawei.hms:location:6.16.0.302'
|
|
54
60
|
}
|
|
@@ -335,6 +335,43 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
+
@ReactMethod
|
|
339
|
+
public void logoutResettingInsiderID(ReadableArray identifiersArray, final Callback insiderIDResult) {
|
|
340
|
+
try {
|
|
341
|
+
InsiderIdentifiers[] identifiers = convertReadableArrayToInsiderIdentifiersArray(identifiersArray);
|
|
342
|
+
|
|
343
|
+
if (insiderIDResult != null) {
|
|
344
|
+
Insider.Instance.getCurrentUser().logoutResettingInsiderID(identifiers, new InsiderUser.InsiderIDResult() {
|
|
345
|
+
@Override
|
|
346
|
+
public void insiderIDResult(String insiderID) {
|
|
347
|
+
try {
|
|
348
|
+
insiderIDResult.invoke(insiderID);
|
|
349
|
+
} catch (Exception e) {
|
|
350
|
+
Insider.Instance.putException(e);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
} else {
|
|
355
|
+
Insider.Instance.getCurrentUser().logoutResettingInsiderID(identifiers);
|
|
356
|
+
}
|
|
357
|
+
} catch (Exception e) {
|
|
358
|
+
Insider.Instance.putException(e);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
private InsiderIdentifiers[] convertReadableArrayToInsiderIdentifiersArray(ReadableArray identifiersArray) {
|
|
363
|
+
if (identifiersArray == null || identifiersArray.size() == 0) {
|
|
364
|
+
return null;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
InsiderIdentifiers[] identifiers = new InsiderIdentifiers[identifiersArray.size()];
|
|
368
|
+
for (int i = 0; i < identifiersArray.size(); i++) {
|
|
369
|
+
ReadableMap identifierMap = identifiersArray.getMap(i);
|
|
370
|
+
identifiers[i] = setIdentifiers(identifierMap);
|
|
371
|
+
}
|
|
372
|
+
return identifiers;
|
|
373
|
+
}
|
|
374
|
+
|
|
338
375
|
@ReactMethod
|
|
339
376
|
public void setCustomAttributeWithString(String key, String value) {
|
|
340
377
|
try {
|
|
@@ -749,6 +786,10 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
749
786
|
}
|
|
750
787
|
String provider = Insider.Instance.getCurrentProvider(reactContext);
|
|
751
788
|
switch (provider) {
|
|
789
|
+
case "huawei":
|
|
790
|
+
com.huawei.hms.push.RemoteMessage hmsRemoteMessage = new com.huawei.hms.push.RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
791
|
+
Insider.Instance.handleHMSNotification(reactContext, hmsRemoteMessage);
|
|
792
|
+
break;
|
|
752
793
|
case "other":
|
|
753
794
|
case "google":
|
|
754
795
|
RemoteMessage fcmRemoteMessage = new RemoteMessage.Builder("insider").setData(remoteMessageStringMap).build();
|
|
@@ -242,6 +242,47 @@ RCT_EXPORT_METHOD(logout) {
|
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
RCT_EXPORT_METHOD(logoutResettingInsiderID:(NSArray *)identifiersArray insiderIDResult:(RCTResponseSenderBlock)insiderIDResult) {
|
|
246
|
+
@try {
|
|
247
|
+
NSArray<InsiderIdentifiers *> *identifiers = [self convertReadableArrayToInsiderIdentifiersArray:identifiersArray];
|
|
248
|
+
|
|
249
|
+
if (insiderIDResult != nil) {
|
|
250
|
+
[[Insider getCurrentUser] logoutResettingInsiderID:identifiers insiderIDResult:^(NSString *insiderID) {
|
|
251
|
+
NSString *insiderIDToPass = insiderID ? insiderID : @"";
|
|
252
|
+
insiderIDResult(@[insiderIDToPass]);
|
|
253
|
+
}];
|
|
254
|
+
} else {
|
|
255
|
+
[[Insider getCurrentUser] logoutResettingInsiderID:identifiers];
|
|
256
|
+
}
|
|
257
|
+
} @catch (NSException *e) {
|
|
258
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
- (NSArray<InsiderIdentifiers *> *)convertReadableArrayToInsiderIdentifiersArray:(NSArray *)identifiersArray {
|
|
263
|
+
if (identifiersArray == nil || identifiersArray.count == 0) {
|
|
264
|
+
return nil;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
NSMutableArray<InsiderIdentifiers *> *identifiers = [NSMutableArray array];
|
|
268
|
+
for (NSDictionary *identifierDict in identifiersArray) {
|
|
269
|
+
InsiderIdentifiers *insiderIdentifiers = [[InsiderIdentifiers alloc] init];
|
|
270
|
+
for (NSString *key in identifierDict.allKeys) {
|
|
271
|
+
if ([key isEqualToString:ADD_EMAIL]) {
|
|
272
|
+
insiderIdentifiers.addEmail([identifierDict objectForKey:key]);
|
|
273
|
+
} else if ([key isEqualToString:ADD_PHONE_NUMBER]) {
|
|
274
|
+
insiderIdentifiers.addPhoneNumber([identifierDict objectForKey:key]);
|
|
275
|
+
} else if ([key isEqualToString:ADD_USER_ID]) {
|
|
276
|
+
insiderIdentifiers.addUserID([identifierDict objectForKey:key]);
|
|
277
|
+
} else {
|
|
278
|
+
insiderIdentifiers.addCustomIdentifier(key, [identifierDict objectForKey:key]);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
[identifiers addObject:insiderIdentifiers];
|
|
282
|
+
}
|
|
283
|
+
return identifiers;
|
|
284
|
+
}
|
|
285
|
+
|
|
245
286
|
RCT_EXPORT_METHOD(setCustomAttributeWithString:(NSString *)key value:(NSString *)value) {
|
|
246
287
|
@try {
|
|
247
288
|
[Insider getCurrentUser].setCustomAttributeWithString(key, value);
|
package/package.json
CHANGED
package/src/InsiderProduct.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare class RNInsiderProduct {
|
|
|
28
28
|
setDescription(description: string): this;
|
|
29
29
|
setTags(tags: string[]): this;
|
|
30
30
|
setInStock(isInStock: boolean): this;
|
|
31
|
+
setProductURL(productURL: string): this;
|
|
31
32
|
|
|
32
33
|
setCustomAttributeWithString(key: string, value: string): this;
|
|
33
34
|
setCustomAttributeWithInt(key: string, value: number): this;
|
package/src/InsiderProduct.js
CHANGED
|
@@ -34,6 +34,7 @@ const GTIN = 'gt';
|
|
|
34
34
|
const DESCRIPTION = 'desc';
|
|
35
35
|
const TAGS = 'tags';
|
|
36
36
|
const IS_IN_STOCK = 'iis';
|
|
37
|
+
const PRODUCT_URL = 'url';
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
export default class RNInsiderProduct {
|
|
@@ -330,6 +331,20 @@ export default class RNInsiderProduct {
|
|
|
330
331
|
return this;
|
|
331
332
|
}
|
|
332
333
|
|
|
334
|
+
setProductURL(productURL) {
|
|
335
|
+
if (shouldNotProceed()) return this;
|
|
336
|
+
if (checkParameters([{ type: 'string', value: productURL }])) {
|
|
337
|
+
showParameterWarningLog("setProductURL", [{ type: 'string', value: productURL }]);
|
|
338
|
+
return this;
|
|
339
|
+
}
|
|
340
|
+
try {
|
|
341
|
+
this.productOptMap[PRODUCT_URL] = productURL;
|
|
342
|
+
} catch (error) {
|
|
343
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
344
|
+
}
|
|
345
|
+
return this;
|
|
346
|
+
}
|
|
347
|
+
|
|
333
348
|
setCustomAttributeWithString(key, value) {
|
|
334
349
|
if (shouldNotProceed()) return this;
|
|
335
350
|
if (checkParameters([{ type: 'string', value: key }, { type: 'string', value }])) {
|
package/src/InsiderUser.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ declare class RNInsiderUser {
|
|
|
20
20
|
|
|
21
21
|
login(identifiers: RNInsiderIdentifier, insiderIDResult?: (insiderID: string) => void): this;
|
|
22
22
|
logout(): this;
|
|
23
|
+
logoutResettingInsiderID(identifiers?: RNInsiderIdentifier[] | null, insiderIDResult?: (insiderID: string) => void): this;
|
|
23
24
|
|
|
24
25
|
setCustomAttributeWithString(key: string, value: string): this;
|
|
25
26
|
setCustomAttributeWithInt(key: string, value: number): this;
|
package/src/InsiderUser.js
CHANGED
|
@@ -255,6 +255,20 @@ export default class RNInsiderUser {
|
|
|
255
255
|
return this;
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
logoutResettingInsiderID(identifiers, insiderIDResult) {
|
|
259
|
+
if (shouldNotProceed()) { return this; }
|
|
260
|
+
try {
|
|
261
|
+
const identifiersArray = (identifiers && Array.isArray(identifiers))
|
|
262
|
+
? identifiers.map(id => id.identifiers)
|
|
263
|
+
: null;
|
|
264
|
+
|
|
265
|
+
Insider.logoutResettingInsiderID(identifiersArray, insiderIDResult);
|
|
266
|
+
} catch (error) {
|
|
267
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
268
|
+
}
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
271
|
+
|
|
258
272
|
setCustomAttributeWithString(key, value) {
|
|
259
273
|
if (shouldNotProceed()) return this;
|
|
260
274
|
if (checkParameters([{ type: 'string', value: key }, { type: 'string', value }])) {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|