feat: upgrade to react native 0.79

This was necessary because we had to use the newest iOS SDK, which had an issue with react-native, which was only fixed with the newest versions.

The move to new architecture has been hellish, but all appears to work. It requires more patches, and it shows which packages are currently maintained poorly. This goes especially for react-native-track-player. We're using a fork right now, but in order to make that work, we had to switch to pnpm.
This commit is contained in:
Lei Nelissen
2025-05-06 11:11:49 +02:00
parent a2d10756a5
commit af3c807d5a
44 changed files with 13027 additions and 13329 deletions

View File

@@ -1,25 +0,0 @@
diff --git a/node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh b/node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh
index 6427338..c84ac33 100755
--- a/node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh
+++ b/node_modules/@sentry/react-native/scripts/sentry-xcode-debug-files.sh
@@ -2,8 +2,8 @@
# Upload Debug Symbols to Sentry Xcode Build Phase
# PWD=ios
-# print commands before executing them and stop on first error
-set -x -e
+# print commands before executing them
+set -x
[ -z "$WITH_ENVIRONMENT" ] && WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
@@ -12,6 +12,9 @@ if [ -f "$WITH_ENVIRONMENT" ]; then
. "$WITH_ENVIRONMENT"
fi
+# stop on first error (we can't use -e before as any failed command in WITH_ENVIRONMENT would stop the debug files upload)
+set -e
+
LOCAL_NODE_BINARY=${NODE_BINARY:-node}
[ -z "$SENTRY_PROPERTIES" ] && export SENTRY_PROPERTIES=sentry.properties

View File

@@ -1,13 +0,0 @@
diff --git a/node_modules/@shopify/react-native-skia/android/build.gradle b/node_modules/@shopify/react-native-skia/android/build.gradle
index 29e74bf..f2b35a5 100644
--- a/node_modules/@shopify/react-native-skia/android/build.gradle
+++ b/node_modules/@shopify/react-native-skia/android/build.gradle
@@ -135,6 +135,8 @@ android {
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
+ ndkVersion safeExtGet('ndkVersion', '26.1.10909125')
+
versionCode 1
versionName "1.0"

View File

@@ -0,0 +1,24 @@
diff --git a/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt b/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt
index baeebce2489e6f9e47ce2ebb9332072e31ba24d5..e52a053d99fcc568d03a0294840b0463f04d01c9 100644
--- a/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt
+++ b/android/src/main/java/com/doublesymmetry/trackplayer/service/MusicService.kt
@@ -756,10 +756,15 @@ class MusicService : HeadlessJsTaskService() {
return HeadlessJsTaskConfig(TASK_KEY, Arguments.createMap(), 0, true)
}
- // @MainThread
- // fun onBind(intent: Intent?): IBinder {
- // return binder
- // }
+ @MainThread
+ override fun onBind(intent: Intent): IBinder {
+ return binder
+ }
+
+ @MainThread
+ override fun onUnbind(intent: Intent): Boolean {
+ return super.onUnbind(intent)
+ }
@MainThread
override fun onTaskRemoved(rootIntent: Intent?) {

View File

@@ -0,0 +1,27 @@
diff --git a/apple/RNCWebView.mm b/apple/RNCWebView.mm
index f9d080e3dc6670a2c03208de5b95b1532d001d23..94522636587d71c4deefd1e09fd05e04c616d617 100644
--- a/apple/RNCWebView.mm
+++ b/apple/RNCWebView.mm
@@ -244,7 +244,7 @@ auto stringToOnLoadingFinishNavigationTypeEnum(std::string value) {
webViewEventEmitter->onHttpError(data);
}
};
- self.contentView = _view;
+ [self addSubview:_view];
}
return self;
}
@@ -488,6 +488,13 @@ auto stringToOnLoadingFinishNavigationTypeEnum(std::string value) {
[super updateProps:props oldProps:oldProps];
}
+-(void)layoutSubviews
+{
+ [super layoutSubviews];
+ _view.frame = self.bounds;
+}
+
+
- (void)handleCommand:(nonnull const NSString *)commandName args:(nonnull const NSArray *)args {
RCTRNCWebViewHandleCommand(self, commandName, args);
}

File diff suppressed because one or more lines are too long