MacOS Monterey 12.6.1 + XCode 14.1 (14B47b) + 模拟器 iPhone11 ios13.4

启动步骤

  1. 打开终端yarn start 启动Metro服务
  2. 打开XCode,打开项目中的ios文件夹下的 .xcworkspace 项目文件
  3. 点击 ▶️ 编译运行

问题处理方法

myApp/ios/Pods/Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift:532:1 Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'
public func replaceSubrange<C&gt;(_ subrange: Swift.Range<Int>, with newElements: C) where C :
  Collection, ChartDataEntry == C.Element {
}

myApp/ios/bundle/assets: No such file or directory

  • 问题:
myApp/ios/bundle/main.jsbundle: No such file or directory
  1. package.json文件新增命令
"scripts": {
    ......
    "bundle-ios":"node node_modules/react-native/local-cli/cli.js bundle --entry-file index.js  --platform ios --dev false --bundle-output ios/bundle/main.jsbundle --assets-dest ios/bundle"
  },
  1. 终端运行 yarn bundle-ios

  1. XCode重新点击 ▶️ 编译运行

原文地址:https://blog.csdn.net/u010108836/article/details/128160106

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_12621.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注