Skip to content

Commit 4f46eef

Browse files
committed
Update react native to 0.76
1 parent d36414d commit 4f46eef

19 files changed

+4155
-3874
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ openBrowser("https://swan.io", {
8080
});
8181
```
8282

83+
> [!WARNING]
84+
> On Android, the Chrome app must be opened at least once for this to work—a step often overlooked when using emulators in development.
85+
8386
## Handle deeplinks
8487

8588
In order to receive deeplink on browser close event, you have to setup them first. We **highly** recommand defining a custom schema + url for this specific task. For example, `com.company.myapp://close`.

example/Gemfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +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-
# 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'
6+
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
7+
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
8+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
9+
gem 'xcodeproj', '< 1.26.0'

example/Gemfile.lock

+30-18
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,32 @@ GEM
55
base64
66
nkf
77
rexml
8-
activesupport (7.0.8.4)
9-
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
activesupport (7.2.2)
9+
base64
10+
benchmark (>= 0.3)
11+
bigdecimal
12+
concurrent-ruby (~> 1.0, >= 1.3.1)
13+
connection_pool (>= 2.2.5)
14+
drb
1015
i18n (>= 1.6, < 2)
16+
logger (>= 1.4.2)
1117
minitest (>= 5.1)
12-
tzinfo (~> 2.0)
18+
securerandom (>= 0.3)
19+
tzinfo (~> 2.0, >= 2.0.5)
1320
addressable (2.8.7)
1421
public_suffix (>= 2.0.2, < 7.0)
1522
algoliasearch (1.27.5)
1623
httpclient (~> 2.8, >= 2.8.3)
1724
json (>= 1.5.1)
1825
atomos (0.1.3)
1926
base64 (0.2.0)
27+
benchmark (0.3.0)
28+
bigdecimal (3.1.8)
2029
claide (1.1.0)
21-
cocoapods (1.14.3)
30+
cocoapods (1.15.2)
2231
addressable (~> 2.8)
2332
claide (>= 1.0.2, < 2.0)
24-
cocoapods-core (= 1.14.3)
33+
cocoapods-core (= 1.15.2)
2534
cocoapods-deintegrate (>= 1.0.3, < 2.0)
2635
cocoapods-downloader (>= 2.1, < 3.0)
2736
cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -36,7 +45,7 @@ GEM
3645
nap (~> 1.0)
3746
ruby-macho (>= 2.3.0, < 3.0)
3847
xcodeproj (>= 1.23.0, < 2.0)
39-
cocoapods-core (1.14.3)
48+
cocoapods-core (1.15.2)
4049
activesupport (>= 5.0, < 8)
4150
addressable (~> 2.8)
4251
algoliasearch (~> 1.0)
@@ -56,7 +65,9 @@ GEM
5665
netrc (~> 0.11)
5766
cocoapods-try (1.2.0)
5867
colored2 (3.1.2)
59-
concurrent-ruby (1.3.3)
68+
concurrent-ruby (1.3.4)
69+
connection_pool (2.4.1)
70+
drb (2.2.1)
6071
escape (0.0.4)
6172
ethon (0.16.0)
6273
ffi (>= 1.15.0)
@@ -65,41 +76,42 @@ GEM
6576
fuzzy_match (2.0.4)
6677
gh_inspector (1.1.3)
6778
httpclient (2.8.3)
68-
i18n (1.14.5)
79+
i18n (1.14.6)
6980
concurrent-ruby (~> 1.0)
70-
json (2.7.2)
71-
minitest (5.24.1)
81+
json (2.7.5)
82+
logger (1.6.1)
83+
minitest (5.25.1)
7284
molinillo (0.8.0)
7385
nanaimo (0.3.0)
7486
nap (1.1.0)
7587
netrc (0.11.0)
7688
nkf (0.2.0)
7789
public_suffix (4.0.7)
78-
rexml (3.2.9)
79-
strscan
90+
rexml (3.3.9)
8091
ruby-macho (2.5.1)
81-
strscan (3.1.0)
92+
securerandom (0.3.1)
8293
typhoeus (1.4.1)
8394
ethon (>= 0.9.0)
8495
tzinfo (2.0.6)
8596
concurrent-ruby (~> 1.0)
86-
xcodeproj (1.24.0)
97+
xcodeproj (1.25.1)
8798
CFPropertyList (>= 2.3.3, < 4.0)
8899
atomos (~> 0.1.3)
89100
claide (>= 1.0.2, < 2.0)
90101
colored2 (~> 3.1)
91102
nanaimo (~> 0.3.0)
92-
rexml (~> 3.2.4)
103+
rexml (>= 3.3.6, < 4.0)
93104

94105
PLATFORMS
95106
ruby
96107

97108
DEPENDENCIES
98-
activesupport (>= 6.1.7.5, < 7.1.0)
99-
cocoapods (>= 1.13, < 1.15)
109+
activesupport (>= 6.1.7.5, != 7.1.0)
110+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
111+
xcodeproj (< 1.26.0)
100112

101113
RUBY VERSION
102114
ruby 3.3.4p94
103115

104116
BUNDLED WITH
105-
2.5.14
117+
2.5.18

example/android/app/build.gradle

+11-10
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ apply plugin: "com.facebook.react"
88
*/
99
react {
1010
/* Folders */
11-
// The root of your project, i.e. where "package.json" lives. Default is '..'
12-
// root = file("../")
13-
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
14-
// reactNativeDir = file("../node_modules/react-native")
15-
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
16-
// codegenDir = file("../node_modules/@react-native/codegen")
17-
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
18-
// cliFile = file("../node_modules/react-native/cli.js")
11+
// The root of your project, i.e. where "package.json" lives. Default is '../..'
12+
// root = file("../../")
13+
// The folder where the react-native NPM package is. Default is ../../node_modules/react-native
14+
// reactNativeDir = file("../../node_modules/react-native")
15+
// The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen
16+
// codegenDir = file("../../node_modules/@react-native/codegen")
17+
// The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js
18+
// cliFile = file("../../node_modules/react-native/cli.js")
1919

2020
/* Variants */
2121
// The list of variants to that are debuggable. For those we're going to
@@ -49,6 +49,9 @@ react {
4949
//
5050
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
5151
// hermesFlags = ["-O", "-output-source-map"]
52+
53+
/* Autolinking */
54+
autolinkLibrariesWithApp()
5255
}
5356

5457
/**
@@ -114,5 +117,3 @@ dependencies {
114117
implementation jscFlavor
115118
}
116119
}
117-
118-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
android:icon="@mipmap/ic_launcher"
99
android:roundIcon="@mipmap/ic_launcher_round"
1010
android:allowBackup="false"
11-
android:theme="@style/AppTheme">
11+
android:theme="@style/AppTheme"
12+
android:supportsRtl="true">
1213
<activity
1314
android:name=".MainActivity"
1415
android:label="@string/app_name"

example/android/app/src/main/java/com/rnswanbrowserexample/MainApplication.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
99
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
1010
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
1111
import com.facebook.react.defaults.DefaultReactNativeHost
12+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
1213
import com.facebook.soloader.SoLoader
1314

1415
class MainApplication : Application(), ReactApplication {
@@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication {
3435

3536
override fun onCreate() {
3637
super.onCreate()
37-
SoLoader.init(this, false)
38+
SoLoader.init(this, OpenSourceMergedSoMapping)
3839
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
3940
// If you opted-in for the New Architecture, we load the native entry point for this app.
4041
load()

example/android/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
22
ext {
3-
buildToolsVersion = "34.0.0"
4-
minSdkVersion = 23
5-
compileSdkVersion = 34
3+
buildToolsVersion = "35.0.0"
4+
minSdkVersion = 24
5+
compileSdkVersion = 35
66
targetSdkVersion = 34
77
ndkVersion = "26.1.10909125"
8-
kotlinVersion = "1.9.22"
8+
kotlinVersion = "1.9.24"
99
}
1010
repositories {
1111
google()

example/android/gradle.properties

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
2121
# Android operating system, and which are packaged with your app's APK
2222
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2323
android.useAndroidX=true
24-
# Automatically convert third-party libraries to use AndroidX
25-
android.enableJetifier=true
2624

2725
# Use this property to specify which architecture you want to build.
2826
# You can also override it from the CLI using
@@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
3432
# your application. You should enable this flag either if you want
3533
# to write custom TurboModules/Fabric components OR use libraries that
3634
# are providing them.
37-
newArchEnabled=false
35+
newArchEnabled=true
3836

3937
# Use this property to enable or disable the Hermes JS engine.
4038
# If set to false, you will be using JSC instead.
-19.7 KB
Binary file not shown.

example/android/gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/android/gradlew

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

example/android/gradlew.bat

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################

example/android/settings.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2+
plugins { id("com.facebook.react.settings") }
3+
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
14
rootProject.name = 'RNSwanBrowserExample'
2-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
35
include ':app'
46
includeBuild('../node_modules/@react-native/gradle-plugin')

0 commit comments

Comments
 (0)