@snowplow/react-native-tracker 2.1.2 → 4.0.2-dev.1
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/LICENSE +29 -203
- package/README.md +59 -143
- package/dist/commonjs/event_store.js +150 -0
- package/dist/commonjs/event_store.js.map +1 -0
- package/dist/commonjs/events.js +42 -0
- package/dist/commonjs/events.js.map +1 -0
- package/dist/commonjs/index.js +29 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/subject.js +82 -0
- package/dist/commonjs/subject.js.map +1 -0
- package/dist/commonjs/tracker.js +77 -0
- package/dist/commonjs/tracker.js.map +1 -0
- package/dist/commonjs/types.js +223 -0
- package/dist/commonjs/types.js.map +1 -0
- package/dist/module/event_store.js +145 -0
- package/dist/module/event_store.js.map +1 -0
- package/dist/module/events.js +38 -0
- package/dist/module/events.js.map +1 -0
- package/dist/module/index.js +7 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/subject.js +78 -0
- package/dist/module/subject.js.map +1 -0
- package/dist/module/tracker.js +74 -0
- package/dist/module/tracker.js.map +1 -0
- package/dist/module/types.js +73 -0
- package/dist/module/types.js.map +1 -0
- package/dist/typescript/commonjs/package.json +1 -0
- package/dist/typescript/commonjs/src/event_store.d.ts +4 -0
- package/dist/typescript/commonjs/src/event_store.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/events.d.ts +10 -0
- package/dist/typescript/commonjs/src/events.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/index.d.ts +4 -0
- package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/subject.d.ts +19 -0
- package/dist/typescript/commonjs/src/subject.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/tracker.d.ts +9 -0
- package/dist/typescript/commonjs/src/tracker.d.ts.map +1 -0
- package/dist/typescript/commonjs/src/types.d.ts +452 -0
- package/dist/typescript/commonjs/src/types.d.ts.map +1 -0
- package/dist/typescript/module/package.json +1 -0
- package/dist/typescript/module/src/event_store.d.ts +4 -0
- package/dist/typescript/module/src/event_store.d.ts.map +1 -0
- package/dist/typescript/module/src/events.d.ts +10 -0
- package/dist/typescript/module/src/events.d.ts.map +1 -0
- package/dist/typescript/module/src/index.d.ts +4 -0
- package/dist/typescript/module/src/index.d.ts.map +1 -0
- package/dist/typescript/module/src/subject.d.ts +19 -0
- package/dist/typescript/module/src/subject.d.ts.map +1 -0
- package/dist/typescript/module/src/tracker.d.ts +9 -0
- package/dist/typescript/module/src/tracker.d.ts.map +1 -0
- package/dist/typescript/module/src/types.d.ts +452 -0
- package/dist/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +75 -147
- package/.editorconfig +0 -15
- package/.eslintignore +0 -6
- package/.gitattributes +0 -3
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/actions/setup/action.yml +0 -28
- package/.github/workflows/build.yml +0 -155
- package/.github/workflows/deploy.yml +0 -97
- package/.github/workflows/e2e-android.yml +0 -121
- package/.github/workflows/e2e-ios.yml +0 -95
- package/.github/workflows/snyk.yml +0 -21
- package/.gitignore +0 -70
- package/.npmignore +0 -60
- package/.nvmrc +0 -1
- package/.watchmanconfig +0 -1
- package/.yarnrc +0 -3
- package/CHANGELOG +0 -184
- package/CONTRIBUTING.md +0 -80
- package/android/build.gradle +0 -110
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/android/gradle.properties +0 -5
- package/android/gradlew +0 -234
- package/android/gradlew.bat +0 -89
- package/android/src/main/AndroidManifest.xml +0 -3
- package/android/src/main/AndroidManifestNew.xml +0 -2
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerModule.kt +0 -744
- package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerPackage.kt +0 -17
- package/android/src/main/java/com/snowplow/reactnativetracker/util/ConfigUtil.kt +0 -274
- package/android/src/main/java/com/snowplow/reactnativetracker/util/EventUtil.kt +0 -233
- package/android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt +0 -5
- package/babel.config.js +0 -3
- package/example/.watchmanconfig +0 -1
- package/example/Gemfile +0 -6
- package/example/android/app/build.gradle +0 -129
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +0 -10
- package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTest.java +0 -36
- package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTestAppJUnitRunner.java +0 -21
- package/example/android/app/src/debug/AndroidManifest.xml +0 -13
- package/example/android/app/src/debug/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -75
- package/example/android/app/src/main/AndroidManifest.xml +0 -26
- package/example/android/app/src/main/java/com/reactnativetrackerexample/MainActivity.java +0 -32
- package/example/android/app/src/main/java/com/reactnativetrackerexample/MainApplication.java +0 -62
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +0 -3
- package/example/android/app/src/main/res/values/styles.xml +0 -9
- package/example/android/app/src/release/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -20
- package/example/android/build.gradle +0 -31
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/example/android/gradle.properties +0 -44
- package/example/android/gradlew +0 -244
- package/example/android/gradlew.bat +0 -92
- package/example/android/settings.gradle +0 -4
- package/example/app.json +0 -4
- package/example/babel.config.js +0 -17
- package/example/detox.config.js +0 -92
- package/example/e2e/config.json +0 -10
- package/example/e2e/emitEvents.e2e.detox.js +0 -95
- package/example/e2e/environment.js +0 -23
- package/example/e2e/helpers/microCommands.js +0 -140
- package/example/e2e/helpers/microHelpers.js +0 -333
- package/example/e2e/helpers/microHelpers.test.js +0 -295
- package/example/e2e/helpers/schemas.js +0 -49
- package/example/e2e/jest.config.js +0 -16
- package/example/e2e/setup.js +0 -4
- package/example/e2e/testEvents.micro.test.js +0 -287
- package/example/index.js +0 -5
- package/example/ios/.xcode.env +0 -11
- package/example/ios/Podfile +0 -62
- package/example/ios/Podfile.lock +0 -730
- package/example/ios/ReactNativeTrackerExample/AppDelegate.h +0 -6
- package/example/ios/ReactNativeTrackerExample/AppDelegate.mm +0 -26
- package/example/ios/ReactNativeTrackerExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
- package/example/ios/ReactNativeTrackerExample/Images.xcassets/Contents.json +0 -6
- package/example/ios/ReactNativeTrackerExample/Info.plist +0 -55
- package/example/ios/ReactNativeTrackerExample/LaunchScreen.storyboard +0 -47
- package/example/ios/ReactNativeTrackerExample/PrivacyInfo.xcprivacy +0 -37
- package/example/ios/ReactNativeTrackerExample/main.m +0 -10
- package/example/ios/ReactNativeTrackerExample-Bridging-Header.h +0 -3
- package/example/ios/ReactNativeTrackerExample.xcodeproj/project.pbxproj +0 -739
- package/example/ios/ReactNativeTrackerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeTrackerExample.xcscheme +0 -88
- package/example/ios/ReactNativeTrackerExample.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/ReactNativeTrackerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/ReactNativeTrackerExampleTests/Info.plist +0 -24
- package/example/ios/ReactNativeTrackerExampleTests/ReactNativeTrackerExampleTests.m +0 -66
- package/example/metro.config.js +0 -45
- package/example/package.json +0 -54
- package/example/react-native.config.js +0 -10
- package/example/src/App.js +0 -566
- package/example/tsconfig.json +0 -5
- package/example/yarn.lock +0 -7703
- package/ios/ReactNativeTracker-Bridging-Header.h +0 -2
- package/ios/ReactNativeTracker.mm +0 -171
- package/ios/ReactNativeTracker.swift +0 -822
- package/ios/ReactNativeTracker.xcodeproj/project.pbxproj +0 -301
- package/ios/Util/ConfigUtils.swift +0 -209
- package/ios/Util/TrackerVersion.swift +0 -3
- package/ios/Util/Utilities.swift +0 -37
- package/lefthook.yml +0 -11
- package/lib/commonjs/api.js +0 -490
- package/lib/commonjs/api.js.map +0 -1
- package/lib/commonjs/configurations.js +0 -196
- package/lib/commonjs/configurations.js.map +0 -1
- package/lib/commonjs/constants.js +0 -77
- package/lib/commonjs/constants.js.map +0 -1
- package/lib/commonjs/events.js +0 -277
- package/lib/commonjs/events.js.map +0 -1
- package/lib/commonjs/index.js +0 -132
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/jsCore.js +0 -427
- package/lib/commonjs/jsCore.js.map +0 -1
- package/lib/commonjs/native.js +0 -16
- package/lib/commonjs/native.js.map +0 -1
- package/lib/commonjs/subject.js +0 -235
- package/lib/commonjs/subject.js.map +0 -1
- package/lib/commonjs/tracker.js +0 -248
- package/lib/commonjs/tracker.js.map +0 -1
- package/lib/commonjs/types.js +0 -2
- package/lib/commonjs/types.js.map +0 -1
- package/lib/commonjs/utils.js +0 -72
- package/lib/commonjs/utils.js.map +0 -1
- package/lib/commonjs/webViewInterface.js +0 -66
- package/lib/commonjs/webViewInterface.js.map +0 -1
- package/lib/module/api.js +0 -452
- package/lib/module/api.js.map +0 -1
- package/lib/module/configurations.js +0 -184
- package/lib/module/configurations.js.map +0 -1
- package/lib/module/constants.js +0 -72
- package/lib/module/constants.js.map +0 -1
- package/lib/module/events.js +0 -259
- package/lib/module/events.js.map +0 -1
- package/lib/module/index.js +0 -120
- package/lib/module/index.js.map +0 -1
- package/lib/module/jsCore.js +0 -424
- package/lib/module/jsCore.js.map +0 -1
- package/lib/module/native.js +0 -12
- package/lib/module/native.js.map +0 -1
- package/lib/module/subject.js +0 -222
- package/lib/module/subject.js.map +0 -1
- package/lib/module/tracker.js +0 -234
- package/lib/module/tracker.js.map +0 -1
- package/lib/module/types.js +0 -2
- package/lib/module/types.js.map +0 -1
- package/lib/module/utils.js +0 -66
- package/lib/module/utils.js.map +0 -1
- package/lib/module/webViewInterface.js +0 -62
- package/lib/module/webViewInterface.js.map +0 -1
- package/lib/typescript/__tests__/api.test.d.ts +0 -2
- package/lib/typescript/__tests__/api.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/configurations.test.d.ts +0 -2
- package/lib/typescript/__tests__/configurations.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/events.test.d.ts +0 -2
- package/lib/typescript/__tests__/events.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/index.test.d.ts +0 -2
- package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/jsCore.test.d.ts +0 -2
- package/lib/typescript/__tests__/jsCore.test.d.ts.map +0 -1
- package/lib/typescript/__tests__/utils.test.d.ts +0 -2
- package/lib/typescript/__tests__/utils.test.d.ts.map +0 -1
- package/lib/typescript/api.d.ts +0 -240
- package/lib/typescript/api.d.ts.map +0 -1
- package/lib/typescript/configurations.d.ts +0 -73
- package/lib/typescript/configurations.d.ts.map +0 -1
- package/lib/typescript/constants.d.ts +0 -64
- package/lib/typescript/constants.d.ts.map +0 -1
- package/lib/typescript/events.d.ts +0 -115
- package/lib/typescript/events.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -27
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/jsCore.d.ts +0 -152
- package/lib/typescript/jsCore.d.ts.map +0 -1
- package/lib/typescript/native.d.ts +0 -4
- package/lib/typescript/native.d.ts.map +0 -1
- package/lib/typescript/subject.d.ts +0 -91
- package/lib/typescript/subject.d.ts.map +0 -1
- package/lib/typescript/tracker.d.ts +0 -111
- package/lib/typescript/tracker.d.ts.map +0 -1
- package/lib/typescript/types.d.ts +0 -981
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/typescript/utils.d.ts +0 -35
- package/lib/typescript/utils.d.ts.map +0 -1
- package/lib/typescript/webViewInterface.d.ts +0 -15
- package/lib/typescript/webViewInterface.d.ts.map +0 -1
- package/scripts/bootstrap.js +0 -29
- package/snowplow-react-native-tracker.podspec +0 -42
- package/src/__mocks__/react-native.js +0 -7
- package/src/__tests__/api.test.ts +0 -21
- package/src/__tests__/configurations.test.ts +0 -608
- package/src/__tests__/events.test.ts +0 -736
- package/src/__tests__/index.test.ts +0 -14
- package/src/__tests__/jsCore.test.ts +0 -199
- package/src/__tests__/utils.test.ts +0 -10
- package/src/api.ts +0 -556
- package/src/configurations.ts +0 -325
- package/src/constants.ts +0 -97
- package/src/events.ts +0 -355
- package/src/index.ts +0 -184
- package/src/jsCore.ts +0 -603
- package/src/native.ts +0 -21
- package/src/subject.ts +0 -302
- package/src/tracker.ts +0 -377
- package/src/types.ts +0 -1162
- package/src/utils.ts +0 -65
- package/src/webViewInterface.ts +0 -92
- package/tsconfig.build.json +0 -5
- package/tsconfig.json +0 -28
- package/turbo.json +0 -34
- package/yarn.lock +0 -9398
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Add project specific ProGuard rules here.
|
|
2
|
-
# By default, the flags in this file are appended to flags specified
|
|
3
|
-
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
|
|
4
|
-
# You can edit the include path and order by changing the proguardFiles
|
|
5
|
-
# directive in build.gradle.
|
|
6
|
-
#
|
|
7
|
-
# For more details, see
|
|
8
|
-
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
9
|
-
|
|
10
|
-
# Add any project specific keep options here:
|
package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTest.java
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// Replace "com.example" here and below with your app's package name from the top of MainActivity.java
|
|
2
|
-
package com.reactnativetrackerexample;
|
|
3
|
-
|
|
4
|
-
import com.wix.detox.Detox;
|
|
5
|
-
import com.wix.detox.config.DetoxConfig;
|
|
6
|
-
|
|
7
|
-
import org.junit.Rule;
|
|
8
|
-
import org.junit.Test;
|
|
9
|
-
import org.junit.runner.RunWith;
|
|
10
|
-
|
|
11
|
-
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
|
12
|
-
import androidx.test.filters.LargeTest;
|
|
13
|
-
import androidx.test.rule.ActivityTestRule;
|
|
14
|
-
|
|
15
|
-
@RunWith(AndroidJUnit4.class)
|
|
16
|
-
@LargeTest
|
|
17
|
-
public class DetoxTest {
|
|
18
|
-
// Replace 'MainActivity' with the value of android:name entry in
|
|
19
|
-
// <activity> in AndroidManifest.xml
|
|
20
|
-
@Rule
|
|
21
|
-
public ActivityTestRule<MainActivity> mActivityRule = new ActivityTestRule<>(MainActivity.class, false, false);
|
|
22
|
-
|
|
23
|
-
@Test
|
|
24
|
-
public void runDetoxTests() {
|
|
25
|
-
// This is optional - in case you've decided to integrate TestButler
|
|
26
|
-
// See https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#8-test-butler-support-optional
|
|
27
|
-
// TestButlerProbe.assertReadyIfInstalled();
|
|
28
|
-
|
|
29
|
-
DetoxConfig detoxConfig = new DetoxConfig();
|
|
30
|
-
detoxConfig.idlePolicyConfig.masterTimeoutSec = 90;
|
|
31
|
-
detoxConfig.idlePolicyConfig.idleResourceTimeoutSec = 60;
|
|
32
|
-
detoxConfig.rnContextLoadTimeoutSec = (BuildConfig.DEBUG ? 180 : 60);
|
|
33
|
-
|
|
34
|
-
Detox.runTests(mActivityRule, detoxConfig);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
package com.reactnativetrackerexample;
|
|
2
|
-
|
|
3
|
-
import android.os.Bundle;
|
|
4
|
-
|
|
5
|
-
// import com.linkedin.android.testbutler.TestButler;
|
|
6
|
-
|
|
7
|
-
import androidx.test.runner.AndroidJUnitRunner;
|
|
8
|
-
|
|
9
|
-
public class DetoxTestAppJUnitRunner extends AndroidJUnitRunner {
|
|
10
|
-
@Override
|
|
11
|
-
public void onStart() {
|
|
12
|
-
// TestButler.setup(getTargetContext());
|
|
13
|
-
super.onStart();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@Override
|
|
17
|
-
public void finish(int resultCode, Bundle results) {
|
|
18
|
-
// TestButler.teardown(getTargetContext());
|
|
19
|
-
super.finish(resultCode, results);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
|
|
5
|
-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
|
6
|
-
|
|
7
|
-
<application
|
|
8
|
-
android:usesCleartextTraffic="true"
|
|
9
|
-
tools:targetApi="28"
|
|
10
|
-
tools:ignore="GoogleAppIndexingWarning">
|
|
11
|
-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
|
|
12
|
-
</application>
|
|
13
|
-
</manifest>
|
package/example/android/app/src/debug/java/com/reactnativetrackerexample/ReactNativeFlipper.java
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
-
* directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
package com.reactnativetrackerexample;
|
|
8
|
-
|
|
9
|
-
import android.content.Context;
|
|
10
|
-
import com.facebook.flipper.android.AndroidFlipperClient;
|
|
11
|
-
import com.facebook.flipper.android.utils.FlipperUtils;
|
|
12
|
-
import com.facebook.flipper.core.FlipperClient;
|
|
13
|
-
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
|
14
|
-
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
|
15
|
-
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
|
16
|
-
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
|
17
|
-
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
|
18
|
-
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
|
19
|
-
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
|
20
|
-
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
|
21
|
-
import com.facebook.react.ReactInstanceEventListener;
|
|
22
|
-
import com.facebook.react.ReactInstanceManager;
|
|
23
|
-
import com.facebook.react.bridge.ReactContext;
|
|
24
|
-
import com.facebook.react.modules.network.NetworkingModule;
|
|
25
|
-
import okhttp3.OkHttpClient;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Class responsible of loading Flipper inside your React Native application. This is the debug
|
|
29
|
-
* flavor of it. Here you can add your own plugins and customize the Flipper setup.
|
|
30
|
-
*/
|
|
31
|
-
public class ReactNativeFlipper {
|
|
32
|
-
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
33
|
-
if (FlipperUtils.shouldEnableFlipper(context)) {
|
|
34
|
-
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
|
35
|
-
|
|
36
|
-
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
|
37
|
-
client.addPlugin(new DatabasesFlipperPlugin(context));
|
|
38
|
-
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
|
39
|
-
client.addPlugin(CrashReporterPlugin.getInstance());
|
|
40
|
-
|
|
41
|
-
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
|
42
|
-
NetworkingModule.setCustomClientBuilder(
|
|
43
|
-
new NetworkingModule.CustomClientBuilder() {
|
|
44
|
-
@Override
|
|
45
|
-
public void apply(OkHttpClient.Builder builder) {
|
|
46
|
-
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
client.addPlugin(networkFlipperPlugin);
|
|
50
|
-
client.start();
|
|
51
|
-
|
|
52
|
-
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
|
53
|
-
// Hence we run if after all native modules have been initialized
|
|
54
|
-
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
|
55
|
-
if (reactContext == null) {
|
|
56
|
-
reactInstanceManager.addReactInstanceEventListener(
|
|
57
|
-
new ReactInstanceEventListener() {
|
|
58
|
-
@Override
|
|
59
|
-
public void onReactContextInitialized(ReactContext reactContext) {
|
|
60
|
-
reactInstanceManager.removeReactInstanceEventListener(this);
|
|
61
|
-
reactContext.runOnNativeModulesQueueThread(
|
|
62
|
-
new Runnable() {
|
|
63
|
-
@Override
|
|
64
|
-
public void run() {
|
|
65
|
-
client.addPlugin(new FrescoFlipperPlugin());
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
} else {
|
|
71
|
-
client.addPlugin(new FrescoFlipperPlugin());
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
|
-
|
|
3
|
-
<uses-permission android:name="android.permission.INTERNET" />
|
|
4
|
-
|
|
5
|
-
<application
|
|
6
|
-
android:name=".MainApplication"
|
|
7
|
-
android:label="@string/app_name"
|
|
8
|
-
android:icon="@mipmap/ic_launcher"
|
|
9
|
-
android:roundIcon="@mipmap/ic_launcher_round"
|
|
10
|
-
android:allowBackup="false"
|
|
11
|
-
android:usesCleartextTraffic="true"
|
|
12
|
-
android:theme="@style/AppTheme">
|
|
13
|
-
<activity
|
|
14
|
-
android:name=".MainActivity"
|
|
15
|
-
android:label="@string/app_name"
|
|
16
|
-
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
|
|
17
|
-
android:launchMode="singleTask"
|
|
18
|
-
android:windowSoftInputMode="adjustResize"
|
|
19
|
-
android:exported="true">
|
|
20
|
-
<intent-filter>
|
|
21
|
-
<action android:name="android.intent.action.MAIN" />
|
|
22
|
-
<category android:name="android.intent.category.LAUNCHER" />
|
|
23
|
-
</intent-filter>
|
|
24
|
-
</activity>
|
|
25
|
-
</application>
|
|
26
|
-
</manifest>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
package com.reactnativetrackerexample;
|
|
2
|
-
|
|
3
|
-
import com.facebook.react.ReactActivity;
|
|
4
|
-
import com.facebook.react.ReactActivityDelegate;
|
|
5
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
6
|
-
import com.facebook.react.defaults.DefaultReactActivityDelegate;
|
|
7
|
-
|
|
8
|
-
public class MainActivity extends ReactActivity {
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
|
12
|
-
* rendering of the component.
|
|
13
|
-
*/
|
|
14
|
-
@Override
|
|
15
|
-
protected String getMainComponentName() {
|
|
16
|
-
return "ReactNativeTrackerExample";
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
|
|
21
|
-
* DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
|
|
22
|
-
* (aka React 18) with two boolean flags.
|
|
23
|
-
*/
|
|
24
|
-
@Override
|
|
25
|
-
protected ReactActivityDelegate createReactActivityDelegate() {
|
|
26
|
-
return new DefaultReactActivityDelegate(
|
|
27
|
-
this,
|
|
28
|
-
getMainComponentName(),
|
|
29
|
-
// If you opted-in for the New Architecture, we enable the Fabric Renderer.
|
|
30
|
-
DefaultNewArchitectureEntryPoint.getFabricEnabled());
|
|
31
|
-
}
|
|
32
|
-
}
|
package/example/android/app/src/main/java/com/reactnativetrackerexample/MainApplication.java
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
package com.reactnativetrackerexample;
|
|
2
|
-
|
|
3
|
-
import android.app.Application;
|
|
4
|
-
import com.facebook.react.PackageList;
|
|
5
|
-
import com.facebook.react.ReactApplication;
|
|
6
|
-
import com.facebook.react.ReactNativeHost;
|
|
7
|
-
import com.facebook.react.ReactPackage;
|
|
8
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
|
|
9
|
-
import com.facebook.react.defaults.DefaultReactNativeHost;
|
|
10
|
-
import com.facebook.soloader.SoLoader;
|
|
11
|
-
import java.util.List;
|
|
12
|
-
|
|
13
|
-
public class MainApplication extends Application implements ReactApplication {
|
|
14
|
-
|
|
15
|
-
private final ReactNativeHost mReactNativeHost =
|
|
16
|
-
new DefaultReactNativeHost(this) {
|
|
17
|
-
@Override
|
|
18
|
-
public boolean getUseDeveloperSupport() {
|
|
19
|
-
return BuildConfig.DEBUG;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@Override
|
|
23
|
-
protected List<ReactPackage> getPackages() {
|
|
24
|
-
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
25
|
-
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
26
|
-
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
27
|
-
// packages.add(new MyReactNativePackage());
|
|
28
|
-
return packages;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@Override
|
|
32
|
-
protected String getJSMainModuleName() {
|
|
33
|
-
return "index";
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@Override
|
|
37
|
-
protected boolean isNewArchEnabled() {
|
|
38
|
-
return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@Override
|
|
42
|
-
protected Boolean isHermesEnabled() {
|
|
43
|
-
return BuildConfig.IS_HERMES_ENABLED;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
@Override
|
|
48
|
-
public ReactNativeHost getReactNativeHost() {
|
|
49
|
-
return mReactNativeHost;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@Override
|
|
53
|
-
public void onCreate() {
|
|
54
|
-
super.onCreate();
|
|
55
|
-
SoLoader.init(this, /* native exopackage */ false);
|
|
56
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
57
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
58
|
-
DefaultNewArchitectureEntryPoint.load();
|
|
59
|
-
}
|
|
60
|
-
ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<!-- Copyright (C) 2014 The Android Open Source Project
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
-->
|
|
16
|
-
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
|
17
|
-
android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
|
|
18
|
-
android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
|
|
19
|
-
android:insetTop="@dimen/abc_edit_text_inset_top_material"
|
|
20
|
-
android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
|
|
21
|
-
|
|
22
|
-
<selector>
|
|
23
|
-
<!--
|
|
24
|
-
This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
|
|
25
|
-
The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
|
|
26
|
-
NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
|
|
27
|
-
|
|
28
|
-
<item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
29
|
-
|
|
30
|
-
For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
|
|
31
|
-
-->
|
|
32
|
-
<item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
|
|
33
|
-
<item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
|
|
34
|
-
</selector>
|
|
35
|
-
|
|
36
|
-
</inset>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<resources>
|
|
2
|
-
|
|
3
|
-
<!-- Base application theme. -->
|
|
4
|
-
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
|
|
5
|
-
<!-- Customize your theme here. -->
|
|
6
|
-
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
|
7
|
-
</style>
|
|
8
|
-
|
|
9
|
-
</resources>
|
package/example/android/app/src/release/java/com/reactnativetrackerexample/ReactNativeFlipper.java
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
|
5
|
-
* directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
package com.reactnativetrackerexample;
|
|
8
|
-
|
|
9
|
-
import android.content.Context;
|
|
10
|
-
import com.facebook.react.ReactInstanceManager;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Class responsible of loading Flipper inside your React Native application. This is the release
|
|
14
|
-
* flavor of it so it's empty as we don't want to load Flipper.
|
|
15
|
-
*/
|
|
16
|
-
public class ReactNativeFlipper {
|
|
17
|
-
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
|
18
|
-
// Do nothing as we don't want to initialize Flipper on Release.
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
2
|
-
|
|
3
|
-
buildscript {
|
|
4
|
-
ext {
|
|
5
|
-
buildToolsVersion = "33.0.0"
|
|
6
|
-
minSdkVersion = 21
|
|
7
|
-
compileSdkVersion = 33
|
|
8
|
-
targetSdkVersion = 33
|
|
9
|
-
kotlinVersion = "1.8.0"
|
|
10
|
-
|
|
11
|
-
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
|
|
12
|
-
ndkVersion = "23.1.7779620"
|
|
13
|
-
}
|
|
14
|
-
repositories {
|
|
15
|
-
google()
|
|
16
|
-
mavenCentral()
|
|
17
|
-
}
|
|
18
|
-
dependencies {
|
|
19
|
-
classpath("com.android.tools.build:gradle")
|
|
20
|
-
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
21
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
allprojects {
|
|
26
|
-
repositories {
|
|
27
|
-
maven {
|
|
28
|
-
url("$rootDir/../node_modules/detox/Detox-android")
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
Binary file
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Project-wide Gradle settings.
|
|
2
|
-
|
|
3
|
-
# IDE (e.g. Android Studio) users:
|
|
4
|
-
# Gradle settings configured through the IDE *will override*
|
|
5
|
-
# any settings specified in this file.
|
|
6
|
-
|
|
7
|
-
# For more details on how to configure your build environment visit
|
|
8
|
-
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
|
9
|
-
|
|
10
|
-
# Specifies the JVM arguments used for the daemon process.
|
|
11
|
-
# The setting is particularly useful for tweaking memory settings.
|
|
12
|
-
# Default value: -Xmx512m -XX:MaxMetaspaceSize=256m
|
|
13
|
-
org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
|
|
14
|
-
|
|
15
|
-
# When configured, Gradle will run in incubating parallel mode.
|
|
16
|
-
# This option should only be used with decoupled projects. More details, visit
|
|
17
|
-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
18
|
-
# org.gradle.parallel=true
|
|
19
|
-
|
|
20
|
-
# AndroidX package structure to make it clearer which packages are bundled with the
|
|
21
|
-
# Android operating system, and which are packaged with your app's APK
|
|
22
|
-
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
|
23
|
-
android.useAndroidX=true
|
|
24
|
-
# Automatically convert third-party libraries to use AndroidX
|
|
25
|
-
android.enableJetifier=true
|
|
26
|
-
|
|
27
|
-
# Version of flipper SDK to use with React Native
|
|
28
|
-
FLIPPER_VERSION=0.182.0
|
|
29
|
-
|
|
30
|
-
# Use this property to specify which architecture you want to build.
|
|
31
|
-
# You can also override it from the CLI using
|
|
32
|
-
# ./gradlew <task> -PreactNativeArchitectures=x86_64
|
|
33
|
-
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
34
|
-
|
|
35
|
-
# Use this property to enable support to the new architecture.
|
|
36
|
-
# This will allow you to use TurboModules and the Fabric render in
|
|
37
|
-
# your application. You should enable this flag either if you want
|
|
38
|
-
# to write custom TurboModules/Fabric components OR use libraries that
|
|
39
|
-
# are providing them.
|
|
40
|
-
newArchEnabled=false
|
|
41
|
-
|
|
42
|
-
# Use this property to enable or disable the Hermes JS engine.
|
|
43
|
-
# If set to false, you will be using JSC instead.
|
|
44
|
-
hermesEnabled=true
|