【发布时间】:2021-09-10 01:49:12
【问题描述】:
描述错误
当我在 tns cli 或直接在 xcode 中构建和运行我的应用程序时,我遇到了错误:
Unable to apply changes on device: 2727B173-9A43-43B3-A51E-4D3CAC1E3EF9. Error is: Command xcrun with arguments simctl install 2727B173-9A43-43B3-A51E-4D3CAC1E3EF9 /Users/user189510/Documents/poly3000-nativescript/platforms/ios/build/Debug-iphonesimulator/poly3000nativescript.app failed with exit code 22. Error output:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain CFBundleVersion.
App_Resources/IOS 中的 info.plist 似乎没问题:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>fr</string>
<key>CFBundleDisplayName</key>
<string>YaToYa</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.3.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
<key>UseExternalPushProvider</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</plist>
如果值正确(是),我已经检查了 Xcode,清理模拟器,从 xcode 中删除缓存,在删除所有内容后尝试重新启动所有进程,删除 xcode 中的文件夹 Developer/DerivedData...但始终是问题。
我在网上找了很多命题都没有成功。
有人帮帮我吗?
复制
准备应用程序以在模拟器上运行:
tns 清洁 tns 准备 ios tns运行ios
预期行为
在ios模拟器上启动应用
【问题讨论】:
-
你检查过这个答案吗:stackoverflow.com/a/67356969/466577 如果你最近添加了整个文件夹,你可以试试。还有其他建议 - 比如清理项目等。
-
感谢您的回答@AhmedAhmedov 该项目不是在XCode 中创建的,而是使用NativeScript 创建的,NativeScript 创建了XCode 项目。也许问题出在项目创建中……我对此进行了调查。我已经清理了项目、缓存和我认为的所有可能的清理。
标签: ios xcode nativescript-cli