NativeScript cannot launch iOS emulator

270 views Asked by At

Emulator started when I run ns run ios However, app cannot be deployed with the following error:

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

Environment NativeScript: 8.0.1, Xcode: 12.4, iOS 14.4

1

There are 1 answers

0
Cupid Chan On

I have found out that this is because of the appid of the NativeScript. When I created the application using ns create myapp, I didn't specify --appid parameter. Hence NativeScript created one for me. However, you can change this id in ./nativescript.config.ts After you name with something unique to your app, it can start the emulator correctly.