diff --git a/.gitignore b/.gitignore
index d2e362cf1..35ad6598b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,12 @@ local.properties
node_modules/
npm-debug.log
yarn-error.log
+.yarn/*
+!.yarn/patches
+!.yarn/plugins
+!.yarn/releases
+!.yarn/sdks
+!.yarn/versions
# fastlane
#
@@ -58,10 +64,11 @@ yarn-error.log
*.jsbundle
# Ruby / CocoaPods
-/ios/Pods/
+**/Pods/
/ios/GoogleService-Info.plist
/vendor/bundle/
+
# Ignite-specific items below
# You can safely replace everything above this comment with whatever is
# in the default .gitignore generated by React-Native CLI
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 2023d4f1a..ef3b0fb1b 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -3,7 +3,7 @@
"tasks": [
{
"type": "shell",
- "command": "yarn run ios --simulator=\"iPhone 15 Pro\"",
+ "command": "yarn run ios --simulator=\"iPhone 16 Pro\"",
"problemMatcher": [],
"label": "Run iOS",
"detail": "Serves the app with iOS"
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 3c8e2d342..960dcb51e 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,10 +1,9 @@
+apply plugin: "kotlin-android"
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: "com.google.gms.google-services"
apply plugin: "com.google.firebase.crashlytics"
-import com.android.build.OutputFile
-
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
def expoDebuggableVariants = ['debug']
// Override `debuggableVariants` for expo-updates debugging
@@ -26,15 +25,15 @@ react {
debuggableVariants = expoDebuggableVariants
/* Folders */
- // The root of your project, i.e. where "package.json" lives. Default is '..'
- // root = file("../")
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
- // reactNativeDir = file("../node_modules/react-native")
- // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
- // codegenDir = file("../node_modules/react-native-codegen")
- // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
- // cliFile = file("../node_modules/react-native/cli.js")
-
+ // The root of your project, i.e. where "package.json" lives. Default is '../..'
+ // root = file("../../")
+ // The folder where the react-native NPM package is. Default is ../../node_modules/react-native
+ // reactNativeDir = file("../../node_modules/react-native")
+ // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
+ // codegenDir = file("../../node_modules/@react-native/codegen")
+ // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
+ // cliFile = file("../../node_modules/react-native/cli.js")
+
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
@@ -67,6 +66,9 @@ react {
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
+
+ /* Autolinking */
+ autolinkLibrariesWithApp()
}
// Override `hermesEnabled` by `expo.jsEngine`
@@ -74,14 +76,6 @@ ext {
hermesEnabled = (findProperty('expo.jsEngine') ?: "hermes") == "hermes"
}
-/**
- * Set this to true to create four separate APKs instead of one,
- * one for each native architecture. This is useful if you don't
- * use App Bundles (https://developer.android.com/guide/app-bundle/)
- * and want to have separate APKs to upload to the Play Store.
- */
-def enableSeparateBuildPerCPUArchitecture = false
-
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
@@ -100,39 +94,22 @@ def enableProguardInReleaseBuilds = (findProperty('android.enableProguardInRelea
*/
def jscFlavor = 'org.webkit:android-jsc:+'
-/**
- * Private function to get the list of Native Architectures you want to build.
- * This reads the value from reactNativeArchitectures in your gradle.properties
- * file and works together with the --active-arch-only flag of react-native run-android.
- */
-def reactNativeArchitectures() {
- def value = project.getProperties().get("reactNativeArchitectures")
- return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
-}
-
android {
ndkVersion rootProject.ext.ndkVersion
- compileSdkVersion rootProject.ext.compileSdkVersion
+ buildToolsVersion rootProject.ext.buildToolsVersion
+ compileSdk rootProject.ext.compileSdkVersion
namespace "com.betterrail"
defaultConfig {
applicationId "com.betterrail"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 84
- versionName "2.3.2"
+ versionCode 88
+ versionName "2.3.3"
missingDimensionStrategy "store", "play"
}
- splits {
- abi {
- reset()
- enable enableSeparateBuildPerCPUArchitecture
- universalApk false // If true, also generate a universal APK
- include (*reactNativeArchitectures())
- }
- }
signingConfigs {
debug {
storeFile file('debug.keystore')
@@ -153,44 +130,18 @@ android {
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
-
- // applicationVariants are e.g. debug, release
- applicationVariants.all { variant ->
- variant.outputs.each { output ->
- // For each separate APK per architecture, set a unique version code as described here:
- // https://developer.android.com/studio/build/configure-apk-splits.html
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
- def abi = output.getFilter(OutputFile.ABI)
- if (abi != null) { // null for the universal-debug, universal-release variants
- output.versionCodeOverride =
- defaultConfig.versionCode * 1000 + versionCodes.get(abi)
- }
-
- }
- }
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
-
- implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
// RN BootSplash
implementation("androidx.core:core-splashscreen:1.0.0")
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
- exclude group:'com.squareup.okhttp3', module:'okhttp'
- }
-
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
-
-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
\ No newline at end of file
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
index 4b185bc15..eb98c01af 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -2,12 +2,8 @@
This source code is licensed under the MIT license found in the LICENSE file in the root
- * directory of this source tree.
- */
-package com.betterrail;
-
-import android.content.Context;
-import com.facebook.flipper.android.AndroidFlipperClient;
-import com.facebook.flipper.android.utils.FlipperUtils;
-import com.facebook.flipper.core.FlipperClient;
-import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
-import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
-import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
-import com.facebook.flipper.plugins.inspector.DescriptorMapping;
-import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
-import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
-import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
-import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
-import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
-import com.facebook.react.ReactInstanceEventListener;
-import com.facebook.react.ReactInstanceManager;
-import com.facebook.react.bridge.ReactContext;
-import com.facebook.react.modules.network.NetworkingModule;
-import okhttp3.OkHttpClient;
-
-/**
- * Class responsible of loading Flipper inside your React Native application. This is the debug
- * flavor of it. Here you can add your own plugins and customize the Flipper setup.
- */
-public class ReactNativeFlipper {
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
- if (FlipperUtils.shouldEnableFlipper(context)) {
- final FlipperClient client = AndroidFlipperClient.getInstance(context);
-
- client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
- client.addPlugin(new ReactFlipperPlugin());
- client.addPlugin(new DatabasesFlipperPlugin(context));
- client.addPlugin(new SharedPreferencesFlipperPlugin(context));
- client.addPlugin(CrashReporterPlugin.getInstance());
-
- NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
- NetworkingModule.setCustomClientBuilder(
- new NetworkingModule.CustomClientBuilder() {
- @Override
- public void apply(OkHttpClient.Builder builder) {
- builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
- }
- });
- client.addPlugin(networkFlipperPlugin);
- client.start();
-
- // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
- // Hence we run if after all native modules have been initialized
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
- if (reactContext == null) {
- reactInstanceManager.addReactInstanceEventListener(
- new ReactInstanceEventListener() {
- @Override
- public void onReactContextInitialized(ReactContext reactContext) {
- reactInstanceManager.removeReactInstanceEventListener(this);
- reactContext.runOnNativeModulesQueueThread(
- new Runnable() {
- @Override
- public void run() {
- client.addPlugin(new FrescoFlipperPlugin());
- }
- });
- }
- });
- } else {
- client.addPlugin(new FrescoFlipperPlugin());
- }
- }
- }
-}
\ No newline at end of file
diff --git a/android/app/src/main/java/com/betterrail/MainActivity.java b/android/app/src/main/java/com/betterrail/MainActivity.java
index a2fed0b3c..3dd8e5ae6 100644
--- a/android/app/src/main/java/com/betterrail/MainActivity.java
+++ b/android/app/src/main/java/com/betterrail/MainActivity.java
@@ -1,44 +1,44 @@
-package com.betterrail;
+// package com.betterrail;
-import android.os.Bundle;
-import com.facebook.react.ReactActivity;
-import com.facebook.react.ReactActivityDelegate;
-import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
-import com.facebook.react.defaults.DefaultReactActivityDelegate;
+// import android.os.Bundle;
+// import com.facebook.react.ReactActivity;
+// import com.facebook.react.ReactActivityDelegate;
+// import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
+// import com.facebook.react.defaults.DefaultReactActivityDelegate;
-public class MainActivity extends ReactActivity {
+// public class MainActivity extends ReactActivity {
- /**
- * Returns the name of the main component registered from JavaScript. This is used to schedule
- * rendering of the component.
- */
- @Override
- protected String getMainComponentName() {
- return "BetterRail";
- }
+// /**
+// * Returns the name of the main component registered from JavaScript. This is used to schedule
+// * rendering of the component.
+// */
+// @Override
+// protected String getMainComponentName() {
+// return "BetterRail";
+// }
- /**
- * Fix for react-native-screens (https://github.com/software-mansion/react-native-screens#android)
- */
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(null);
- }
+// /**
+// * Fix for react-native-screens (https://github.com/software-mansion/react-native-screens#android)
+// */
+// @Override
+// protected void onCreate(Bundle savedInstanceState) {
+// super.onCreate(null);
+// }
- /**
- * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
- * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
- * (aka React 18) with two boolean flags.
- */
- @Override
- protected ReactActivityDelegate createReactActivityDelegate() {
- return new DefaultReactActivityDelegate(
- this,
- getMainComponentName(),
- // If you opted-in for the New Architecture, we enable the Fabric Renderer.
- DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
- // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
- DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
- );
- }
-}
+// /**
+// * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
+// * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
+// * (aka React 18) with two boolean flags.
+// */
+// @Override
+// protected ReactActivityDelegate createReactActivityDelegate() {
+// return new DefaultReactActivityDelegate(
+// this,
+// getMainComponentName(),
+// // If you opted-in for the New Architecture, we enable the Fabric Renderer.
+// DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
+// // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
+// DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
+// );
+// }
+// }
diff --git a/android/app/src/main/java/com/betterrail/MainActivity.kt b/android/app/src/main/java/com/betterrail/MainActivity.kt
new file mode 100644
index 000000000..4a1506d4a
--- /dev/null
+++ b/android/app/src/main/java/com/betterrail/MainActivity.kt
@@ -0,0 +1,22 @@
+package com.betterrail
+
+import com.facebook.react.ReactActivity
+import com.facebook.react.ReactActivityDelegate
+import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
+import com.facebook.react.defaults.DefaultReactActivityDelegate
+
+class MainActivity : ReactActivity() {
+
+ /**
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
+ * rendering of the component.
+ */
+ override fun getMainComponentName(): String = "BetterRail"
+
+ /**
+ * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
+ * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
+ */
+ override fun createReactActivityDelegate(): ReactActivityDelegate =
+ DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
+}
diff --git a/android/app/src/main/java/com/betterrail/MainApplication.java b/android/app/src/main/java/com/betterrail/MainApplication.java
index 03c96885d..747918ef0 100644
--- a/android/app/src/main/java/com/betterrail/MainApplication.java
+++ b/android/app/src/main/java/com/betterrail/MainApplication.java
@@ -1,62 +1,62 @@
-package com.betterrail;
-
-import android.app.Application;
-import com.facebook.react.PackageList;
-import com.facebook.react.ReactApplication;
-import com.facebook.react.ReactNativeHost;
-import com.facebook.react.ReactPackage;
-import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
-import com.facebook.react.defaults.DefaultReactNativeHost;
-import com.facebook.soloader.SoLoader;
-import java.util.List;
-
-public class MainApplication extends Application implements ReactApplication {
-
- private final ReactNativeHost mReactNativeHost =
- new DefaultReactNativeHost(this) {
- @Override
- public boolean getUseDeveloperSupport() {
- return BuildConfig.DEBUG;
- }
-
- @Override
- protected List