@snowplow/react-native-tracker 2.1.2 → 4.0.2-dev.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.
Files changed (232) hide show
  1. package/LICENSE +29 -203
  2. package/README.md +59 -143
  3. package/dist/index.cjs.d.ts +499 -0
  4. package/dist/index.cjs.js +2656 -0
  5. package/dist/index.cjs.js.map +1 -0
  6. package/dist/index.cjs.min.d.ts +499 -0
  7. package/dist/index.cjs.min.js +63 -0
  8. package/dist/index.cjs.min.js.map +1 -0
  9. package/dist/index.module.d.ts +499 -0
  10. package/dist/index.module.js +250 -0
  11. package/dist/index.module.js.map +1 -0
  12. package/package.json +48 -158
  13. package/.editorconfig +0 -15
  14. package/.eslintignore +0 -6
  15. package/.gitattributes +0 -3
  16. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -29
  17. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  18. package/.github/actions/setup/action.yml +0 -28
  19. package/.github/workflows/build.yml +0 -155
  20. package/.github/workflows/deploy.yml +0 -97
  21. package/.github/workflows/e2e-android.yml +0 -121
  22. package/.github/workflows/e2e-ios.yml +0 -95
  23. package/.github/workflows/snyk.yml +0 -21
  24. package/.gitignore +0 -70
  25. package/.npmignore +0 -60
  26. package/.nvmrc +0 -1
  27. package/.watchmanconfig +0 -1
  28. package/.yarnrc +0 -3
  29. package/CHANGELOG +0 -184
  30. package/CONTRIBUTING.md +0 -80
  31. package/android/build.gradle +0 -110
  32. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  33. package/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  34. package/android/gradle.properties +0 -5
  35. package/android/gradlew +0 -234
  36. package/android/gradlew.bat +0 -89
  37. package/android/src/main/AndroidManifest.xml +0 -3
  38. package/android/src/main/AndroidManifestNew.xml +0 -2
  39. package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerModule.kt +0 -744
  40. package/android/src/main/java/com/snowplow/reactnativetracker/ReactNativeTrackerPackage.kt +0 -17
  41. package/android/src/main/java/com/snowplow/reactnativetracker/util/ConfigUtil.kt +0 -274
  42. package/android/src/main/java/com/snowplow/reactnativetracker/util/EventUtil.kt +0 -233
  43. package/android/src/main/java/com/snowplow/reactnativetracker/util/TrackerVersion.kt +0 -5
  44. package/babel.config.js +0 -3
  45. package/example/.watchmanconfig +0 -1
  46. package/example/Gemfile +0 -6
  47. package/example/android/app/build.gradle +0 -129
  48. package/example/android/app/debug.keystore +0 -0
  49. package/example/android/app/proguard-rules.pro +0 -10
  50. package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTest.java +0 -36
  51. package/example/android/app/src/androidTest/java/com/reactnativetrackerexample/DetoxTestAppJUnitRunner.java +0 -21
  52. package/example/android/app/src/debug/AndroidManifest.xml +0 -13
  53. package/example/android/app/src/debug/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -75
  54. package/example/android/app/src/main/AndroidManifest.xml +0 -26
  55. package/example/android/app/src/main/java/com/reactnativetrackerexample/MainActivity.java +0 -32
  56. package/example/android/app/src/main/java/com/reactnativetrackerexample/MainApplication.java +0 -62
  57. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  58. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  59. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  60. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  61. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  62. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  63. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  64. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  65. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  66. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  67. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  68. package/example/android/app/src/main/res/values/strings.xml +0 -3
  69. package/example/android/app/src/main/res/values/styles.xml +0 -9
  70. package/example/android/app/src/release/java/com/reactnativetrackerexample/ReactNativeFlipper.java +0 -20
  71. package/example/android/build.gradle +0 -31
  72. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  73. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  74. package/example/android/gradle.properties +0 -44
  75. package/example/android/gradlew +0 -244
  76. package/example/android/gradlew.bat +0 -92
  77. package/example/android/settings.gradle +0 -4
  78. package/example/app.json +0 -4
  79. package/example/babel.config.js +0 -17
  80. package/example/detox.config.js +0 -92
  81. package/example/e2e/config.json +0 -10
  82. package/example/e2e/emitEvents.e2e.detox.js +0 -95
  83. package/example/e2e/environment.js +0 -23
  84. package/example/e2e/helpers/microCommands.js +0 -140
  85. package/example/e2e/helpers/microHelpers.js +0 -333
  86. package/example/e2e/helpers/microHelpers.test.js +0 -295
  87. package/example/e2e/helpers/schemas.js +0 -49
  88. package/example/e2e/jest.config.js +0 -16
  89. package/example/e2e/setup.js +0 -4
  90. package/example/e2e/testEvents.micro.test.js +0 -287
  91. package/example/index.js +0 -5
  92. package/example/ios/.xcode.env +0 -11
  93. package/example/ios/Podfile +0 -62
  94. package/example/ios/Podfile.lock +0 -730
  95. package/example/ios/ReactNativeTrackerExample/AppDelegate.h +0 -6
  96. package/example/ios/ReactNativeTrackerExample/AppDelegate.mm +0 -26
  97. package/example/ios/ReactNativeTrackerExample/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  98. package/example/ios/ReactNativeTrackerExample/Images.xcassets/Contents.json +0 -6
  99. package/example/ios/ReactNativeTrackerExample/Info.plist +0 -55
  100. package/example/ios/ReactNativeTrackerExample/LaunchScreen.storyboard +0 -47
  101. package/example/ios/ReactNativeTrackerExample/PrivacyInfo.xcprivacy +0 -37
  102. package/example/ios/ReactNativeTrackerExample/main.m +0 -10
  103. package/example/ios/ReactNativeTrackerExample-Bridging-Header.h +0 -3
  104. package/example/ios/ReactNativeTrackerExample.xcodeproj/project.pbxproj +0 -739
  105. package/example/ios/ReactNativeTrackerExample.xcodeproj/xcshareddata/xcschemes/ReactNativeTrackerExample.xcscheme +0 -88
  106. package/example/ios/ReactNativeTrackerExample.xcworkspace/contents.xcworkspacedata +0 -10
  107. package/example/ios/ReactNativeTrackerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  108. package/example/ios/ReactNativeTrackerExampleTests/Info.plist +0 -24
  109. package/example/ios/ReactNativeTrackerExampleTests/ReactNativeTrackerExampleTests.m +0 -66
  110. package/example/metro.config.js +0 -45
  111. package/example/package.json +0 -54
  112. package/example/react-native.config.js +0 -10
  113. package/example/src/App.js +0 -566
  114. package/example/tsconfig.json +0 -5
  115. package/example/yarn.lock +0 -7703
  116. package/ios/ReactNativeTracker-Bridging-Header.h +0 -2
  117. package/ios/ReactNativeTracker.mm +0 -171
  118. package/ios/ReactNativeTracker.swift +0 -822
  119. package/ios/ReactNativeTracker.xcodeproj/project.pbxproj +0 -301
  120. package/ios/Util/ConfigUtils.swift +0 -209
  121. package/ios/Util/TrackerVersion.swift +0 -3
  122. package/ios/Util/Utilities.swift +0 -37
  123. package/lefthook.yml +0 -11
  124. package/lib/commonjs/api.js +0 -490
  125. package/lib/commonjs/api.js.map +0 -1
  126. package/lib/commonjs/configurations.js +0 -196
  127. package/lib/commonjs/configurations.js.map +0 -1
  128. package/lib/commonjs/constants.js +0 -77
  129. package/lib/commonjs/constants.js.map +0 -1
  130. package/lib/commonjs/events.js +0 -277
  131. package/lib/commonjs/events.js.map +0 -1
  132. package/lib/commonjs/index.js +0 -132
  133. package/lib/commonjs/index.js.map +0 -1
  134. package/lib/commonjs/jsCore.js +0 -427
  135. package/lib/commonjs/jsCore.js.map +0 -1
  136. package/lib/commonjs/native.js +0 -16
  137. package/lib/commonjs/native.js.map +0 -1
  138. package/lib/commonjs/subject.js +0 -235
  139. package/lib/commonjs/subject.js.map +0 -1
  140. package/lib/commonjs/tracker.js +0 -248
  141. package/lib/commonjs/tracker.js.map +0 -1
  142. package/lib/commonjs/types.js +0 -2
  143. package/lib/commonjs/types.js.map +0 -1
  144. package/lib/commonjs/utils.js +0 -72
  145. package/lib/commonjs/utils.js.map +0 -1
  146. package/lib/commonjs/webViewInterface.js +0 -66
  147. package/lib/commonjs/webViewInterface.js.map +0 -1
  148. package/lib/module/api.js +0 -452
  149. package/lib/module/api.js.map +0 -1
  150. package/lib/module/configurations.js +0 -184
  151. package/lib/module/configurations.js.map +0 -1
  152. package/lib/module/constants.js +0 -72
  153. package/lib/module/constants.js.map +0 -1
  154. package/lib/module/events.js +0 -259
  155. package/lib/module/events.js.map +0 -1
  156. package/lib/module/index.js +0 -120
  157. package/lib/module/index.js.map +0 -1
  158. package/lib/module/jsCore.js +0 -424
  159. package/lib/module/jsCore.js.map +0 -1
  160. package/lib/module/native.js +0 -12
  161. package/lib/module/native.js.map +0 -1
  162. package/lib/module/subject.js +0 -222
  163. package/lib/module/subject.js.map +0 -1
  164. package/lib/module/tracker.js +0 -234
  165. package/lib/module/tracker.js.map +0 -1
  166. package/lib/module/types.js +0 -2
  167. package/lib/module/types.js.map +0 -1
  168. package/lib/module/utils.js +0 -66
  169. package/lib/module/utils.js.map +0 -1
  170. package/lib/module/webViewInterface.js +0 -62
  171. package/lib/module/webViewInterface.js.map +0 -1
  172. package/lib/typescript/__tests__/api.test.d.ts +0 -2
  173. package/lib/typescript/__tests__/api.test.d.ts.map +0 -1
  174. package/lib/typescript/__tests__/configurations.test.d.ts +0 -2
  175. package/lib/typescript/__tests__/configurations.test.d.ts.map +0 -1
  176. package/lib/typescript/__tests__/events.test.d.ts +0 -2
  177. package/lib/typescript/__tests__/events.test.d.ts.map +0 -1
  178. package/lib/typescript/__tests__/index.test.d.ts +0 -2
  179. package/lib/typescript/__tests__/index.test.d.ts.map +0 -1
  180. package/lib/typescript/__tests__/jsCore.test.d.ts +0 -2
  181. package/lib/typescript/__tests__/jsCore.test.d.ts.map +0 -1
  182. package/lib/typescript/__tests__/utils.test.d.ts +0 -2
  183. package/lib/typescript/__tests__/utils.test.d.ts.map +0 -1
  184. package/lib/typescript/api.d.ts +0 -240
  185. package/lib/typescript/api.d.ts.map +0 -1
  186. package/lib/typescript/configurations.d.ts +0 -73
  187. package/lib/typescript/configurations.d.ts.map +0 -1
  188. package/lib/typescript/constants.d.ts +0 -64
  189. package/lib/typescript/constants.d.ts.map +0 -1
  190. package/lib/typescript/events.d.ts +0 -115
  191. package/lib/typescript/events.d.ts.map +0 -1
  192. package/lib/typescript/index.d.ts +0 -27
  193. package/lib/typescript/index.d.ts.map +0 -1
  194. package/lib/typescript/jsCore.d.ts +0 -152
  195. package/lib/typescript/jsCore.d.ts.map +0 -1
  196. package/lib/typescript/native.d.ts +0 -4
  197. package/lib/typescript/native.d.ts.map +0 -1
  198. package/lib/typescript/subject.d.ts +0 -91
  199. package/lib/typescript/subject.d.ts.map +0 -1
  200. package/lib/typescript/tracker.d.ts +0 -111
  201. package/lib/typescript/tracker.d.ts.map +0 -1
  202. package/lib/typescript/types.d.ts +0 -981
  203. package/lib/typescript/types.d.ts.map +0 -1
  204. package/lib/typescript/utils.d.ts +0 -35
  205. package/lib/typescript/utils.d.ts.map +0 -1
  206. package/lib/typescript/webViewInterface.d.ts +0 -15
  207. package/lib/typescript/webViewInterface.d.ts.map +0 -1
  208. package/scripts/bootstrap.js +0 -29
  209. package/snowplow-react-native-tracker.podspec +0 -42
  210. package/src/__mocks__/react-native.js +0 -7
  211. package/src/__tests__/api.test.ts +0 -21
  212. package/src/__tests__/configurations.test.ts +0 -608
  213. package/src/__tests__/events.test.ts +0 -736
  214. package/src/__tests__/index.test.ts +0 -14
  215. package/src/__tests__/jsCore.test.ts +0 -199
  216. package/src/__tests__/utils.test.ts +0 -10
  217. package/src/api.ts +0 -556
  218. package/src/configurations.ts +0 -325
  219. package/src/constants.ts +0 -97
  220. package/src/events.ts +0 -355
  221. package/src/index.ts +0 -184
  222. package/src/jsCore.ts +0 -603
  223. package/src/native.ts +0 -21
  224. package/src/subject.ts +0 -302
  225. package/src/tracker.ts +0 -377
  226. package/src/types.ts +0 -1162
  227. package/src/utils.ts +0 -65
  228. package/src/webViewInterface.ts +0 -92
  229. package/tsconfig.build.json +0 -5
  230. package/tsconfig.json +0 -28
  231. package/turbo.json +0 -34
  232. 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:
@@ -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>
@@ -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
- }
@@ -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>
@@ -1,3 +0,0 @@
1
- <resources>
2
- <string name="app_name">ReactNativeTrackerExample</string>
3
- </resources>
@@ -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>
@@ -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
- }
@@ -1,6 +0,0 @@
1
- distributionBase=GRADLE_USER_HOME
2
- distributionPath=wrapper/dists
3
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
4
- networkTimeout=10000
5
- zipStoreBase=GRADLE_USER_HOME
6
- zipStorePath=wrapper/dists
@@ -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