Skip to content
This repository was archived by the owner on Feb 9, 2026. It is now read-only.

Commit a004096

Browse files
committed
fix: RN 0.74.2
1 parent 31840d8 commit a004096

28 files changed

Lines changed: 1987 additions & 1586 deletions

example/.gitignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DerivedData
2020
*.hmap
2121
*.ipa
2222
*.xcuserstate
23-
ios/.xcode.env.local
23+
**/.xcode.env.local
2424

2525
# Android/IntelliJ
2626
#
@@ -56,7 +56,7 @@ yarn-error.log
5656
*.jsbundle
5757

5858
# Ruby / CocoaPods
59-
/ios/Pods/
59+
**/Pods/
6060
/vendor/bundle/
6161

6262
# Temporary files created by Metro to check the health of the file watcher
@@ -65,4 +65,12 @@ yarn-error.log
6565
# testing
6666
/coverage
6767

68+
# Yarn
69+
.yarn/*
70+
!.yarn/patches
71+
!.yarn/plugins
72+
!.yarn/releases
73+
!.yarn/sdks
74+
!.yarn/versions
75+
6876
/artifacts/

example/.yarnrc.yml_

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.6.4.cjs

example/Gemfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ source 'https://rubygems.org'
33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
44
ruby ">= 2.6.10"
55

6-
gem 'cocoapods', '~> 1.12'
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'

example/android/app/build.gradle

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: "com.android.application"
2+
apply plugin: "org.jetbrains.kotlin.android"
23
apply plugin: "com.facebook.react"
34

45
/**
@@ -70,8 +71,8 @@ def jscFlavor = 'org.webkit:android-jsc:+'
7071

7172
android {
7273
ndkVersion rootProject.ext.ndkVersion
73-
74-
compileSdkVersion rootProject.ext.compileSdkVersion
74+
buildToolsVersion rootProject.ext.buildToolsVersion
75+
compileSdk rootProject.ext.compileSdkVersion
7576

7677
namespace "com.exmpl"
7778
defaultConfig {
@@ -114,12 +115,6 @@ dependencies {
114115
implementation("com.facebook.react:react-android")
115116
implementation files("../../node_modules/@synonymdev/react-native-ldk/android/libs/LDK-release.aar")
116117

117-
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
118-
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
119-
exclude group:'com.squareup.okhttp3', module:'okhttp'
120-
}
121-
122-
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
123118
if (hermesEnabled.toBoolean()) {
124119
implementation("com.facebook.react:hermes-android")
125120
} else {

example/android/app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@
77
<application
88
android:usesCleartextTraffic="true"
99
tools:targetApi="28"
10-
tools:ignore="GoogleAppIndexingWarning">
11-
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
12-
</application>
10+
tools:ignore="GoogleAppIndexingWarning"/>
1311
</manifest>

example/android/app/src/debug/java/com/exmpl/ReactNativeFlipper.java

Lines changed: 0 additions & 75 deletions
This file was deleted.

example/android/app/src/main/java/com/exmpl/MainActivity.java

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.exmpl
2+
3+
import com.facebook.react.ReactActivity
4+
import com.facebook.react.ReactActivityDelegate
5+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
6+
import com.facebook.react.defaults.DefaultReactActivityDelegate
7+
8+
class MainActivity : 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 fun getMainComponentName(): String = "exmpl"
15+
16+
/**
17+
* Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
18+
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
19+
*/
20+
override fun createReactActivityDelegate(): ReactActivityDelegate =
21+
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
22+
}

example/android/app/src/main/java/com/exmpl/MainApplication.java

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.exmpl
2+
3+
import android.app.Application
4+
import com.facebook.react.PackageList
5+
import com.facebook.react.ReactApplication
6+
import com.facebook.react.ReactHost
7+
import com.facebook.react.ReactNativeHost
8+
import com.facebook.react.ReactPackage
9+
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
10+
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
11+
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.soloader.SoLoader
13+
14+
class MainApplication : Application(), ReactApplication {
15+
16+
override val reactNativeHost: ReactNativeHost =
17+
object : DefaultReactNativeHost(this) {
18+
override fun getPackages(): List<ReactPackage> =
19+
PackageList(this).packages.apply {
20+
// Packages that cannot be autolinked yet can be added manually here, for example:
21+
// add(MyReactNativePackage())
22+
}
23+
24+
override fun getJSMainModuleName(): String = "index"
25+
26+
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
27+
28+
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
29+
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
30+
}
31+
32+
override val reactHost: ReactHost
33+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
34+
35+
override fun onCreate() {
36+
super.onCreate()
37+
SoLoader.init(this, false)
38+
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
39+
// If you opted-in for the New Architecture, we load the native entry point for this app.
40+
load()
41+
}
42+
}
43+
}

0 commit comments

Comments
 (0)