【发布时间】:2022-01-24 06:10:14
【问题描述】:
我在 Xcode 模拟器中启动我的颤振应用时遇到问题。该应用程序的 android 版本在使用 android 模拟器进行测试时运行良好,即使在成功构建应用程序时也没有出现任何错误,但我不知道 Xcode 出了什么问题。 (IOS版)
颤振版本:v2.5.3 |开发工具:v2.8.0
错误日志:(颤振运行)
Unable to install /Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/build/ios/iphonesimulator/Runner.app on FEBE8117-5EC5-429F-820D-DA1F80359C7B. This is sometimes caused by a
malformed plist file:
ProcessException: Process exited abnormally:
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.
Command: /usr/bin/arch -arm64e xcrun simctl install FEBE8117-5EC5-429F-820D-DA1F80359C7B
/Users/USER_NAME/Documents/APP_NAME/main_files/source/wordpress_app/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone 11.
感谢您提供的任何帮助。
【问题讨论】:
-
该错误表明您的
Info.plist文件存在问题。你能分享一下你的Info.plist文件是什么样子的吗? -
当然,这里是:pastebin.com/pVhNRn8h
-
不要尝试对您的 CFBundleIdentifier 进行硬编码,尝试使用
<key>CFBundleIdentifier</key><string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> -
亲爱的,我不需要用我的 iOS 包名替换 CFBundleIdentifier 值吗?
-
PRODUCT_BUNDLE_IDENTIFIER应该设置为你的 iOS 包名。不要在Info.plist文件中手动设置CFBundleIdentifier。