Skip to content

Commit 8fd649c

Browse files
fix: unable to install application every other time with Xcode 10
When using Xcode 10, the `xcrun simctl install ...` command fails every other time with error: ``` Error: Command xcrun with arguments simctl install 5516E083-C749-47A7-A6FC-2EE2E414D025 /Users/vladimirov/Work/nativescript-cli/scratch/app1/platforms/ios/build/emulator/app1.app failed with exit code 1. Error output: An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1): This app could not be installed at this time. Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app Underlying error (domain=MIInstallerErrorDomain, code=35): Failed to load Info.plist from bundle at path /Users/vladimirov/Library/Developer/CoreSimulator/Devices/5516E083-C749-47A7-A6FC-2EE2E414D025/data/Library/Caches/com.apple.mobile.installd.staging/temp.ZdmYQa/extracted/Payload/app1.app ``` It looks like during install of the application, the content of the built `.app` is extracted to a temp folder in some cases. While the installation is in progress, Xcode decides it is done and deletes the temp dir. However, the package is installed on device, but it is still loading some data from the package that is installed (the temp dir). It fails, as it searches for Info.plist file in the package we've installed, but it is not there. So the installation process fails and app remains on device with inconsitent state. Retrying the operation fixes the behavior.
1 parent c51da02 commit 8fd649c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/common/mobile/ios/simulator/ios-simulator-application-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class IOSSimulatorApplicationManager extends ApplicationManagerBase {
3333
}
3434
}
3535

36-
return this.iosSim.installApplication(this.device.deviceInfo.identifier, packageFilePath);
36+
await this.iosSim.installApplication(this.device.deviceInfo.identifier, packageFilePath);
3737
}
3838

3939
public async uninstallApplication(appIdentifier: string): Promise<void> {

npm-shrinkwrap.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"inquirer": "6.2.0",
4545
"ios-device-lib": "0.4.15",
4646
"ios-mobileprovision-finder": "1.0.10",
47-
"ios-sim-portable": "4.0.2",
47+
"ios-sim-portable": "4.0.3",
4848
"istextorbinary": "2.2.1",
4949
"jimp": "0.2.28",
5050
"lockfile": "1.0.3",

0 commit comments

Comments
 (0)