react-native 0.63 适配 Xcode 15 iOS 17.0+

iOS 17.0 Simulator(21A328)下载失败

App Store 更新到 Xcode15 后,无法运行模拟器和真机。需要下载iOS 17对应的模拟器。Xcode中更新非常容易中断失败,可以在官网单独下载iOS 17模拟器文件,例如:iOS_17.0.1_Simulator_Runtime.dmg(7GB),官方下载链接:developer.apple.com/download/al...https://link.juejin.cn/?target=https%3A%2F%2Fdeveloper.apple.com%2Fdownload%2Fall%2F%3Fq%3DXcode

选择对应版本的 Simulator Runtime 下载即可,下载完成后执行如下命令进行安装:

bash 复制代码
sudo xcode-select -s /Applications/Xcode.app
xcodebuild -runFirstLaunch
xcrun simctl runtime add "/Users/songlcy/Downloads/iOS_17.0.1_Simulator_Runtime.dmg"

WkwebsiteDataStore: type argument 'nw_proxy_config_t' is neither an Objective-C object nor a block type

找到 WkwebsiteDataStore.h 文件,将 170000 修改为 180000 :

Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.

打开 Build Settings,找到 Other Linker Flags,在当下添加 -ld64

react-native-fast-image

修改 FFFastImageView.m 文件:

diff 复制代码
diff --git a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
index 9c0f1d3..e71f92f 100644
--- a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
+++ b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
@@ -71,11 +71,11 @@ - (void)setImageColor:(UIColor *)imageColor {
 
 - (UIImage*)makeImage:(UIImage *)image withTint:(UIColor *)color {
     UIImage *newImage = [image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
-    UIGraphicsBeginImageContextWithOptions(image.size, NO, newImage.scale);
-    [color set];
-    [newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)];
-    newImage = UIGraphicsGetImageFromCurrentImageContext();
-    UIGraphicsEndImageContext();
+    UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:image.size];
+    newImage = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {
+        [color setFill];
+        [newImage drawInRect:CGRectMake(0, 0, image.size.width, newImage.size.height)];
+    }];
     return newImage;
 }
 

持续更新中...

相关推荐
哼唧唧_14 小时前
React Native开发鸿蒙运动健康类应用的项目实践记录
react native·harmonyos·harmony os5·运动健康
程序员小刘1 天前
鸿蒙【HarmonyOS 5】 (React Native)的实战教程
react native·华为·harmonyos
烈焰晴天1 天前
使用ReactNative加载Svga动画支持三端【Android/IOS/Harmony】
android·react native·ios
哼唧唧_2 天前
使用 React Native 开发鸿蒙运动健康类应用的高频易错点总结
react native·react.js·harmonyos·harmony os5·运动健康
鄂鱼2 天前
使用react-native-skia实现自绘地图实践与踩坑记录
react native
依旧002 天前
react native webview加载本地HTML,解决iOS无法加载成功问题
react native·ios·html·vite·webview
不想当reducer2 天前
React Native 阿里云 OSS 上传实战:从相册资源处理到动态签名管理
前端·javascript·react native
hellokai3 天前
ReactNative介绍及简化版原理实现
android·react native
哼唧唧_4 天前
基于React Native开发鸿蒙新闻类应用的实战开发笔记
react native·华为·新闻·harmony os5
老猿阿浪4 天前
React Native 实现抖音式图片滑动切换浏览组件-媲美抖音体验的滑动式流畅预览组件
javascript·react native·react.js