Skip to content

chore(deps): Bumps sample app to RN 0.76.3 #4207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ebb7d98
Upgrades sample app to RN 0.76.0
antonis Oct 25, 2024
f3c875f
Add react-native-safe-area-context with commit reference
antonis Oct 25, 2024
f92c67e
Updates react-native-safe-area-context to 4.12.0
antonis Oct 28, 2024
adb744d
Use latest stable version of react-native-screens
antonis Oct 28, 2024
0a06263
Update react-navigation libraries
antonis Oct 28, 2024
45e2faf
Set react-native-community/cli version to 15.0.0
antonis Oct 28, 2024
295af6c
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Oct 30, 2024
a5f536f
Upgrade ro RN0.76.1
antonis Oct 30, 2024
cf617f4
Updates Gemfile
antonis Oct 30, 2024
a6ebb8b
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Oct 31, 2024
a68db6c
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 1, 2024
a731fa4
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 7, 2024
4379135
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 11, 2024
a75fa9e
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 14, 2024
dd7143d
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 14, 2024
6a800d3
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 18, 2024
80c975c
Update to 0.76.2
antonis Nov 18, 2024
7e4aa97
Update dependencies
antonis Nov 18, 2024
622ff2f
Update lockfile
antonis Nov 18, 2024
28279bd
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 18, 2024
88a2854
Polyfill setImmediate if it doesn't exist
antonis Nov 18, 2024
c5c8f76
Require setImmediate
antonis Nov 18, 2024
8b2e4da
Revert "Require setImmediate"
antonis Nov 19, 2024
75e8595
require setimmediate if not defined
antonis Nov 19, 2024
b5d061e
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 19, 2024
cc5bb67
Align gemfile with RN sample
antonis Nov 19, 2024
0ee8387
Merge branch 'main' into antonis/chore-samples-rn0.76.0
antonis Nov 22, 2024
3a6ae09
Bump to 0.76.3
antonis Nov 22, 2024
db06022
Reverts enforcing native module spec
antonis Nov 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.soloader.OpenSourceMergedSoMapping
import com.facebook.soloader.SoLoader
import io.sentry.Hint
import io.sentry.SentryEvent
Expand Down Expand Up @@ -40,7 +41,7 @@ class MainApplication() : Application(), ReactApplication {
// When the native init is enabled the `autoInitializeNativeSdk`
// in JS has to be set to `false`
// this.initializeSentry()
SoLoader.init(this, false)
SoLoader.init(this, OpenSourceMergedSoMapping)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ project(appmodules)
# This file includes all the necessary to let you build your application with the New Architecture.
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)

# App needs to add and link against tm (TurboModules) folder
add_subdirectory(${REACT_ANDROID_DIR}/../../../tm/ tm_build)
target_link_libraries(${CMAKE_PROJECT_NAME} tm)
# Define where the additional source code lives. We need to crawl back the jni, main, src, app, android folders
target_sources(${CMAKE_PROJECT_NAME} PRIVATE ../../../../../tm/NativeSampleModule.cpp)

# Define where CMake can find the additional header files. We need to crawl back the jni, main, src, app, android folders
target_include_directories(${CMAKE_PROJECT_NAME} PUBLIC ../../../../../tm)
4 changes: 4 additions & 0 deletions samples/react-native/android/app/src/main/jni/OnLoad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <fbjni/fbjni.h>
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#include <rncore.h>
#include <NativeSampleModule.h>

#ifdef REACT_NATIVE_APP_CODEGEN_HEADER
#include REACT_NATIVE_APP_CODEGEN_HEADER
Expand Down Expand Up @@ -70,6 +71,9 @@ std::shared_ptr<TurboModule> cxxModuleProvider(
// if (name == NativeCxxModuleExample::kModuleName) {
// return std::make_shared<NativeCxxModuleExample>(jsInvoker);
// }
if (name == NativeSampleModule::kModuleName) {
return std::make_shared<NativeSampleModule>(jsInvoker);
}

// And we fallback to the CXX module providers autolinked
return autolinking_cxxModuleProvider(name, jsInvoker);
Expand Down
6 changes: 3 additions & 3 deletions samples/react-native/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
buildToolsVersion = "35.0.0"
minSdkVersion = 24
compileSdkVersion = 35
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 2 additions & 1 deletion samples/react-native/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
"$(inherited)",
);
INFOPLIST_FILE = sentryreactnativesampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -475,7 +475,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
COPY_PHASE_STRIP = NO;
INFOPLIST_FILE = sentryreactnativesampleTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -506,6 +506,7 @@
ENABLE_BITCODE = NO;
INFOPLIST_FILE = sentryreactnativesample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN";
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -539,6 +540,7 @@
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 97JCY7859U;
INFOPLIST_FILE = sentryreactnativesample/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Sentry RN";
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -620,7 +622,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD = "";
LDPLUSPLUS = "";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -709,7 +711,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
);
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD = "";
LDPLUSPLUS = "";
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import "AppDelegate.h"

#import <React/RCTBundleURLProvider.h>
#import <RCTAppDelegate+Protected.h>
#import <React/CoreModulesPlugins.h>
#import <ReactCommon/RCTTurboModuleManager.h>

Expand Down
29 changes: 15 additions & 14 deletions samples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"postinstall": "patch-package",
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start --experimental-debugger",
"start": "react-native start",
"test": "jest",
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx",
"fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
Expand All @@ -28,24 +28,25 @@
"@sentry/react-native": "6.1.0",
"delay": "^6.0.0",
"react": "18.3.1",
"react-native": "0.75.4",
"react-native-gesture-handler": "^2.18.1",
"react-native-reanimated": "3.15.0",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.34.0",
"react-native-svg": "^15.6.0",
"react-native": "0.76.0",
"react-native-gesture-handler": "^2.20.2",
"react-native-reanimated": "3.16.1",
"react-native-safe-area-context": "github:th3rdwave/react-native-safe-area-context#main",
"react-native-screens": "4.0.0-beta.14",
"react-native-svg": "^15.8.0",
"react-native-vector-icons": "^10.0.3",
"react-redux": "^8.1.3",
"redux": "^4.2.1"
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/runtime": "^7.22.5",
"@react-native/babel-preset": "0.75.4",
"@react-native/eslint-config": "0.75.4",
"@react-native/metro-config": "0.75.4",
"@react-native/typescript-config": "0.75.4",
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "latest",
"@react-native/babel-preset": "0.76.0",
"@react-native/eslint-config": "0.76.0",
"@react-native/metro-config": "0.76.0",
"@react-native/typescript-config": "0.76.0",
"@sentry/babel-plugin-component-annotate": "^2.18.0",
"@types/react": "^18.2.65",
"@types/react-native-vector-icons": "^6.4.18",
Expand Down
5 changes: 2 additions & 3 deletions samples/react-native/tm/NativePlatformSampleModule.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';
import {TurboModule, TurboModuleRegistry} from 'react-native';

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

export default TurboModuleRegistry.get<Spec>('NativePlatformSampleModule');
export default TurboModuleRegistry.getEnforcing<Spec>('NativePlatformSampleModule');
Loading
Loading