模拟机开启Rosetta模式/运行报错 Simulator device returned an error for the requested operation.

Simulator device returned an error for the requested operation.
Application launch for 'App' did not return a valid pid nor a launch error.

M芯片电脑XCode14.3运行老版本项目,在XCode提示以Rosetta运行可以处理该问题
在无提示下运行报Undefined symbol: _OBJC_CLASS_$错误,处理后模拟机报错,以下两种方法二选一即可

  • 1) XCode设置模拟机Rosetta运行
    XCode -> Product -> Destination -> Destination Architectures -> Show Rosetta Destinations
    当模拟机后缀标注出(Rosetta)即可

  • 2) 终端以Rosetta启动

softwareupdate --install-rosetta

或者如果想跳过许可协议,直接执行以下操作:

/usr/sbin/softwareupdate --install-rosetta --agree-to-license

Undefined symbol: OBJC_CLASS$ 错误处理


抹除模拟机所有数据及设置

Simulator -> Device -> Erase All contents and settings


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容