Skip to content

Commit 8cf605f

Browse files
authored
chore(deps): Bumps sample app to RN 0.76.3 (#4207)
1 parent 690220d commit 8cf605f

File tree

14 files changed

+822
-116
lines changed

14 files changed

+822
-116
lines changed

samples/react-native/Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ ruby "3.3.0"
66
gem 'cocoapods', '1.15.2'
77
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
88
gem 'fastlane', '2.220.0'
9+
gem 'xcodeproj', '< 1.26.0'

samples/react-native/Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ GEM
159159
xcpretty (~> 0.3.0)
160160
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
161161
ffi (1.17.0-arm64-darwin)
162-
ffi (1.17.0-x86_64-darwin)
163162
fourflusher (2.3.1)
164163
fuzzy_match (2.0.4)
165164
gh_inspector (1.1.3)
@@ -280,6 +279,7 @@ DEPENDENCIES
280279
activesupport (>= 6.1.7.5, < 7.1.0)
281280
cocoapods (= 1.15.2)
282281
fastlane (= 2.220.0)
282+
xcodeproj (< 1.26.0)
283283

284284
RUBY VERSION
285285
ruby 3.3.0p0

samples/react-native/android/app/src/main/java/io/sentry/reactnative/sample/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
import io.sentry.Hint
1415
import io.sentry.SentryEvent
@@ -40,7 +41,7 @@ class MainApplication() : Application(), ReactApplication {
4041
// When the native init is enabled the `autoInitializeNativeSdk`
4142
// in JS has to be set to `false`
4243
// this.initializeSentry()
43-
SoLoader.init(this, false)
44+
SoLoader.init(this, OpenSourceMergedSoMapping)
4445
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
4546
// If you opted-in for the New Architecture, we load the native entry point for this app.
4647
load()

samples/react-native/android/app/src/main/jni/CMakeLists.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ project(appmodules)
3030
# This file includes all the necessary to let you build your application with the New Architecture.
3131
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
3232

33-
# App needs to add and link against tm (TurboModules) folder
34-
add_subdirectory(${REACT_ANDROID_DIR}/../../../tm/ tm_build)
35-
target_link_libraries(${CMAKE_PROJECT_NAME} tm)
33+
# Define where the additional source code lives. We need to crawl back the jni, main, src, app, android folders
34+
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ../../../../../tm/NativeSampleModule.cpp)
35+
36+
# Define where CMake can find the additional header files. We need to crawl back the jni, main, src, app, android folders
37+
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ../../../../../tm)

samples/react-native/android/app/src/main/jni/OnLoad.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#include <DefaultComponentsRegistry.h>
3131
#include <DefaultTurboModuleManagerDelegate.h>
32+
#include <NativeSampleModule.h>
3233
#include <autolinking.h>
3334
#include <fbjni/fbjni.h>
3435
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
@@ -71,6 +72,9 @@ cxxModuleProvider(const std::string &name, const std::shared_ptr<CallInvoker> &j
7172
// if (name == NativeCxxModuleExample::kModuleName) {
7273
// return std::make_shared<NativeCxxModuleExample>(jsInvoker);
7374
// }
75+
if (name == NativeSampleModule::kModuleName) {
76+
return std::make_shared<NativeSampleModule>(jsInvoker);
77+
}
7478

7579
// And we fallback to the CXX module providers autolinked
7680
return autolinking_cxxModuleProvider(name, jsInvoker);

samples/react-native/android/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11

22
buildscript {
33
ext {
4-
buildToolsVersion = "34.0.0"
5-
minSdkVersion = 23
6-
compileSdkVersion = 34
4+
buildToolsVersion = "35.0.0"
5+
minSdkVersion = 24
6+
compileSdkVersion = 35
77
targetSdkVersion = 34
88
ndkVersion = "26.1.10909125"
99
kotlinVersion = "1.9.24"

samples/react-native/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.8-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

samples/react-native/android/gradlew

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ done
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
8686
# 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
87+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
88+
' "$PWD" ) || exit
8889

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

samples/react-native/ios/sentryreactnativesample.xcodeproj/project.pbxproj

+6-4
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
"$(inherited)",
452452
);
453453
INFOPLIST_FILE = sentryreactnativesampleTests/Info.plist;
454-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
454+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
455455
LD_RUNPATH_SEARCH_PATHS = (
456456
"$(inherited)",
457457
"@executable_path/Frameworks",
@@ -475,7 +475,7 @@
475475
BUNDLE_LOADER = "$(TEST_HOST)";
476476
COPY_PHASE_STRIP = NO;
477477
INFOPLIST_FILE = sentryreactnativesampleTests/Info.plist;
478-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
478+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
479479
LD_RUNPATH_SEARCH_PATHS = (
480480
"$(inherited)",
481481
"@executable_path/Frameworks",
@@ -507,6 +507,7 @@
507507
ENABLE_BITCODE = NO;
508508
INFOPLIST_FILE = sentryreactnativesample/Info.plist;
509509
INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN";
510+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
510511
LD_RUNPATH_SEARCH_PATHS = (
511512
"$(inherited)",
512513
"@executable_path/Frameworks",
@@ -541,6 +542,7 @@
541542
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 97JCY7859U;
542543
INFOPLIST_FILE = sentryreactnativesample/Info.plist;
543544
INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN";
545+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
544546
LD_RUNPATH_SEARCH_PATHS = (
545547
"$(inherited)",
546548
"@executable_path/Frameworks",
@@ -622,7 +624,7 @@
622624
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
623625
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
624626
);
625-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
627+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
626628
LD = "";
627629
LDPLUSPLUS = "";
628630
LD_RUNPATH_SEARCH_PATHS = (
@@ -711,7 +713,7 @@
711713
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
712714
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
713715
);
714-
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
716+
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
715717
LD = "";
716718
LDPLUSPLUS = "";
717719
LD_RUNPATH_SEARCH_PATHS = (

samples/react-native/ios/sentryreactnativesample/AppDelegate.mm

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#import "AppDelegate.h"
22

3+
#import <RCTAppDelegate+Protected.h>
34
#import <React/CoreModulesPlugins.h>
45
#import <React/RCTBundleURLProvider.h>
56
#import <ReactCommon/RCTTurboModuleManager.h>

samples/react-native/package.json

+22-19
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"postinstall": "patch-package",
77
"android": "react-native run-android",
88
"ios": "react-native run-ios",
9-
"start": "react-native start --experimental-debugger",
9+
"start": "react-native start",
1010
"test": "jest",
1111
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx",
1212
"fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
@@ -21,32 +21,35 @@
2121
"build-android-release-splits-flavors": "export SENTRY_SAMPLE_ENABLE_ABI_SPLIT=true; export SENTRY_SAMPLE_ENABLE_FLAVORS=true; cd android; ./gradlew assembleRelease; cd .."
2222
},
2323
"dependencies": {
24-
"@react-navigation/bottom-tabs": "^6.5.12",
25-
"@react-navigation/native": "^6.1.9",
26-
"@react-navigation/native-stack": "^6.9.17",
27-
"@react-navigation/stack": "^6.3.20",
24+
"@react-navigation/bottom-tabs": "^7.0.4",
25+
"@react-navigation/native": "^7.0.3",
26+
"@react-navigation/native-stack": "^7.0.3",
27+
"@react-navigation/stack": "^7.0.3",
2828
"@sentry/react-native": "6.3.0-beta.1",
2929
"delay": "^6.0.0",
3030
"react": "18.3.1",
31-
"react-native": "0.75.4",
32-
"react-native-gesture-handler": "^2.18.1",
33-
"react-native-reanimated": "3.15.0",
34-
"react-native-safe-area-context": "4.10.5",
35-
"react-native-screens": "3.35.0",
36-
"react-native-svg": "^15.6.0",
37-
"react-native-vector-icons": "^10.0.3",
31+
"react-native": "0.76.3",
32+
"react-native-gesture-handler": "^2.21.1",
33+
"react-native-reanimated": "3.16.1",
34+
"react-native-safe-area-context": "4.14.0",
35+
"react-native-screens": "4.1.0",
36+
"react-native-svg": "^15.9.0",
37+
"react-native-vector-icons": "^10.2.0",
3838
"react-native-webview": "^13.12.3",
3939
"react-redux": "^8.1.3",
4040
"redux": "^4.2.1"
4141
},
4242
"devDependencies": {
43-
"@babel/core": "^7.22.5",
44-
"@babel/preset-env": "^7.22.5",
45-
"@babel/runtime": "^7.22.5",
46-
"@react-native/babel-preset": "0.75.4",
47-
"@react-native/eslint-config": "0.75.4",
48-
"@react-native/metro-config": "0.75.4",
49-
"@react-native/typescript-config": "0.75.4",
43+
"@babel/core": "^7.25.2",
44+
"@babel/preset-env": "^7.25.3",
45+
"@babel/runtime": "^7.25.0",
46+
"@react-native-community/cli": "15.0.1",
47+
"@react-native-community/cli-platform-android": "15.0.1",
48+
"@react-native-community/cli-platform-ios": "15.0.1",
49+
"@react-native/babel-preset": "0.76.3",
50+
"@react-native/eslint-config": "0.76.3",
51+
"@react-native/metro-config": "0.76.3",
52+
"@react-native/typescript-config": "0.76.3",
5053
"@sentry/babel-plugin-component-annotate": "^2.18.0",
5154
"@types/react": "^18.2.65",
5255
"@types/react-native-vector-icons": "^6.4.18",

samples/react-native/src/App.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ import HeavyNavigationScreen from './Screens/HeavyNavigationScreen';
3737
import WebviewScreen from './Screens/WebviewScreen';
3838
import { isTurboModuleEnabled } from '@sentry/react-native/dist/js/utils/environment';
3939

40+
if (typeof setImmediate === 'undefined') {
41+
require('setimmediate');
42+
}
43+
4044
LogBox.ignoreAllLogs();
4145
const isMobileOs = Platform.OS === 'android' || Platform.OS === 'ios';
4246

samples/react-native/tm/NativePlatformSampleModule.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { TurboModule } from 'react-native';
2-
import { TurboModuleRegistry } from 'react-native';
1+
import {TurboModule, TurboModuleRegistry} from 'react-native';
32

43
export interface Spec extends TurboModule {
54
crashOrString(): string;

0 commit comments

Comments
 (0)