首页 > 解决方案 > NativeScript 无法启动 iOS 模拟器

问题描述

模拟器在我运行时启动ns run ios但是,无法部署应用程序并出现以下错误:

Unable to apply changes on device: D2B97EAA-B6DB-4920-8974-4F615FEB4E82. Error is: Command xcrun with arguments simctl install D2B97EAA-B6DB-4920-8974-4F615FEB4E82 /Users/cupidchan/Documents/GitHub/pistevo-health/NativeScript/platforms/ios/build/Debug-iphonesimulator/NativeScript.app failed with exit code 1. Error output:
 An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
Unable To Install “NativeScript”
Please try again later.
The parent bundle has the same identifier (org.nativescript.NativeScript) as sub-bundle at /Users/cupidchan/Library/Developer/CoreSimulator/Devices/D2B97EAA-B6DB-4920-8974-4F615FEB4E82/data/Library/Caches/com.apple.mobile.installd.staging/temp.ammMqk/extracted/NativeScript.app/Frameworks/NativeScript.framework
Underlying error (domain=MIInstallerErrorDomain, code=57):
        The parent bundle has the same identifier (org.nativescript.NativeScript) as sub-bundle at /Users/cupidchan/Library/Developer/CoreSimulator/Devices/D2B97EAA-B6DB-4920-8974-4F615FEB4E82/data/Library/Caches/com.apple.mobile.installd.staging/temp.ammMqk/extracted/NativeScript.app/Frameworks/NativeScript.framework

环境 NativeScript:8.0.1,Xcode:12.4,iOS 14.4

标签: nativescriptangular2-nativescriptnativescript-angularnativescript-pluginnativescript-telerik-ui

解决方案


我发现这是因为 NativeScript 的 appid。当我使用创建应用程序时ns create myapp,我没有指定--appid参数。因此 NativeScript 为我创建了一个。./nativescript.config.ts但是,您可以在使用应用程序独有的名称命名后更改此 id ,它可以正确启动模拟器。


推荐阅读