Skip to content

Commit 03d7842

Browse files
authored
Merge d0a8a29 into a615e7e
2 parents a615e7e + d0a8a29 commit 03d7842

File tree

26 files changed

+1333
-174
lines changed

26 files changed

+1333
-174
lines changed

.github/workflows/codegen.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
cd samples/react-native/ios
2929
node ../node_modules/react-native/scripts/generate-codegen-artifacts.js \
3030
--path .. \
31-
--outputPath codegen
31+
--outputPath codegen \
32+
--targetPlatform ios
3233
steps:
3334
- uses: actions/checkout@v4
3435
- run: corepack enable

.github/workflows/e2e.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,15 @@ jobs:
164164
strategy:
165165
fail-fast: false # keeps matrix running if one fails
166166
matrix:
167-
rn-version: ['0.65.3', '0.73.9']
167+
rn-version: ['0.65.3', '0.75.4']
168168
rn-architecture: ['legacy', 'new']
169169
platform: ['android', 'ios']
170170
build-type: ['production']
171171
ios-use-frameworks: ['no', 'static', 'dynamic']
172172
engine: ['hermes', 'jsc']
173173
include:
174174
- platform: ios
175-
rn-version: '0.73.9'
175+
rn-version: '0.75.4'
176176
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
177177
runtime: 'latest'
178178
device: 'iPhone 14'
@@ -185,7 +185,7 @@ jobs:
185185
runs-on: ubuntu-latest
186186
exclude:
187187
# exclude JSC for new RN versions (keeping the matrix manageable)
188-
- rn-version: '0.73.9'
188+
- rn-version: '0.75.4'
189189
engine: 'jsc'
190190
# exclude all rn versions lower than 0.70.0 for new architecture
191191
- rn-version: '0.65.3'
@@ -304,15 +304,15 @@ jobs:
304304
strategy:
305305
fail-fast: false # keeps matrix running if one fails
306306
matrix:
307-
rn-version: ['0.65.3', '0.73.9']
307+
rn-version: ['0.65.3', '0.75.4']
308308
rn-architecture: ['legacy', 'new']
309309
platform: ['android', 'ios']
310310
build-type: ['production']
311311
ios-use-frameworks: ['no'] # test only no framworks
312312
engine: ['hermes', 'jsc']
313313
include:
314314
- platform: ios
315-
rn-version: '0.73.9'
315+
rn-version: '0.75.4'
316316
runs-on: macos-14 # uses m1 https://github.blog/changelog/2024-01-30-github-actions-macos-14-sonoma-is-now-available/
317317
runtime: 'latest'
318318
device: 'iPhone 14'
@@ -330,10 +330,10 @@ jobs:
330330
# e2e test only the default combinations
331331
- rn-version: '0.65.3'
332332
engine: 'hermes'
333-
- rn-version: '0.73.9'
333+
- rn-version: '0.75.4'
334334
engine: 'jsc'
335335
# E2E timeout due to a race condition https://github.com/facebook/react-native/issues/42123#issuecomment-1881203719
336-
- rn-version: '0.73.9'
336+
- rn-version: '0.75.4'
337337
platform: 'ios'
338338
rn-architecture: 'new'
339339
env:

.github/workflows/sample-application.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ jobs:
103103
[[ "${{ matrix.platform }}" == "ios" ]] && cd react-native/ios
104104
[[ "${{ matrix.platform }}" == "macos" ]] && cd react-native-macos/macos
105105
106-
export NO_FLIPPER=1 # Flipper is causing build issues on iOS, so we disable it
107106
[[ "${{ matrix.build-type }}" == "production" ]] && ENABLE_PROD=1 || ENABLE_PROD=0
108107
[[ "${{ matrix.rn-architecture }}" == "new" ]] && ENABLE_NEW_ARCH=1 || ENABLE_NEW_ARCH=0
109108
[[ "${{ matrix.ios-use-frameworks }}" == "dynamic-frameworks" ]] && export USE_FRAMEWORKS=dynamic

.github/workflows/testflight.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
- name: Install Dependencies
4040
if: steps.deps-cache.outputs['cache-hit'] != 'true'
4141
run: |
42+
corepack enable
4243
yarn install
4344
cd samples/react-native && yarn install
4445
- name: Build SDK
@@ -52,7 +53,7 @@ jobs:
5253

5354
- name: Pod Install
5455
working-directory: samples/react-native/ios
55-
run: NO_FLIPPER=1 PRODUCTION=1 bundle exec pod install
56+
run: PRODUCTION=1 bundle exec pod install
5657

5758
- name: Run Fastlane
5859
working-directory: samples/react-native

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Dependencies
6+
7+
- Upgrade sample and E2E tests to RN 0.75 ([#4155](https://github.com/getsentry/sentry-react-native/pull/4155))
8+
39
## 6.0.0-rc.1
410

511
### Fixes

dev-packages/e2e-tests/cli.mjs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ if (!env.USE_FRAMEWORKS || env.USE_FRAMEWORKS === 'no') {
5050
delete env.USE_FRAMEWORKS;
5151
}
5252

53-
if (platform == 'ios') {
54-
// Flipper is causing build issues on iOS, so we disable it
55-
env.NO_FLIPPER = 1;
56-
}
57-
5853
const e2eDir = path.resolve(__dirname);
5954
const e2eTestPackageName = JSON.parse(fs.readFileSync(`${e2eDir}/package.json`, 'utf8')).name;
6055
const patchScriptsDir = path.resolve(e2eDir, 'patch-scripts');

dev-packages/e2e-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"appium-xcuitest-driver": "5.13.0",
2222
"babel-jest": "^29.7.0",
2323
"jest": "^29.7.0",
24-
"react": "18.2.0",
25-
"react-native": "0.73.9",
24+
"react": "18.3.1",
25+
"react-native": "0.75.4",
2626
"typescript": "4.9.5",
2727
"webdriverio": "^8.27.0"
2828
},

samples/react-native/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

samples/react-native/android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ react {
102102
//
103103
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
104104
// hermesFlags = ["-O", "-output-source-map"]
105+
106+
/* Autolinking */
107+
autolinkLibrariesWithApp()
105108
}
106109

107110
/**
@@ -196,7 +199,6 @@ android {
196199
dependencies {
197200
// The version of react-native is set by the React Native Gradle Plugin
198201
implementation("com.facebook.react:react-android")
199-
implementation("com.facebook.react:flipper-integration")
200202

201203
if (hermesEnabled.toBoolean()) {
202204
implementation("com.facebook.react:hermes-android")
@@ -205,8 +207,6 @@ dependencies {
205207
}
206208
}
207209

208-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
209-
210210
if (newArchEnabled.toBoolean()) {
211211
android {
212212
externalNativeBuild {

samples/react-native/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
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"

samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/MainApplication.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ 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.flipper.ReactNativeFlipper
1312
import com.facebook.soloader.SoLoader
1413
import io.sentry.Hint
1514
import io.sentry.SentryEvent
@@ -34,7 +33,7 @@ class MainApplication() : Application(), ReactApplication {
3433
}
3534

3635
override val reactHost: ReactHost
37-
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
36+
get() = getDefaultReactHost(applicationContext, reactNativeHost)
3837

3938
override fun onCreate() {
4039
super.onCreate()
@@ -46,7 +45,6 @@ class MainApplication() : Application(), ReactApplication {
4645
// If you opted-in for the New Architecture, we load the native entry point for this app.
4746
load()
4847
}
49-
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
5048
}
5149

5250
private fun initializeSentry() {

samples/react-native/android/app/src/release/java/io/sentry/reactnative/sample/ReactNativeFlipper.java

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

samples/react-native/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
buildscript {
33
ext {
44
buildToolsVersion = "34.0.0"
5-
minSdkVersion = 21
5+
minSdkVersion = 23
66
compileSdkVersion = 34
77
targetSdkVersion = 34
8-
ndkVersion = "25.1.8937393"
9-
kotlinVersion = "1.8.0"
8+
ndkVersion = "26.1.10909125"
9+
kotlinVersion = "1.9.24"
1010
}
1111
repositories {
1212
google()

samples/react-native/android/gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ org.gradle.logging.level=lifecycle
2222
# Android operating system, and which are packaged with your app's APK
2323
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2424
android.useAndroidX=true
25-
# Automatically convert third-party libraries to use AndroidX
26-
android.enableJetifier=true
2725

2826
# Use this property to specify which architecture you want to build.
2927
# You can also override it from the CLI using

samples/react-native/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
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.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

samples/react-native/android/gradlew

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (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
58+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
145145
case $MAX_FD in #(
146146
max*)
147147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
149149
MAX_FD=$( ulimit -H -n ) ||
150150
warn "Could not query maximum file descriptor limit"
151151
esac
152152
case $MAX_FD in #(
153153
'' | soft) :;; #(
154154
*)
155155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
157157
ulimit -n "$MAX_FD" ||
158158
warn "Could not set maximum file descriptor limit to $MAX_FD"
159159
esac
@@ -202,11 +202,11 @@ fi
202202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204204

205-
# Collect all arguments for the java command;
206-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
207-
# shell script including quotes and variable substitutions, so put them in
208-
# double quotes to make sure that they get re-expanded; and
209-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
210210

211211
set -- \
212212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

samples/react-native/android/gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

Lines changed: 3 additions & 1 deletion
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 = 'sentry-react-native-sample'
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')

samples/react-native/ios/Podfile

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ require Pod::Executable.execute_command('node', ['-p',
77

88
platform :ios, min_ios_version_supported
99
prepare_react_native_project!
10-
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
11-
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
12-
#
13-
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
14-
# ```js
15-
# module.exports = {
16-
# dependencies: {
17-
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
18-
# ```
19-
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
2010
linkage = ENV['USE_FRAMEWORKS']
2111
if linkage != nil
2212
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
@@ -39,11 +29,6 @@ target 'sentryreactnativesample' do
3929

4030
use_react_native!(
4131
:path => config[:reactNativePath],
42-
# Enables Flipper.
43-
#
44-
# Note that if you have use_frameworks! enabled, Flipper will not work and
45-
# you should disable the next line.
46-
:flipper_configuration => flipper_config,
4732
# An absolute path to your application root.
4833
:app_path => "#{Pod::Config.instance.installation_root}/.."
4934
)
@@ -62,7 +47,8 @@ target 'sentryreactnativesample' do
6247
react_native_post_install(
6348
installer,
6449
config[:reactNativePath],
65-
:mac_catalyst_enabled => false
50+
:mac_catalyst_enabled => false,
51+
# :ccache_enabled => true
6652
)
6753
end
6854
end

0 commit comments

Comments
 (0)