iOS 模拟器上的错误 运行 Expo 应用程序

Error running Expo app on iOS Simulator

尝试从 XDE 启动 Expo 项目时,出现以下问题,Expo 模拟器应用无法安装:

Error running xcrun simctl install booted /Users/username/.expo/ios-simulator-app-cache/Exponent-X.Y.Z.app: An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The bundle identifier of the application could not be determined.

Ensure that the application's Info.plist contains a value for CFBundleIdentifier.

Error installing or running app. Error: Process exited with non-zero code: 22

在XDE中会显示如下图:

这似乎是您计算机上存储的模拟器应用程序的损坏或不兼容版本。 Expo 开发环境 (XDE) 不会自动解决此问题。

如 Expo 和 XDE 论坛所述,解决此问题的方法是导航至:

~/.expo/ios-simulator-app-cache/

在 Finder 中,删除文件 Exponent-X.Y.Z,其中 X、Y 和 Z 代表应用程序的版本。

来源:https://forums.expo.io/t/error-installing-expo-on-ios-simulator/741