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.
28 lines
865 B
Diff
28 lines
865 B
Diff
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);
|
|
}
|