airbridge-react-native-sdk-restricted 2.8.6 → 2.8.8
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/.github/actions/add-github-check/action.yml +78 -0
- package/.github/actions/add-github-comment/action.yml +48 -0
- package/.github/actions/add-slack-message/action.yml +32 -0
- package/.github/actions/edit-github-check/action.yml +59 -0
- package/.github/actions/edit-github-comment/action.yml +41 -0
- package/.github/pull_request_template.md +5 -0
- package/.github/readme.md +53 -0
- package/.github/workflows/build.yml +367 -0
- package/.github/workflows/gitflow.yml +20 -0
- package/.github/workflows/release-restricted.yml +35 -0
- package/.github/workflows/release.yml +32 -0
- package/airbridge-react-native-sdk-restricted.podspec +3 -1
- package/android/.settings/org.eclipse.buildship.core.prefs +2 -0
- package/android/src/main/java/co/ab180/airbridge/reactnative/AirbridgeRN.java +19 -4
- package/android/src/main/java/co/ab180/airbridge/reactnative/ConfigReader.java +63 -40
- package/changelog.md +10 -0
- package/ios/AirbridgeRN/ARNConfigReader.h +1 -1
- package/ios/AirbridgeRN/ARNConfigReader.m +13 -15
- package/ios/AirbridgeRN/AirbridgeRN.m +23 -2
- package/ios/copy-config.rb +1 -1
- package/package.json +1 -1
- package/qa/.bundle/config +2 -0
- package/qa/.eslintrc.js +4 -0
- package/qa/.prettierrc.js +7 -0
- package/qa/.watchmanconfig +1 -0
- package/qa/Gemfile +9 -0
- package/qa/Gemfile.lock +105 -0
- package/qa/__tests__/App.test.tsx +17 -0
- package/qa/airbridge.json +7 -0
- package/qa/android/app/build.gradle +130 -0
- package/qa/android/app/debug.keystore +0 -0
- package/qa/android/app/google-services.json +29 -0
- package/qa/android/app/proguard-rules.pro +10 -0
- package/qa/android/app/src/debug/AndroidManifest.xml +9 -0
- package/qa/android/app/src/main/AndroidManifest.xml +65 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/ConfigurationLoader.kt +49 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainActivity.kt +35 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/MainApplication.kt +46 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoInteractor.kt +60 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/DeviceInfoUtils.kt +115 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/IdentifiersInteractor.kt +83 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/InstallReferrerInteractor.kt +91 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/ModuleInjector.kt +22 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/PermissionInteractor.kt +55 -0
- package/qa/android/app/src/main/java/co/ab180/airbridge/qa/application/module/UserInfoInteractor.kt +74 -0
- package/qa/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/qa/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/qa/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/qa/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/qa/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/qa/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/qa/android/app/src/main/res/values/strings.xml +3 -0
- package/qa/android/app/src/main/res/values/styles.xml +9 -0
- package/qa/android/build.gradle +28 -0
- package/qa/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/qa/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/qa/android/gradle.properties +41 -0
- package/qa/android/gradlew +249 -0
- package/qa/android/gradlew.bat +92 -0
- package/qa/android/settings.gradle +4 -0
- package/qa/app.json +4 -0
- package/qa/babel.config.js +3 -0
- package/qa/index.js +5 -0
- package/qa/ios/.xcode.env +11 -0
- package/qa/ios/AirbridgeQA/AirbridgeQA.entitlements +17 -0
- package/qa/ios/AirbridgeQA/AppDelegate.h +6 -0
- package/qa/ios/AirbridgeQA/AppDelegate.mm +123 -0
- package/qa/ios/AirbridgeQA/DeviceInfoInteractor.m +14 -0
- package/qa/ios/AirbridgeQA/DeviceInfoInteractor.swift +151 -0
- package/qa/ios/AirbridgeQA/IdentifiersInteractor.m +14 -0
- package/qa/ios/AirbridgeQA/IdentifiersInteractor.swift +40 -0
- package/qa/ios/AirbridgeQA/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/qa/ios/AirbridgeQA/Images.xcassets/Contents.json +6 -0
- package/qa/ios/AirbridgeQA/Info.plist +66 -0
- package/qa/ios/AirbridgeQA/LaunchScreen.storyboard +47 -0
- package/qa/ios/AirbridgeQA/PermissionInteractor.m +14 -0
- package/qa/ios/AirbridgeQA/PermissionInteractor.swift +19 -0
- package/qa/ios/AirbridgeQA/PrivacyInfo.xcprivacy +39 -0
- package/qa/ios/AirbridgeQA/UserInfoInteractor.m +57 -0
- package/qa/ios/AirbridgeQA/UserInfoInteractor.swift +49 -0
- package/qa/ios/AirbridgeQA/main.m +10 -0
- package/qa/ios/AirbridgeQA.xcodeproj/project.pbxproj +771 -0
- package/qa/ios/AirbridgeQA.xcodeproj/xcshareddata/xcschemes/AirbridgeQA.xcscheme +88 -0
- package/qa/ios/AirbridgeQA.xcworkspace/contents.xcworkspacedata +10 -0
- package/qa/ios/AirbridgeQA.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/qa/ios/AirbridgeQATests/AirbridgeQATests.m +66 -0
- package/qa/ios/AirbridgeQATests/Info.plist +24 -0
- package/qa/ios/GoogleService-Info.plist +30 -0
- package/qa/ios/Library/airbridge-ios-sdk-qa-library.podspec +26 -0
- package/qa/ios/Podfile +44 -0
- package/qa/ios/Podfile.lock +1634 -0
- package/qa/jest.config.js +3 -0
- package/qa/metro.config.js +67 -0
- package/qa/package-lock.json +14289 -0
- package/qa/package.json +47 -0
- package/qa/resource/arrow_back.png +0 -0
- package/qa/resource/home.png +0 -0
- package/qa/resource/info.png +0 -0
- package/qa/resource/link.png +0 -0
- package/qa/resource/refresh.png +0 -0
- package/qa/resource/token.png +0 -0
- package/qa/source/App.js +58 -0
- package/qa/source/common/Colors.js +20 -0
- package/qa/source/common/FCMService.js +94 -0
- package/qa/source/common/Native.ts +39 -0
- package/qa/source/common/Storage.js +13 -0
- package/qa/source/common/Styles.js +39 -0
- package/qa/source/component/AttributeEntryInputDialog.js +117 -0
- package/qa/source/component/AttributeTypeInputDialog.js +100 -0
- package/qa/source/component/ConfirmDialog.js +72 -0
- package/qa/source/component/CustomButton.js +50 -0
- package/qa/source/component/CustomEventParamsDialog.js +150 -0
- package/qa/source/component/CustomTextInput.js +40 -0
- package/qa/source/component/EntryInputDialog.js +89 -0
- package/qa/source/component/HorizontalPreference.js +46 -0
- package/qa/source/component/ImageButton.js +35 -0
- package/qa/source/component/InjectInputDialog.js +80 -0
- package/qa/source/component/MessageDialog.js +81 -0
- package/qa/source/component/UrlInputDialog.js +80 -0
- package/qa/source/component/ValueInputDialog.js +80 -0
- package/qa/source/component/VerticalPreference.js +42 -0
- package/qa/source/navigations/Stack.js +110 -0
- package/qa/source/pages/Browse.js +118 -0
- package/qa/source/pages/DeviceInfo.js +135 -0
- package/qa/source/pages/Event.js +171 -0
- package/qa/source/pages/Home.js +136 -0
- package/qa/source/pages/Identifiers.js +108 -0
- package/qa/source/pages/InstallReferrer.js +64 -0
- package/qa/source/pages/Placement.js +38 -0
- package/qa/source/pages/RequestPermissions.tsx +41 -0
- package/qa/source/pages/UserInfo.js +168 -0
- package/qa/source/pages/appInfo.js +22 -0
- package/qa/tsconfig.json +3 -0
- package/scripts/addiOSFramework.js +48 -0
- package/scripts/build-qa.sh +64 -0
- package/scripts/change_restricted.sh +21 -0
- package/scripts/update_native_version.sh +104 -0
- package/src/State.js +10 -2
- package/src/WebInterface.js +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: gitflow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- synchronize
|
|
8
|
+
- reopened
|
|
9
|
+
- closed
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- develop
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
gitflow:
|
|
16
|
+
uses: ab180/gitflow/.github/workflows/gitflow.yml@v2
|
|
17
|
+
secrets:
|
|
18
|
+
GITHUB_APP_ID: ${{ secrets.SDK_TEAM_APP_ID }}
|
|
19
|
+
GITHUB_APP_PRIVATE_KEY: ${{ secrets.SDK_TEAM_APP_PRIVATE_KEY }}
|
|
20
|
+
GITHUB_APP_OWNER: ab180
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: release-restricted
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- closed
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release-restricted:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
if: |
|
|
14
|
+
github.event.pull_request.merged == true
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v3
|
|
19
|
+
|
|
20
|
+
- name: Prepare node
|
|
21
|
+
uses: actions/setup-node@v3
|
|
22
|
+
with:
|
|
23
|
+
node-version: 18
|
|
24
|
+
registry-url: 'https://registry.npmjs.org'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: change restricted
|
|
30
|
+
run: sh scripts/change_restricted.sh
|
|
31
|
+
|
|
32
|
+
- name: Publish
|
|
33
|
+
env:
|
|
34
|
+
NODE_AUTH_TOKEN: ${{ secrets.SDK_TEAM_NPM_AUTOMATION_TOKEN }}
|
|
35
|
+
run: npm publish
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- closed
|
|
7
|
+
branches:
|
|
8
|
+
- main
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
release:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
if: |
|
|
14
|
+
github.event.pull_request.merged == true
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout
|
|
18
|
+
uses: actions/checkout@v3
|
|
19
|
+
|
|
20
|
+
- name: Prepare node
|
|
21
|
+
uses: actions/setup-node@v3
|
|
22
|
+
with:
|
|
23
|
+
node-version: 18
|
|
24
|
+
registry-url: 'https://registry.npmjs.org'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: Publish
|
|
30
|
+
env:
|
|
31
|
+
NODE_AUTH_TOKEN: ${{ secrets.SDK_TEAM_NPM_AUTOMATION_TOKEN }}
|
|
32
|
+
run: npm publish
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
require 'json'
|
|
2
|
+
require 'pathname'
|
|
2
3
|
require_relative 'ios/copy-config.rb'
|
|
3
4
|
|
|
4
5
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
6
|
+
source = Pathname.new(Dir.pwd).relative_path_from(Pathname.new(__dir__)).to_s
|
|
5
7
|
|
|
6
8
|
Pod::Spec.new do |s|
|
|
7
9
|
s.name = package['name']
|
|
@@ -11,7 +13,7 @@ Pod::Spec.new do |s|
|
|
|
11
13
|
s.license = package['license']
|
|
12
14
|
s.author = package['author']
|
|
13
15
|
s.homepage = package['homepage']
|
|
14
|
-
s.source = { :http => 'file:' +
|
|
16
|
+
s.source = { :http => 'file:' + source }
|
|
15
17
|
|
|
16
18
|
s.requires_arc = true
|
|
17
19
|
s.platform = :ios, '11.0'
|
|
@@ -12,8 +12,10 @@ import com.facebook.react.uimanager.ViewManager;
|
|
|
12
12
|
import java.util.Arrays;
|
|
13
13
|
import java.util.Collections;
|
|
14
14
|
import java.util.List;
|
|
15
|
+
import java.util.Map;
|
|
15
16
|
|
|
16
17
|
import javax.annotation.Nonnull;
|
|
18
|
+
import javax.annotation.Nullable;
|
|
17
19
|
|
|
18
20
|
import co.ab180.airbridge.Airbridge;
|
|
19
21
|
|
|
@@ -35,12 +37,25 @@ public class AirbridgeRN implements ReactPackage {
|
|
|
35
37
|
* @param appToken
|
|
36
38
|
* App Token
|
|
37
39
|
*/
|
|
38
|
-
public static void init(
|
|
39
|
-
|
|
40
|
+
public static void init(
|
|
41
|
+
@Nonnull Application application,
|
|
42
|
+
@Nonnull String appName,
|
|
43
|
+
@Nonnull String appToken
|
|
44
|
+
) {
|
|
45
|
+
init(application, appName, appToken, null);
|
|
40
46
|
}
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
private static void init(
|
|
49
|
+
@Nonnull Application application,
|
|
50
|
+
@Nonnull String appName,
|
|
51
|
+
@Nonnull String appToken,
|
|
52
|
+
@Nullable Map<String, Object> airbridgeJSON
|
|
53
|
+
) {
|
|
54
|
+
Airbridge.init(application, ConfigReader.build(application, appName, appToken, airbridgeJSON));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/**
|
|
44
59
|
* Use this method to fetch the correct deep links in exceptional circumstances.
|
|
45
60
|
*
|
|
46
61
|
* When your app is opened by tapping a push notification,
|
|
@@ -14,37 +14,52 @@ import java.io.InputStreamReader;
|
|
|
14
14
|
import java.util.Map;
|
|
15
15
|
import java.util.HashMap;
|
|
16
16
|
|
|
17
|
+
import javax.annotation.Nonnull;
|
|
18
|
+
import javax.annotation.Nullable;
|
|
19
|
+
|
|
17
20
|
import co.ab180.airbridge.AirbridgeConfig;
|
|
18
21
|
import co.ab180.airbridge.OnAttributionResultReceiveListener;
|
|
19
22
|
|
|
20
23
|
class ConfigReader {
|
|
21
|
-
private ConfigReader() {
|
|
24
|
+
private ConfigReader() {
|
|
25
|
+
}
|
|
22
26
|
|
|
23
|
-
static AirbridgeConfig build(
|
|
27
|
+
static AirbridgeConfig build(
|
|
28
|
+
@Nonnull Context context,
|
|
29
|
+
@Nonnull String appName,
|
|
30
|
+
@Nonnull String appToken,
|
|
31
|
+
@Nullable Map<String, Object> airbridgeJSON
|
|
32
|
+
) {
|
|
24
33
|
AirbridgeConfig.Builder configBuilder = new AirbridgeConfig.Builder(appName, appToken);
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
AssetManager assetManager = context.getAssets();
|
|
28
|
-
try {
|
|
29
|
-
BufferedReader reader = new BufferedReader(
|
|
30
|
-
new InputStreamReader(
|
|
31
|
-
assetManager.open("airbridge.json")
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
StringBuilder builder = new StringBuilder();
|
|
35
|
+
setJsonObject(context, configBuilder, airbridgeJSON);
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
configBuilder.setPlatform("react_native");
|
|
38
|
+
|
|
39
|
+
configBuilder.setLifecycleIntegration(activity -> {
|
|
40
|
+
AirbridgeLifecycleIntegration callback = AirbridgeLifecycle.getLifecycleIntegration();
|
|
41
|
+
if (callback == null) {
|
|
42
|
+
return null;
|
|
43
|
+
} else {
|
|
44
|
+
return callback.getDataString(activity);
|
|
41
45
|
}
|
|
46
|
+
});
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
+
configBuilder.setOnAttributionResultReceiveListener(AirbridgeAttribution::processAttribution);
|
|
49
|
+
|
|
50
|
+
return configBuilder.build();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private static void setJsonObject(
|
|
54
|
+
@Nonnull Context context,
|
|
55
|
+
AirbridgeConfig.Builder configBuilder,
|
|
56
|
+
@Nullable Map<String, Object> airbridgeJSON) {
|
|
57
|
+
|
|
58
|
+
JSONObject configObject;
|
|
59
|
+
if (airbridgeJSON == null) {
|
|
60
|
+
configObject = loadJsonAsset(context);
|
|
61
|
+
} else {
|
|
62
|
+
configObject = loadAirbridgeJSON(airbridgeJSON);
|
|
48
63
|
}
|
|
49
64
|
|
|
50
65
|
Number sessionTimeoutSeconds = Get.type(Number.class, configObject, "sessionTimeoutSeconds");
|
|
@@ -105,27 +120,35 @@ class ConfigReader {
|
|
|
105
120
|
resultLogLevel = resultLogLevel != null ? resultLogLevel : Log.WARN;
|
|
106
121
|
configBuilder.setLogLevel(resultLogLevel);
|
|
107
122
|
|
|
108
|
-
|
|
123
|
+
}
|
|
109
124
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
});
|
|
125
|
+
private static JSONObject loadJsonAsset(@Nonnull Context context) {
|
|
126
|
+
JSONObject configObject = null;
|
|
127
|
+
AssetManager assetManager = context.getAssets();
|
|
128
|
+
try {
|
|
129
|
+
BufferedReader reader = new BufferedReader(
|
|
130
|
+
new InputStreamReader(assetManager.open("airbridge.json"))
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
StringBuilder builder = new StringBuilder();
|
|
121
134
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
135
|
+
String line = reader.readLine();
|
|
136
|
+
while (line != null) {
|
|
137
|
+
builder.append(line);
|
|
138
|
+
line = reader.readLine();
|
|
126
139
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
140
|
+
|
|
141
|
+
configObject = new JSONObject(builder.toString());
|
|
142
|
+
} catch (IOException ignored) {
|
|
143
|
+
// when do not use airbridge.json file
|
|
144
|
+
} catch (JSONException e) {
|
|
145
|
+
Log.w("AirbridgeRN", "airbridge.json is not json format");
|
|
146
|
+
}
|
|
147
|
+
return configObject;
|
|
130
148
|
}
|
|
149
|
+
|
|
150
|
+
private static JSONObject loadAirbridgeJSON(@Nonnull Map<String, Object> airbridgeJSON) {
|
|
151
|
+
return new JSONObject(airbridgeJSON);
|
|
152
|
+
}
|
|
153
|
+
|
|
131
154
|
}
|
package/changelog.md
CHANGED
|
@@ -15,51 +15,49 @@
|
|
|
15
15
|
|
|
16
16
|
@implementation ARNConfigReader
|
|
17
17
|
|
|
18
|
-
+ (void)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (data != nil) {
|
|
23
|
-
json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
|
18
|
+
+ (void)apply:(NSDictionary*)airbridgeJSON {
|
|
19
|
+
NSDictionary* dictionary = airbridgeJSON;
|
|
20
|
+
if (dictionary == nil) {
|
|
21
|
+
return;
|
|
24
22
|
}
|
|
25
23
|
|
|
26
|
-
NSNumber* sessionTimeoutSeconds = [ARNGet type:NSNumber.class dictionary:
|
|
24
|
+
NSNumber* sessionTimeoutSeconds = [ARNGet type:NSNumber.class dictionary:dictionary key:@"sessionTimeoutSeconds"];
|
|
27
25
|
if (sessionTimeoutSeconds != nil) {
|
|
28
26
|
[AirBridge setSessionTimeout:sessionTimeoutSeconds.intValue * 1000];
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
NSNumber* autoStartTrackingEnabled = [ARNGet type:NSNumber.class dictionary:
|
|
29
|
+
NSNumber* autoStartTrackingEnabled = [ARNGet type:NSNumber.class dictionary:dictionary key:@"autoStartTrackingEnabled"];
|
|
32
30
|
if (autoStartTrackingEnabled != nil) {
|
|
33
31
|
[AirBridge setAutoStartTrackingEnabled:autoStartTrackingEnabled.boolValue];
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
NSNumber* userInfoHashEnabled = [ARNGet type:NSNumber.class dictionary:
|
|
34
|
+
NSNumber* userInfoHashEnabled = [ARNGet type:NSNumber.class dictionary:dictionary key:@"userInfoHashEnabled"];
|
|
37
35
|
if (userInfoHashEnabled != nil) {
|
|
38
36
|
[AirBridge setIsUserInfoHashed:userInfoHashEnabled.boolValue];
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
NSNumber* trackAirbridgeLinkOnly = [ARNGet type:NSNumber.class dictionary:
|
|
39
|
+
NSNumber* trackAirbridgeLinkOnly = [ARNGet type:NSNumber.class dictionary:dictionary key:@"trackAirbridgeLinkOnly"];
|
|
42
40
|
if (trackAirbridgeLinkOnly != nil) {
|
|
43
41
|
[AirBridge setIsTrackAirbridgeDeeplinkOnly:trackAirbridgeLinkOnly.boolValue];
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
NSNumber* facebookDeferredAppLinkEnabled = [ARNGet type:NSNumber.class dictionary:
|
|
44
|
+
NSNumber* facebookDeferredAppLinkEnabled = [ARNGet type:NSNumber.class dictionary:dictionary key:@"facebookDeferredAppLinkEnabled"];
|
|
47
45
|
if (facebookDeferredAppLinkEnabled != nil) {
|
|
48
46
|
[AirBridge setIsFacebookDeferredAppLinkEnabled:facebookDeferredAppLinkEnabled.boolValue];
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
NSNumber* trackingAuthorizeTimeoutSeconds = [ARNGet type:NSNumber.class dictionary:
|
|
49
|
+
NSNumber* trackingAuthorizeTimeoutSeconds = [ARNGet type:NSNumber.class dictionary:dictionary key:@"trackingAuthorizeTimeoutSeconds"];
|
|
52
50
|
if (trackingAuthorizeTimeoutSeconds != nil) {
|
|
53
51
|
AirBridge.setting.trackingAuthorizeTimeout = trackingAuthorizeTimeoutSeconds.unsignedLongLongValue * 1000;
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
NSString* secretID = [ARNGet type:NSString.class dictionary:
|
|
57
|
-
NSString* secretKey = [ARNGet type:NSString.class dictionary:
|
|
54
|
+
NSString* secretID = [ARNGet type:NSString.class dictionary:dictionary key:@"sdkSignatureSecretID"];
|
|
55
|
+
NSString* secretKey = [ARNGet type:NSString.class dictionary:dictionary key:@"sdkSignatureSecret"];
|
|
58
56
|
if (secretID != nil && secretKey != nil) {
|
|
59
57
|
[AirBridge setSDKSignatureSecretWithID:secretID secret:secretKey];
|
|
60
58
|
}
|
|
61
59
|
|
|
62
|
-
NSString* logLevel = [ARNGet type:NSString.class dictionary:
|
|
60
|
+
NSString* logLevel = [ARNGet type:NSString.class dictionary:dictionary key:@"logLevel"] ?: @"";
|
|
63
61
|
[AirBridge setLogLevel:(
|
|
64
62
|
[@{
|
|
65
63
|
@"debug": @(AB_LOG_DEBUG),
|
|
@@ -27,8 +27,29 @@ static AirbridgeRN* instance;
|
|
|
27
27
|
return instance;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
+ (AirbridgeRN*)getInstance:(NSString*)appToken
|
|
31
|
-
|
|
30
|
+
+ (AirbridgeRN*)getInstance:(NSString*)appToken
|
|
31
|
+
appName:(NSString*)appName
|
|
32
|
+
withLaunchOptions:(nullable NSDictionary*)launchOptions
|
|
33
|
+
{
|
|
34
|
+
NSString* path = [NSBundle.mainBundle pathForResource:@"airbridge" ofType:@"json"];
|
|
35
|
+
NSData* data = [NSData dataWithContentsOfFile:path];
|
|
36
|
+
NSDictionary* airbridgeJSON = nil;
|
|
37
|
+
if (data != nil) {
|
|
38
|
+
airbridgeJSON = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return [AirbridgeRN getInstance:appToken
|
|
42
|
+
appName:appName
|
|
43
|
+
withAirbridgeJSON:airbridgeJSON
|
|
44
|
+
withLaunchOptions:launchOptions];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
+ (AirbridgeRN*)getInstance:(NSString*)appToken
|
|
48
|
+
appName:(NSString*)appName
|
|
49
|
+
withAirbridgeJSON:(nullable NSDictionary*)airbridgeJSON
|
|
50
|
+
withLaunchOptions:(nullable NSDictionary*)launchOptions
|
|
51
|
+
{
|
|
52
|
+
[ARNConfigReader apply:airbridgeJSON];
|
|
32
53
|
|
|
33
54
|
[AirBridge getInstance:appToken appName:appName withLaunchOptions:launchOptions];
|
|
34
55
|
[AirbridgeDeeplink setInitialDeeplinkCallback];
|
package/ios/copy-config.rb
CHANGED
package/package.json
CHANGED
package/qa/.eslintrc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/qa/Gemfile
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
source 'https://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
|
|
4
|
+
ruby ">= 2.6.10"
|
|
5
|
+
|
|
6
|
+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
|
|
7
|
+
# bound in the template on Cocoapods with next React Native release.
|
|
8
|
+
gem 'cocoapods', '>= 1.13', '< 1.15'
|
|
9
|
+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
|
package/qa/Gemfile.lock
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
GEM
|
|
2
|
+
remote: https://rubygems.org/
|
|
3
|
+
specs:
|
|
4
|
+
CFPropertyList (3.0.7)
|
|
5
|
+
base64
|
|
6
|
+
nkf
|
|
7
|
+
rexml
|
|
8
|
+
activesupport (7.0.8.4)
|
|
9
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
10
|
+
i18n (>= 1.6, < 2)
|
|
11
|
+
minitest (>= 5.1)
|
|
12
|
+
tzinfo (~> 2.0)
|
|
13
|
+
addressable (2.8.6)
|
|
14
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
15
|
+
algoliasearch (1.27.5)
|
|
16
|
+
httpclient (~> 2.8, >= 2.8.3)
|
|
17
|
+
json (>= 1.5.1)
|
|
18
|
+
atomos (0.1.3)
|
|
19
|
+
base64 (0.2.0)
|
|
20
|
+
claide (1.1.0)
|
|
21
|
+
cocoapods (1.14.3)
|
|
22
|
+
addressable (~> 2.8)
|
|
23
|
+
claide (>= 1.0.2, < 2.0)
|
|
24
|
+
cocoapods-core (= 1.14.3)
|
|
25
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
26
|
+
cocoapods-downloader (>= 2.1, < 3.0)
|
|
27
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
28
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
|
29
|
+
cocoapods-trunk (>= 1.6.0, < 2.0)
|
|
30
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
|
31
|
+
colored2 (~> 3.1)
|
|
32
|
+
escape (~> 0.0.4)
|
|
33
|
+
fourflusher (>= 2.3.0, < 3.0)
|
|
34
|
+
gh_inspector (~> 1.0)
|
|
35
|
+
molinillo (~> 0.8.0)
|
|
36
|
+
nap (~> 1.0)
|
|
37
|
+
ruby-macho (>= 2.3.0, < 3.0)
|
|
38
|
+
xcodeproj (>= 1.23.0, < 2.0)
|
|
39
|
+
cocoapods-core (1.14.3)
|
|
40
|
+
activesupport (>= 5.0, < 8)
|
|
41
|
+
addressable (~> 2.8)
|
|
42
|
+
algoliasearch (~> 1.0)
|
|
43
|
+
concurrent-ruby (~> 1.1)
|
|
44
|
+
fuzzy_match (~> 2.0.4)
|
|
45
|
+
nap (~> 1.0)
|
|
46
|
+
netrc (~> 0.11)
|
|
47
|
+
public_suffix (~> 4.0)
|
|
48
|
+
typhoeus (~> 1.0)
|
|
49
|
+
cocoapods-deintegrate (1.0.5)
|
|
50
|
+
cocoapods-downloader (2.1)
|
|
51
|
+
cocoapods-plugins (1.0.0)
|
|
52
|
+
nap
|
|
53
|
+
cocoapods-search (1.0.1)
|
|
54
|
+
cocoapods-trunk (1.6.0)
|
|
55
|
+
nap (>= 0.8, < 2.0)
|
|
56
|
+
netrc (~> 0.11)
|
|
57
|
+
cocoapods-try (1.2.0)
|
|
58
|
+
colored2 (3.1.2)
|
|
59
|
+
concurrent-ruby (1.3.3)
|
|
60
|
+
escape (0.0.4)
|
|
61
|
+
ethon (0.16.0)
|
|
62
|
+
ffi (>= 1.15.0)
|
|
63
|
+
ffi (1.17.0)
|
|
64
|
+
fourflusher (2.3.1)
|
|
65
|
+
fuzzy_match (2.0.4)
|
|
66
|
+
gh_inspector (1.1.3)
|
|
67
|
+
httpclient (2.8.3)
|
|
68
|
+
i18n (1.14.5)
|
|
69
|
+
concurrent-ruby (~> 1.0)
|
|
70
|
+
json (2.7.2)
|
|
71
|
+
minitest (5.23.1)
|
|
72
|
+
molinillo (0.8.0)
|
|
73
|
+
nanaimo (0.3.0)
|
|
74
|
+
nap (1.1.0)
|
|
75
|
+
netrc (0.11.0)
|
|
76
|
+
nkf (0.2.0)
|
|
77
|
+
public_suffix (4.0.7)
|
|
78
|
+
rexml (3.2.9)
|
|
79
|
+
strscan
|
|
80
|
+
ruby-macho (2.5.1)
|
|
81
|
+
strscan (3.1.0)
|
|
82
|
+
typhoeus (1.4.1)
|
|
83
|
+
ethon (>= 0.9.0)
|
|
84
|
+
tzinfo (2.0.6)
|
|
85
|
+
concurrent-ruby (~> 1.0)
|
|
86
|
+
xcodeproj (1.24.0)
|
|
87
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
|
88
|
+
atomos (~> 0.1.3)
|
|
89
|
+
claide (>= 1.0.2, < 2.0)
|
|
90
|
+
colored2 (~> 3.1)
|
|
91
|
+
nanaimo (~> 0.3.0)
|
|
92
|
+
rexml (~> 3.2.4)
|
|
93
|
+
|
|
94
|
+
PLATFORMS
|
|
95
|
+
ruby
|
|
96
|
+
|
|
97
|
+
DEPENDENCIES
|
|
98
|
+
activesupport (>= 6.1.7.5, < 7.1.0)
|
|
99
|
+
cocoapods (>= 1.13, < 1.15)
|
|
100
|
+
|
|
101
|
+
RUBY VERSION
|
|
102
|
+
ruby 3.3.0p0
|
|
103
|
+
|
|
104
|
+
BUNDLED WITH
|
|
105
|
+
2.5.4
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @format
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import 'react-native';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import App from '../App';
|
|
8
|
+
|
|
9
|
+
// Note: import explicitly to use the types shipped with jest.
|
|
10
|
+
import {it} from '@jest/globals';
|
|
11
|
+
|
|
12
|
+
// Note: test renderer must be required after react-native.
|
|
13
|
+
import renderer from 'react-test-renderer';
|
|
14
|
+
|
|
15
|
+
it('renders correctly', () => {
|
|
16
|
+
renderer.create(<App />);
|
|
17
|
+
});
|