react-native-insider 6.7.0 → 6.8.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.
- package/RNInsider.podspec +3 -3
- package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/build/.transforms/3866160d3fb3d2a8546895c84f46d415/results.bin +1 -0
- package/android/build/.transforms/3866160d3fb3d2a8546895c84f46d415/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/com/useinsider/react/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$1$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$10.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$11.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$12$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$12.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$7.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$8.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule$9.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNInsiderPackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNUtils$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/useinsider/react/RNUtils.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +12 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +10 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +21 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/useinsider/react/RNInsiderModule.java +80 -4
- package/index.d.ts +24 -1
- package/index.js +122 -4
- package/ios/RNInsider/RNInsider.m +71 -11
- package/ios/RNInsider/RNNotificationHandler.h +1 -0
- package/ios/RNInsider/RNNotificationHandler.m +2 -1
- package/package.json +1 -1
- package/src/InsiderCallbackType.d.ts +1 -0
- package/src/InsiderCallbackType.js +2 -1
- package/.gitattributes +0 -1
- package/.github/CODEOWNERS +0 -8
- package/.github/dependabot.yml +0 -29
- package/.github/workflows/dependabot_workflow.yml +0 -18
- package/.github/workflows/react-native-insider_release.yml +0 -65
- package/.github/workflows/release_task_merger.yml +0 -22
- package/.github/workflows/release_version_setter.yml +0 -44
- package/.github/workflows/security_allinone.yml +0 -23
- package/changelog/4.4.1.md +0 -4
- package/changelog/5.0.2.md +0 -7
- package/release_version.sh +0 -30
- package/slack_notifier.sh +0 -20
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/13.
|
|
12
|
+
s.source = {:http => 'https://mobilesdk.useinsider.com/iOS/13.11.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', '13.
|
|
17
|
+
s.dependency 'InsiderMobile', '13.11.2'
|
|
18
18
|
s.dependency 'InsiderGeofence', '1.2.0'
|
|
19
|
-
s.dependency 'InsiderHybrid', '1.
|
|
19
|
+
s.dependency 'InsiderHybrid', '1.7.0'
|
|
20
20
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
arguments=
|
|
2
|
+
auto.sync=false
|
|
3
|
+
build.scans.enabled=false
|
|
4
|
+
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.3))
|
|
5
|
+
connection.project.dir=
|
|
6
|
+
eclipse.preferences.version=1
|
|
7
|
+
gradle.user.home=
|
|
8
|
+
java.home=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
|
|
9
|
+
jvm.arguments=
|
|
10
|
+
offline.mode=false
|
|
11
|
+
override.workspace.settings=true
|
|
12
|
+
show.console.view=true
|
|
13
|
+
show.executions.view=true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/classes
|
|
Binary file
|
package/android/build/generated/source/buildConfig/debug/com/useinsider/react/BuildConfig.java
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatically generated file. DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
package com.useinsider.react;
|
|
5
|
+
|
|
6
|
+
public final class BuildConfig {
|
|
7
|
+
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
|
8
|
+
public static final String LIBRARY_PACKAGE_NAME = "com.useinsider.react";
|
|
9
|
+
public static final String BUILD_TYPE = "debug";
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
4
|
+
package="com.useinsider.react" >
|
|
5
|
+
|
|
6
|
+
<uses-sdk
|
|
7
|
+
android:minSdkVersion="23"
|
|
8
|
+
tools:overrideLibrary="androidx.security" />
|
|
9
|
+
|
|
10
|
+
</manifest>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"artifactType": {
|
|
4
|
+
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
|
5
|
+
"kind": "Directory"
|
|
6
|
+
},
|
|
7
|
+
"applicationId": "com.useinsider.react",
|
|
8
|
+
"variantName": "debug",
|
|
9
|
+
"elements": [
|
|
10
|
+
{
|
|
11
|
+
"type": "SINGLE",
|
|
12
|
+
"filters": [],
|
|
13
|
+
"attributes": [],
|
|
14
|
+
"outputFile": "AndroidManifest.xml"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"elementType": "File"
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#Mon Apr 07 12:56:02 TRT 2025
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/debug/jniLibs"/></dataSet></merger>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/debug/shaders"/></dataSet></merger>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
1<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
3 xmlns:tools="http://schemas.android.com/tools"
|
|
4
|
+
4 package="com.useinsider.react" >
|
|
5
|
+
5
|
|
6
|
+
6 <uses-sdk
|
|
7
|
+
6-->/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:4:5-58
|
|
8
|
+
7 android:minSdkVersion="23"
|
|
9
|
+
8 tools:overrideLibrary="androidx.security" />
|
|
10
|
+
8-->/Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:4:15-56
|
|
11
|
+
9
|
|
12
|
+
10</manifest>
|
package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools"
|
|
4
|
+
package="com.useinsider.react" >
|
|
5
|
+
|
|
6
|
+
<uses-sdk
|
|
7
|
+
android:minSdkVersion="23"
|
|
8
|
+
tools:overrideLibrary="androidx.security" />
|
|
9
|
+
|
|
10
|
+
</manifest>
|
package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0 Warning/Error
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
com.useinsider.react
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
-- Merging decision tree log ---
|
|
2
|
+
manifest
|
|
3
|
+
ADDED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:1:1-5:12
|
|
4
|
+
INJECTED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:1:1-5:12
|
|
5
|
+
package
|
|
6
|
+
ADDED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:3:5-35
|
|
7
|
+
INJECTED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml
|
|
8
|
+
xmlns:tools
|
|
9
|
+
ADDED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:2:5-51
|
|
10
|
+
xmlns:android
|
|
11
|
+
ADDED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:1:11-69
|
|
12
|
+
uses-sdk
|
|
13
|
+
ADDED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:4:5-58
|
|
14
|
+
INJECTED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:4:5-58
|
|
15
|
+
INJECTED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:4:5-58
|
|
16
|
+
tools:overrideLibrary
|
|
17
|
+
ADDED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml:4:15-56
|
|
18
|
+
android:targetSdkVersion
|
|
19
|
+
INJECTED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml
|
|
20
|
+
android:minSdkVersion
|
|
21
|
+
INJECTED from /Users/melih/Documents/GitHub/ReactNativeDemo/node_modules/react-native-insider/android/src/main/AndroidManifest.xml
|
package/android/build.gradle
CHANGED
|
@@ -35,8 +35,8 @@ repositories {
|
|
|
35
35
|
|
|
36
36
|
dependencies {
|
|
37
37
|
implementation "com.facebook.react:react-native:${getVersionFromPartner('reactNativeVersion', '+')}"
|
|
38
|
-
implementation ('com.useinsider:insider:14.
|
|
39
|
-
implementation ('com.useinsider:insiderhybrid:1.
|
|
38
|
+
implementation ('com.useinsider:insider:14.9.2')
|
|
39
|
+
implementation ('com.useinsider:insiderhybrid:1.3.0')
|
|
40
40
|
|
|
41
41
|
implementation 'androidx.security:security-crypto:1.1.0-alpha06'
|
|
42
42
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
@@ -412,9 +412,9 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
@ReactMethod
|
|
415
|
-
public void
|
|
415
|
+
public void setMobileAppAccess(final boolean mobileAppAccess) {
|
|
416
416
|
try {
|
|
417
|
-
Insider.Instance.
|
|
417
|
+
Insider.Instance.setMobileAppAccess(mobileAppAccess);
|
|
418
418
|
} catch (Exception e) {
|
|
419
419
|
Insider.Instance.putException(e);
|
|
420
420
|
}
|
|
@@ -460,6 +460,35 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
@ReactMethod
|
|
464
|
+
public void itemAddedToWishlist(ReadableMap productMustMap, ReadableMap productOptMap) {
|
|
465
|
+
try {
|
|
466
|
+
HashMap optMap = RNUtils.fixIntegerAttributesInMap(RNUtils.convertReadableMapToMap(productOptMap));
|
|
467
|
+
InsiderProduct product = InsiderHybrid.createProduct(RNUtils.convertReadableMapToMap(productMustMap), optMap);
|
|
468
|
+
Insider.Instance.itemAddedToWishlist(product);
|
|
469
|
+
} catch (Exception e) {
|
|
470
|
+
Insider.Instance.putException(e);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
@ReactMethod
|
|
475
|
+
public void itemRemovedFromWishlist(String productID) {
|
|
476
|
+
try {
|
|
477
|
+
Insider.Instance.itemRemovedFromWishlist(productID);
|
|
478
|
+
} catch (Exception e) {
|
|
479
|
+
Insider.Instance.putException(e);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
@ReactMethod
|
|
484
|
+
public void wishlistCleared() {
|
|
485
|
+
try {
|
|
486
|
+
Insider.Instance.wishlistCleared();
|
|
487
|
+
} catch (Exception e) {
|
|
488
|
+
Insider.Instance.putException(e);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
463
492
|
@ReactMethod
|
|
464
493
|
public void getMessageCenterData(int limit, String startDate, String endDate, final Callback messageCenterCallback) {
|
|
465
494
|
try {
|
|
@@ -554,8 +583,7 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
554
583
|
}
|
|
555
584
|
|
|
556
585
|
@ReactMethod
|
|
557
|
-
public void getContentStringWithName(String variableName, String defaultValue, int dataType,
|
|
558
|
-
final Callback callback) {
|
|
586
|
+
public void getContentStringWithName(String variableName, String defaultValue, int dataType, final Callback callback) {
|
|
559
587
|
try {
|
|
560
588
|
String contentString = InsiderHybrid.getContentStringWithName(variableName, defaultValue, dataType);
|
|
561
589
|
callback.invoke(contentString);
|
|
@@ -584,6 +612,37 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
584
612
|
}
|
|
585
613
|
}
|
|
586
614
|
|
|
615
|
+
@ReactMethod
|
|
616
|
+
public void getContentStringWithoutCache(String variableName, String defaultValue, int dataType, final Callback callback) {
|
|
617
|
+
try {
|
|
618
|
+
String contentString = InsiderHybrid.getContentStringWithoutCache(variableName, defaultValue, dataType);
|
|
619
|
+
callback.invoke(contentString);
|
|
620
|
+
} catch (Exception e) {
|
|
621
|
+
Insider.Instance.putException(e);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
@ReactMethod
|
|
626
|
+
public void getContentBoolWithoutCache(String variableName, boolean defaultValue, int dataType, final Callback callback) {
|
|
627
|
+
try {
|
|
628
|
+
boolean contentBoolean = InsiderHybrid.getContentBoolWithoutCache(variableName, defaultValue, dataType);
|
|
629
|
+
callback.invoke(contentBoolean);
|
|
630
|
+
} catch (Exception e) {
|
|
631
|
+
Insider.Instance.putException(e);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
@ReactMethod
|
|
636
|
+
public void getContentIntWithoutCache(String variableName, int defaultValue, int dataType, final Callback callback) {
|
|
637
|
+
try {
|
|
638
|
+
int contentInt = InsiderHybrid.getContentIntWithoutCache(variableName, defaultValue, dataType);
|
|
639
|
+
callback.invoke(contentInt);
|
|
640
|
+
} catch (Exception e) {
|
|
641
|
+
Insider.Instance.putException(e);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
|
|
587
646
|
@ReactMethod
|
|
588
647
|
public void visitHomePage() {
|
|
589
648
|
try {
|
|
@@ -631,6 +690,23 @@ public class RNInsiderModule extends ReactContextBaseJavaModule {
|
|
|
631
690
|
}
|
|
632
691
|
}
|
|
633
692
|
|
|
693
|
+
@ReactMethod
|
|
694
|
+
public void visitWishlistPage(ReadableArray products) {
|
|
695
|
+
try {
|
|
696
|
+
InsiderProduct[] ips = new InsiderProduct[products.size()];
|
|
697
|
+
for (int i = 0; i < products.size(); i++) {
|
|
698
|
+
HashMap productsMap = RNUtils.convertReadableMapToMap(products.getMap(i));
|
|
699
|
+
HashMap optMap = RNUtils.fixIntegerAttributesInMap((HashMap<String, Object>) productsMap.get("productOptMap"));
|
|
700
|
+
InsiderProduct product = InsiderHybrid
|
|
701
|
+
.createProduct((HashMap<String, Object>) productsMap.get("productMustMap"), optMap);
|
|
702
|
+
ips[i] = product;
|
|
703
|
+
}
|
|
704
|
+
Insider.Instance.visitWishlistPage(ips);
|
|
705
|
+
} catch (Exception e) {
|
|
706
|
+
Insider.Instance.putException(e);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
634
710
|
@ReactMethod
|
|
635
711
|
public void startTrackingGeofence() {
|
|
636
712
|
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
package/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare module 'react-native-insider' {
|
|
|
10
10
|
static tagEvent(name: string): RNInsiderEvent;
|
|
11
11
|
static getCurrentUser(): RNInsiderUser;
|
|
12
12
|
static setGDPRConsent(gdprConsent: boolean): void;
|
|
13
|
-
static
|
|
13
|
+
static setMobileAppAccess(mobileAppAccess: boolean): void;
|
|
14
14
|
|
|
15
15
|
static createNewProduct(
|
|
16
16
|
productID: string,
|
|
@@ -24,6 +24,9 @@ declare module 'react-native-insider' {
|
|
|
24
24
|
static itemAddedToCart(product: RNInsiderProduct): void;
|
|
25
25
|
static itemRemovedFromCart(productID: string): void;
|
|
26
26
|
static cartCleared(): void;
|
|
27
|
+
static itemAddedToWishlist(product: RNInsiderProduct): void;
|
|
28
|
+
static itemRemovedFromWishlist(productID: string): void;
|
|
29
|
+
static wishlistCleared(): void;
|
|
27
30
|
static getMessageCenterData(
|
|
28
31
|
limit: number,
|
|
29
32
|
startDate: Date,
|
|
@@ -68,10 +71,29 @@ declare module 'react-native-insider' {
|
|
|
68
71
|
contentOptimizerDataType: number,
|
|
69
72
|
callback: (content: number) => void
|
|
70
73
|
): void;
|
|
74
|
+
static getContentStringWithoutCache(
|
|
75
|
+
variableName: string,
|
|
76
|
+
defaultValue: string,
|
|
77
|
+
contentOptimizerDataType: number,
|
|
78
|
+
callback: (content: string) => void
|
|
79
|
+
): void;
|
|
80
|
+
static getContentBoolWithoutCache(
|
|
81
|
+
variableName: string,
|
|
82
|
+
defaultValue: boolean,
|
|
83
|
+
contentOptimizerDataType: number,
|
|
84
|
+
callback: (content: boolean) => void
|
|
85
|
+
): void;
|
|
86
|
+
static getContentIntWithoutCache(
|
|
87
|
+
variableName: string,
|
|
88
|
+
defaultValue: number,
|
|
89
|
+
contentOptimizerDataType: number,
|
|
90
|
+
callback: (content: number) => void
|
|
91
|
+
): void;
|
|
71
92
|
static visitHomePage(): void;
|
|
72
93
|
static visitListingPage(taxonomy: Array<string>): void;
|
|
73
94
|
static visitProductDetailPage(product: RNInsiderProduct): void;
|
|
74
95
|
static visitCartPage(products: Array<RNInsiderProduct>): void;
|
|
96
|
+
static visitWishlistPage(products: Array<RNInsiderProduct>): void;
|
|
75
97
|
static startTrackingGeofence(): void;
|
|
76
98
|
static handleNotification(notification: any): void;
|
|
77
99
|
static enableIDFACollection(enableIDFACollection: boolean): void;
|
|
@@ -102,4 +124,5 @@ declare module 'react-native-insider' {
|
|
|
102
124
|
export const FOREGROUND_PUSH: string;
|
|
103
125
|
export const INAPP_SEEN: string;
|
|
104
126
|
export const INSIDER_ID_LISTENER: string;
|
|
127
|
+
export const SESSION_STARTED: string;
|
|
105
128
|
}
|
package/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const TEMP_STORE_CUSTOM_ACTION = 'TEMP_STORE_CUSTOM_ACTION';
|
|
|
20
20
|
const FOREGROUND_PUSH = 'FOREGROUND_PUSH';
|
|
21
21
|
const INAPP_SEEN = 'INAPP_SEEN';
|
|
22
22
|
const INSIDER_ID_LISTENER = 'INSIDER_ID_LISTENER';
|
|
23
|
+
const SESSION_STARTED = 'SESSION_STARTED';
|
|
23
24
|
|
|
24
25
|
const platformType = {
|
|
25
26
|
ios: "ios",
|
|
@@ -28,7 +29,7 @@ const platformType = {
|
|
|
28
29
|
|
|
29
30
|
function registerInsiderCallback(insiderCallback) {
|
|
30
31
|
try {
|
|
31
|
-
const callbackActions = [NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN];
|
|
32
|
+
const callbackActions = [NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN, SESSION_STARTED];
|
|
32
33
|
callbackActions.forEach((callbackAction, index) => {
|
|
33
34
|
eventHandler.addListener(callbackAction, notification => {
|
|
34
35
|
insiderCallback(index, notification);
|
|
@@ -132,10 +133,14 @@ export default class RNInsider {
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
|
|
135
|
-
static
|
|
136
|
-
if (shouldNotProceed()
|
|
136
|
+
static setMobileAppAccess(mobileAppAccess) {
|
|
137
|
+
if (shouldNotProceed()) return;
|
|
138
|
+
if (checkParameters([{ type: 'boolean', value: mobileAppAccess }])) {
|
|
139
|
+
showParameterWarningLog("setMobileAppAccess", [{ type: 'boolean', value: mobileAppAccess }]);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
137
142
|
try {
|
|
138
|
-
Insider.
|
|
143
|
+
Insider.setMobileAppAccess(mobileAppAccess);
|
|
139
144
|
} catch (error) {
|
|
140
145
|
Insider.putErrorLog(generateJSONErrorString(error));
|
|
141
146
|
}
|
|
@@ -220,6 +225,33 @@ export default class RNInsider {
|
|
|
220
225
|
}
|
|
221
226
|
}
|
|
222
227
|
|
|
228
|
+
static itemAddedToWishlist(product: RNInsiderProduct) {
|
|
229
|
+
if (shouldNotProceed() || product == null) return;
|
|
230
|
+
try {
|
|
231
|
+
Insider.itemAddedToWishlist(product.productMustMap, product.productOptMap);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
static itemRemovedFromWishlist(productID: string) {
|
|
238
|
+
if (shouldNotProceed() || productID == null) return;
|
|
239
|
+
try {
|
|
240
|
+
Insider.itemRemovedFromWishlist(productID);
|
|
241
|
+
} catch (error) {
|
|
242
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
static wishlistCleared() {
|
|
247
|
+
if (shouldNotProceed()) return;
|
|
248
|
+
try {
|
|
249
|
+
Insider.wishlistCleared();
|
|
250
|
+
} catch (error) {
|
|
251
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
223
255
|
// Message Center & Smart Recommendation
|
|
224
256
|
static getMessageCenterData(limit, startDate, endDate, callback) {
|
|
225
257
|
if (shouldNotProceed()) return;
|
|
@@ -449,6 +481,76 @@ export default class RNInsider {
|
|
|
449
481
|
}
|
|
450
482
|
}
|
|
451
483
|
|
|
484
|
+
static getContentStringWithoutCache(variableName, defaultValue, contentOptimizerDataType, callback) {
|
|
485
|
+
if (shouldNotProceed()) return;
|
|
486
|
+
if (checkParameters([
|
|
487
|
+
{ type: 'string', value: variableName },
|
|
488
|
+
{ type: 'string', value: defaultValue },
|
|
489
|
+
{ type: 'number', value: contentOptimizerDataType },
|
|
490
|
+
{ type: 'function', value: callback }
|
|
491
|
+
])) {
|
|
492
|
+
showParameterWarningLog("getContentStringWithoutCache", [
|
|
493
|
+
{ type: 'string', value: variableName },
|
|
494
|
+
{ type: 'string', value: defaultValue },
|
|
495
|
+
{ type: 'number', value: contentOptimizerDataType },
|
|
496
|
+
{ type: 'function', value: callback }
|
|
497
|
+
]);
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
try {
|
|
501
|
+
Insider.getContentStringWithoutCache(variableName, defaultValue, contentOptimizerDataType, callback);
|
|
502
|
+
} catch (error) {
|
|
503
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
static getContentBoolWithoutCache(variableName, defaultValue, contentOptimizerDataType, callback) {
|
|
508
|
+
if (shouldNotProceed()) return;
|
|
509
|
+
if (checkParameters([
|
|
510
|
+
{ type: 'string', value: variableName },
|
|
511
|
+
{ type: 'boolean', value: defaultValue },
|
|
512
|
+
{ type: 'number', value: contentOptimizerDataType },
|
|
513
|
+
{ type: 'function', value: callback }
|
|
514
|
+
])) {
|
|
515
|
+
showParameterWarningLog("getContentBoolWithoutCache", [
|
|
516
|
+
{ type: 'string', value: variableName },
|
|
517
|
+
{ type: 'boolean', value: defaultValue },
|
|
518
|
+
{ type: 'number', value: contentOptimizerDataType },
|
|
519
|
+
{ type: 'function', value: callback }
|
|
520
|
+
]);
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
try {
|
|
524
|
+
Insider.getContentBoolWithoutCache(variableName, defaultValue, contentOptimizerDataType, callback);
|
|
525
|
+
} catch (error) {
|
|
526
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
static getContentIntWithoutCache(variableName, defaultValue, contentOptimizerDataType, callback) {
|
|
531
|
+
if (shouldNotProceed()) return;
|
|
532
|
+
if (checkParameters([
|
|
533
|
+
{ type: 'string', value: variableName },
|
|
534
|
+
{ type: 'number', value: defaultValue },
|
|
535
|
+
{ type: 'number', value: contentOptimizerDataType },
|
|
536
|
+
{ type: 'function', value: callback }
|
|
537
|
+
])) {
|
|
538
|
+
showParameterWarningLog("getContentIntWithoutCache", [
|
|
539
|
+
{ type: 'string', value: variableName },
|
|
540
|
+
{ type: 'number', value: defaultValue },
|
|
541
|
+
{ type: 'number', value: contentOptimizerDataType },
|
|
542
|
+
{ type: 'function', value: callback }
|
|
543
|
+
]);
|
|
544
|
+
return;
|
|
545
|
+
}
|
|
546
|
+
try {
|
|
547
|
+
Insider.getContentIntWithoutCache(variableName, defaultValue, contentOptimizerDataType, callback);
|
|
548
|
+
} catch (error) {
|
|
549
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
|
|
452
554
|
// Visit Pages
|
|
453
555
|
static visitHomePage() {
|
|
454
556
|
if (shouldNotProceed()) return;
|
|
@@ -505,6 +607,22 @@ export default class RNInsider {
|
|
|
505
607
|
}
|
|
506
608
|
}
|
|
507
609
|
|
|
610
|
+
static visitWishlistPage(products: Array<RNInsiderProduct>) {
|
|
611
|
+
if (shouldNotProceed() || products == null) return;
|
|
612
|
+
let mappedProducts = new Array(products.length);
|
|
613
|
+
try {
|
|
614
|
+
products.forEach((product, i) => {
|
|
615
|
+
let productMap = {};
|
|
616
|
+
productMap['productMustMap'] = product.productMustMap;
|
|
617
|
+
productMap['productOptMap'] = product.productOptMap;
|
|
618
|
+
mappedProducts[i] = productMap;
|
|
619
|
+
});
|
|
620
|
+
Insider.visitWishlistPage(mappedProducts);
|
|
621
|
+
} catch (error) {
|
|
622
|
+
Insider.putErrorLog(generateJSONErrorString(error));
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
|
|
508
626
|
static startTrackingGeofence() {
|
|
509
627
|
if (shouldNotProceed()) return;
|
|
510
628
|
try {
|
|
@@ -308,9 +308,9 @@ RCT_EXPORT_METHOD(setGDPRConsent:(BOOL)gdprConsent) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
RCT_EXPORT_METHOD(
|
|
311
|
+
RCT_EXPORT_METHOD(setMobileAppAccess:(BOOL)mobileAppAccess) {
|
|
312
312
|
@try {
|
|
313
|
-
[Insider
|
|
313
|
+
[Insider setMobileAppAccess:mobileAppAccess];
|
|
314
314
|
} @catch (NSException *e){
|
|
315
315
|
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
316
316
|
}
|
|
@@ -359,6 +359,31 @@ RCT_EXPORT_METHOD(cartCleared) {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
+
RCT_EXPORT_METHOD(itemAddedToWishlist:(NSDictionary *)productMustMap productOptMap:(NSDictionary *)productOptMap) {
|
|
363
|
+
@try {
|
|
364
|
+
InsiderProduct *product = [InsiderHybrid createProduct:productMustMap productOptMap:productOptMap];
|
|
365
|
+
[Insider itemAddedToWishlistWithProduct:product];
|
|
366
|
+
} @catch (NSException *e){
|
|
367
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
RCT_EXPORT_METHOD(itemRemovedFromWishlist:(NSString *)productID) {
|
|
372
|
+
@try {
|
|
373
|
+
[Insider itemRemovedFromWishlistWithProductID:productID];
|
|
374
|
+
} @catch (NSException *e){
|
|
375
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
RCT_EXPORT_METHOD(wishlistCleared) {
|
|
380
|
+
@try {
|
|
381
|
+
[Insider wishlistCleared];
|
|
382
|
+
} @catch (NSException *e){
|
|
383
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
362
387
|
RCT_EXPORT_METHOD(getMessageCenterData:(int)limit startDate:(NSString *)startDate endDate:(NSString *)endDate callback:(RCTResponseSenderBlock) callback) {
|
|
363
388
|
@try {
|
|
364
389
|
[InsiderHybrid getMessageCenterDataWithLimit:limit startDate:startDate endDate:endDate success:^(NSArray *messageCenterData) {
|
|
@@ -433,6 +458,30 @@ RCT_EXPORT_METHOD(getContentIntWithName:(NSString *)variableName defaultValue:(i
|
|
|
433
458
|
}
|
|
434
459
|
}
|
|
435
460
|
|
|
461
|
+
RCT_EXPORT_METHOD(getContentStringWithoutCache:(NSString *)variableName defaultValue:(NSString *)defaultValue dataType:(int)dataType callback:(RCTResponseSenderBlock)callback) {
|
|
462
|
+
@try {
|
|
463
|
+
callback([InsiderHybrid getContentStringWithoutCache:variableName defaultString:defaultValue dataType:dataType]);
|
|
464
|
+
} @catch (NSException *e){
|
|
465
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
RCT_EXPORT_METHOD(getContentBoolWithoutCache:(NSString *)variableName defaultValue:(BOOL)defaultValue dataType:(int)dataType callback:(RCTResponseSenderBlock)callback) {
|
|
470
|
+
@try {
|
|
471
|
+
callback([InsiderHybrid getContentBoolWithoutCache:variableName defaultBool:defaultValue dataType:dataType]);
|
|
472
|
+
} @catch (NSException *e){
|
|
473
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
RCT_EXPORT_METHOD(getContentIntWithoutCache:(NSString *)variableName defaultValue:(int)defaultValue dataType:(int)dataType callback:(RCTResponseSenderBlock)callback) {
|
|
478
|
+
@try {
|
|
479
|
+
callback([InsiderHybrid getContentIntWithoutCache:variableName defaultInt:defaultValue dataType:dataType]);
|
|
480
|
+
} @catch (NSException *e){
|
|
481
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
436
485
|
RCT_EXPORT_METHOD(visitHomePage) {
|
|
437
486
|
@try {
|
|
438
487
|
[Insider visitHomepage];
|
|
@@ -466,6 +515,14 @@ RCT_EXPORT_METHOD(visitCartPage:(NSArray *)products) {
|
|
|
466
515
|
}
|
|
467
516
|
}
|
|
468
517
|
|
|
518
|
+
RCT_EXPORT_METHOD(visitWishlistPage:(NSArray *)products) {
|
|
519
|
+
@try {
|
|
520
|
+
[InsiderHybrid convertArrayToInsiderProductArray:products];
|
|
521
|
+
} @catch (NSException *e) {
|
|
522
|
+
[Insider sendError:e desc:[NSString stringWithFormat:@"%s:%d", __func__, __LINE__]];
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
469
526
|
RCT_EXPORT_METHOD(startTrackingGeofence) {
|
|
470
527
|
@try {
|
|
471
528
|
[InsiderGeofence startTracking];
|
|
@@ -640,30 +697,33 @@ RCT_EXPORT_METHOD(enableInAppMessages) {
|
|
|
640
697
|
}
|
|
641
698
|
}
|
|
642
699
|
|
|
643
|
-
-(void)emitEvent:(NSDictionary *)
|
|
700
|
+
-(void)emitEvent:(NSDictionary *)eventData {
|
|
644
701
|
@try {
|
|
645
702
|
RNNotificationHandler *handler = [[RNNotificationHandler alloc] init];
|
|
646
|
-
if (!
|
|
703
|
+
if (!eventData || [eventData count] == 0)
|
|
647
704
|
return;
|
|
648
|
-
InsiderCallbackType type = (InsiderCallbackType)[[
|
|
705
|
+
InsiderCallbackType type = (InsiderCallbackType)[[eventData objectForKey:@"type"] intValue];
|
|
649
706
|
switch (type) {
|
|
650
707
|
case InsiderCallbackTypeNotificationOpen:
|
|
651
|
-
[handler sendDataToJS:NOTIFICATION_OPEN data:
|
|
708
|
+
[handler sendDataToJS:NOTIFICATION_OPEN data:eventData];
|
|
652
709
|
break;
|
|
653
710
|
case InsiderCallbackTypeInappButtonClick:
|
|
654
|
-
[handler sendDataToJS:INAPP_BUTTON_CLICK data:
|
|
711
|
+
[handler sendDataToJS:INAPP_BUTTON_CLICK data:eventData];
|
|
655
712
|
break;
|
|
656
713
|
case InsiderCallbackTypeTempStorePurchase:
|
|
657
|
-
[handler sendDataToJS:TEMP_STORE_PURCHASE data:
|
|
714
|
+
[handler sendDataToJS:TEMP_STORE_PURCHASE data:eventData];
|
|
658
715
|
break;
|
|
659
716
|
case InsiderCallbackTypeTempStoreAddedToCart:
|
|
660
|
-
[handler sendDataToJS:TEMP_STORE_ADDED_TO_CART data:
|
|
717
|
+
[handler sendDataToJS:TEMP_STORE_ADDED_TO_CART data:eventData];
|
|
661
718
|
break;
|
|
662
719
|
case InsiderCallbackTypeTempStoreCustomAction:
|
|
663
|
-
[handler sendDataToJS:TEMP_STORE_CUSTOM_ACTION data:
|
|
720
|
+
[handler sendDataToJS:TEMP_STORE_CUSTOM_ACTION data:eventData];
|
|
664
721
|
break;
|
|
665
722
|
case InsiderCallbackTypeInAppSeen:
|
|
666
|
-
[handler sendDataToJS:INAPP_SEEN data:
|
|
723
|
+
[handler sendDataToJS:INAPP_SEEN data:eventData];
|
|
724
|
+
break;
|
|
725
|
+
case InsiderCallbackTypeSessionStarted:
|
|
726
|
+
[handler sendDataToJS:SESSION_STARTED data:eventData];
|
|
667
727
|
break;
|
|
668
728
|
default:
|
|
669
729
|
break;
|
|
@@ -23,6 +23,7 @@ extern NSString * const TEMP_STORE_CUSTOM_ACTION;
|
|
|
23
23
|
extern NSString * const INAPP_SEEN;
|
|
24
24
|
extern NSString * const FOREGROUND_PUSH;
|
|
25
25
|
extern NSString * const INSIDER_ID_LISTENER;
|
|
26
|
+
extern NSString * const SESSION_STARTED;
|
|
26
27
|
|
|
27
28
|
-(void)sendDataToJS:(NSString *)eventName data:(NSDictionary *)data;
|
|
28
29
|
@end
|
|
@@ -23,6 +23,7 @@ NSString * const TEMP_STORE_CUSTOM_ACTION = @"TEMP_STORE_CUSTOM_ACTION";
|
|
|
23
23
|
NSString * const INAPP_SEEN = @"INAPP_SEEN";
|
|
24
24
|
NSString * const FOREGROUND_PUSH = @"FOREGROUND_PUSH";
|
|
25
25
|
NSString * const INSIDER_ID_LISTENER = @"INSIDER_ID_LISTENER";
|
|
26
|
+
NSString * const SESSION_STARTED = @"SESSION_STARTED";
|
|
26
27
|
|
|
27
28
|
static RNNotificationHandler *notificationHandler;
|
|
28
29
|
|
|
@@ -41,7 +42,7 @@ static RNNotificationHandler *notificationHandler;
|
|
|
41
42
|
RCT_EXPORT_MODULE();
|
|
42
43
|
|
|
43
44
|
-(NSArray<NSString *> *)supportedEvents{
|
|
44
|
-
return @[NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN, FOREGROUND_PUSH, INSIDER_ID_LISTENER];
|
|
45
|
+
return @[NOTIFICATION_OPEN, INAPP_BUTTON_CLICK, TEMP_STORE_PURCHASE, TEMP_STORE_ADDED_TO_CART, TEMP_STORE_CUSTOM_ACTION, INAPP_SEEN, FOREGROUND_PUSH, INSIDER_ID_LISTENER, SESSION_STARTED];
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
-(void)sendDataToJS:(NSString *)eventName data:(NSDictionary *)data {
|
package/package.json
CHANGED
package/.gitattributes
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.pbxproj -text
|
package/.github/CODEOWNERS
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# This is a comment.
|
|
2
|
-
# Each line is a file pattern followed by one or more owners.
|
|
3
|
-
|
|
4
|
-
# These owners will be the default owners for everything in
|
|
5
|
-
# the repo. Unless a later match takes precedence,
|
|
6
|
-
# @global-owner1 and @global-owner2 will be requested for
|
|
7
|
-
# review when someone opens a pull request.
|
|
8
|
-
* @melih-useinsider
|
package/.github/dependabot.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
|
|
4
|
-
- package-ecosystem: "gradle"
|
|
5
|
-
directory: "/android"
|
|
6
|
-
schedule:
|
|
7
|
-
interval: "monthly"
|
|
8
|
-
labels:
|
|
9
|
-
- "dependabot"
|
|
10
|
-
- "dependencies"
|
|
11
|
-
open-pull-requests-limit: 10
|
|
12
|
-
|
|
13
|
-
- package-ecosystem: "npm"
|
|
14
|
-
directory: "/"
|
|
15
|
-
schedule:
|
|
16
|
-
interval: "monthly"
|
|
17
|
-
labels:
|
|
18
|
-
- "dependabot"
|
|
19
|
-
- "dependencies"
|
|
20
|
-
open-pull-requests-limit: 10
|
|
21
|
-
|
|
22
|
-
- package-ecosystem: "github-actions"
|
|
23
|
-
directory: "/"
|
|
24
|
-
schedule:
|
|
25
|
-
interval: "monthly"
|
|
26
|
-
labels:
|
|
27
|
-
- "dependabot"
|
|
28
|
-
- "dependencies"
|
|
29
|
-
open-pull-requests-limit: 10
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
name: Dependabot workflow
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
schedule:
|
|
6
|
-
- cron: "0 13 1 * *"
|
|
7
|
-
jobs:
|
|
8
|
-
dependabot_monthly:
|
|
9
|
-
name: Trigger mobile-devops workflow
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Repository Dispatch
|
|
13
|
-
uses: peter-evans/repository-dispatch@v2
|
|
14
|
-
with:
|
|
15
|
-
token: ${{ secrets.GIT_TOKEN }}
|
|
16
|
-
repository: useinsider/mobile-devops
|
|
17
|
-
event-type: repo-name
|
|
18
|
-
client-payload: '{"repo-name": "react-native-insider"}'
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
name: React Native Insider Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
version_name:
|
|
7
|
-
required: true
|
|
8
|
-
description: The new version name of the SDK to be released (5.0.2)
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
release:
|
|
12
|
-
if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
|
|
13
|
-
name: Create Release
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout code
|
|
18
|
-
uses: actions/checkout@v3
|
|
19
|
-
with:
|
|
20
|
-
ref: develop
|
|
21
|
-
|
|
22
|
-
- name: Setup node
|
|
23
|
-
uses: actions/setup-node@v3.3.0
|
|
24
|
-
with:
|
|
25
|
-
node-version: 12
|
|
26
|
-
registry-url: https://registry.npmjs.org/
|
|
27
|
-
|
|
28
|
-
- name: Publish RN SDK
|
|
29
|
-
run: |
|
|
30
|
-
npm ci
|
|
31
|
-
npm test
|
|
32
|
-
npm publish
|
|
33
|
-
text=":atom_symbol: React Native SDK is published with version: ${{ github.event.inputs.version_name }}"
|
|
34
|
-
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
35
|
-
env:
|
|
36
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
-
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
38
|
-
|
|
39
|
-
release-nh:
|
|
40
|
-
needs: release
|
|
41
|
-
name: Create NH Release
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
|
|
44
|
-
steps:
|
|
45
|
-
- name: Checkout code
|
|
46
|
-
uses: actions/checkout@v3
|
|
47
|
-
with:
|
|
48
|
-
ref: develop-nh
|
|
49
|
-
|
|
50
|
-
- name: Setup node
|
|
51
|
-
uses: actions/setup-node@v3.3.0
|
|
52
|
-
with:
|
|
53
|
-
node-version: 12
|
|
54
|
-
registry-url: https://registry.npmjs.org/
|
|
55
|
-
|
|
56
|
-
- name: Publish RN NH SDK
|
|
57
|
-
run: |
|
|
58
|
-
npm ci
|
|
59
|
-
npm test
|
|
60
|
-
npm publish
|
|
61
|
-
text=":atom_symbol: React Native NH SDK is published with version: ${{ github.event.inputs.version_name }}-nh"
|
|
62
|
-
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
63
|
-
env:
|
|
64
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
65
|
-
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
name: Release Task Merger
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_dispatch:
|
|
5
|
-
inputs:
|
|
6
|
-
version_name:
|
|
7
|
-
required: true
|
|
8
|
-
description: The new version name of the SDK to be released (5.0.2)
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
sdk_releaser:
|
|
12
|
-
if: github.actor == 'sonerdm' || github.actor == 'melih-useinsider'
|
|
13
|
-
name: Trigger mobile-devops repository task merger
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- name: Repository Dispatch
|
|
17
|
-
uses: peter-evans/repository-dispatch@v1
|
|
18
|
-
with:
|
|
19
|
-
token: ${{ secrets.GIT_TOKEN }}
|
|
20
|
-
repository: useinsider/mobile-devops
|
|
21
|
-
event-type: sdk-release-module
|
|
22
|
-
client-payload: '{"repo-name": "react-native-insider", "sdk_version_name": "${{ github.event.inputs.version_name }}"}'
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: Release Version Setter
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
repository_dispatch:
|
|
5
|
-
types: [trigger-release-version-setter]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
release_version_setter:
|
|
9
|
-
name: Run Version Setter
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- name: Checkout code
|
|
13
|
-
uses: actions/checkout@v3
|
|
14
|
-
with:
|
|
15
|
-
ref: develop
|
|
16
|
-
token: ${{ secrets.GIT_TOKEN }}
|
|
17
|
-
|
|
18
|
-
- name: Configure AWS credentials
|
|
19
|
-
uses: aws-actions/configure-aws-credentials@v1
|
|
20
|
-
with:
|
|
21
|
-
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
22
|
-
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
23
|
-
aws-region: eu-west-1
|
|
24
|
-
|
|
25
|
-
- name: Run release_version.sh
|
|
26
|
-
run: |
|
|
27
|
-
./release_version.sh ${{ github.event.client_payload.sdk_version_name }}
|
|
28
|
-
|
|
29
|
-
- name: Push changes to develop
|
|
30
|
-
run: |
|
|
31
|
-
git config --global user.name 'sonerdm'
|
|
32
|
-
git config --global user.email 'soner@useinsider.com'
|
|
33
|
-
git remote set-url origin https://x-access-token:${{ secrets.GIT_TOKEN }}@github.com/${{ github.repository }}
|
|
34
|
-
git commit -am "Release version ${{ github.event.client_payload.sdk_version_name }}"
|
|
35
|
-
git push
|
|
36
|
-
env:
|
|
37
|
-
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
|
38
|
-
|
|
39
|
-
- name: Notify QAs
|
|
40
|
-
run: |
|
|
41
|
-
text=":tatakae: React Native SDK is ready to test with version: ${{ github.event.client_payload.sdk_version_name }} <!subteam^SUUGFQNVA|mobileqa>"
|
|
42
|
-
./slack_notifier.sh mob-deployment mob-sdk-releaser "$text"
|
|
43
|
-
env:
|
|
44
|
-
SLACK_NOTIFIER_AUTH_KEY: ${{ secrets.SLACK_NOTIFIER_AUTH_KEY }}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
name: Security AllInOne
|
|
2
|
-
on:
|
|
3
|
-
push:
|
|
4
|
-
branches:
|
|
5
|
-
- feature/*
|
|
6
|
-
pull_request:
|
|
7
|
-
types:
|
|
8
|
-
- opened
|
|
9
|
-
- closed
|
|
10
|
-
- ready_for_review
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on:
|
|
14
|
-
group: default
|
|
15
|
-
labels: self-hosted
|
|
16
|
-
steps:
|
|
17
|
-
- name: Trigger to Insider Security
|
|
18
|
-
run: |
|
|
19
|
-
curl -X POST -H "Content-Type: application/json" \
|
|
20
|
-
-d '{"type": "security-allinone", "version": "v1", "repository": "${{ github.event.repository.name }}", "ref": "${{ github.head_ref || github.ref_name }}", "event_name": "${{ github.event_name }}", "event_action": "${{ github.event.action }}", "default_branch": "${{ github.event.repository.default_branch }}"}' \
|
|
21
|
-
$INSECPROXY_HOOK
|
|
22
|
-
env:
|
|
23
|
-
INSECPROXY_HOOK: ${{ secrets.INSECPROXY_HOOK }}
|
package/changelog/4.4.1.md
DELETED
package/changelog/5.0.2.md
DELETED
package/release_version.sh
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
NEW_RN_VERSION_NAME=$1
|
|
4
|
-
|
|
5
|
-
packagejson_file_path="package.json"
|
|
6
|
-
podspec_file_path="RNInsider.podspec"
|
|
7
|
-
gradle_file_path="android/build.gradle"
|
|
8
|
-
|
|
9
|
-
CURRENT_RN_SDK_VERSION=$(sed -n 3p $packagejson_file_path | cut -d '"' -f 4)
|
|
10
|
-
|
|
11
|
-
CURRENT_iOS_VERSION=$(sed -n 17p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
|
|
12
|
-
CURRENT_iOS_HYBRID_VERSION=$(sed -n 18p $podspec_file_path | awk '{print $3}' | sed 's/^.//;s/.$//')
|
|
13
|
-
|
|
14
|
-
CURRENT_ANDROID_VERSION=$(sed -n 39p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
|
|
15
|
-
CURRENT_ANDROID_HYBRID_VERSION=$(sed -n 40p $gradle_file_path | awk '{print $2}' | awk -F : '{print $3}' | cut -d "'" -f 1)
|
|
16
|
-
|
|
17
|
-
LATEST_iOS_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOS/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
|
|
18
|
-
LATEST_iOS_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/iOSHybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $2}')
|
|
19
|
-
|
|
20
|
-
LATEST_ANDROID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insider/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}' | cut -d "-" -f 1)
|
|
21
|
-
LATEST_ANDROID_HYBRID_VERSION=$(aws s3 ls s3://mobilesdk.useinsider.com/android/com/useinsider/insiderhybrid/ --recursive | sort | tail -n 1 | awk '{print $4}' | awk -F / '{print $5}')
|
|
22
|
-
|
|
23
|
-
# Set new version in package.json
|
|
24
|
-
sed -i "s/$CURRENT_RN_SDK_VERSION/$NEW_RN_VERSION_NAME/" $packagejson_file_path
|
|
25
|
-
|
|
26
|
-
# Set new version in podspec
|
|
27
|
-
sed -i "s/$CURRENT_iOS_VERSION/$LATEST_iOS_VERSION/;s/$CURRENT_iOS_HYBRID_VERSION/$LATEST_iOS_HYBRID_VERSION/" $podspec_file_path
|
|
28
|
-
|
|
29
|
-
# Set new version in build.gradle
|
|
30
|
-
sed -i "s/$CURRENT_ANDROID_VERSION/$LATEST_ANDROID_VERSION/;s/$CURRENT_ANDROID_HYBRID_VERSION/$LATEST_ANDROID_HYBRID_VERSION/" $gradle_file_path
|
package/slack_notifier.sh
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
SLACK_ENDPOINT="https://mobile.useinsider.com/api/lilith/slack_notifier"
|
|
3
|
-
|
|
4
|
-
CHANNEL=$1
|
|
5
|
-
USERNAME=$2
|
|
6
|
-
TEXT="$3"
|
|
7
|
-
|
|
8
|
-
generate_post_data()
|
|
9
|
-
{
|
|
10
|
-
cat <<EOF
|
|
11
|
-
{
|
|
12
|
-
"auth_key": "$SLACK_NOTIFIER_AUTH_KEY",
|
|
13
|
-
"channel": "$CHANNEL",
|
|
14
|
-
"message": "$TEXT",
|
|
15
|
-
"username": "$USERNAME"
|
|
16
|
-
}
|
|
17
|
-
EOF
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
curl -i -H "Content-Type:application/json" -X POST --data "$(generate_post_data)" $SLACK_ENDPOINT >/dev/null 2>&1
|