NativeScript: "Unable to apply changes" on Simulator device when using Xcode 12
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 6.8.0
- Cross-platform modules: 7.0.0-rc.52
- Android Runtime: 6.5.3
- iOS Runtime: 7.0.0-beta.3-v8-2020-07-01-222820-05
Describe the bug
When running tns run ios --bundle --no-hmr --env.aot the following error is being displayed:
warning: 'UILaunchImages' has been deprecated, use launch storyboards instead. (in target 'mobile' from project 'mobile')
note: Using new build system
note: Building targets in parallel
note: Using codesigning identity override:
note: Planning build
note: Constructing build description
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Protobuf' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'PromisesObjC' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'lottie-ios' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'IQKeyboardManager' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'nanopb' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MDFInternationalization' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleUtilities' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseMessaging' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleDataTransport' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseInstallations' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseInstanceID' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseCore' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleDataTransportCCTSupport' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Firebase' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseAnalytics' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseCoreDiagnosticsInterop' from project 'Pods')
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'FirebaseAnalyticsInterop' from project 'Pods')
Project successfully built.
The build result is located at: /Users/myuserprofile/develop/mycompany/mobile/platforms/ios/build/Debug-iphonesimulator/mobile.app
Unable to apply changes on device: BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592. Error is: ENOENT: no such file or directory, scandir '/Users/myuserprofile/Library/Developer/CoreSimulator/Devices/BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592/data/Applications'.
Expected behavior Application should install and launch successfully on the Simulator device running iOS 14 beta.
Additional context
Here is the output of tns devices:
Connected devices & emulators
Searching for devices...
iTunes is not installed. Install it on your system and run this command again.
┌───┬───────────────────────────┬──────────┬──────────────────────────────────────┬──────────┬───────────┬─────────────────┐
│ # │ Device Name │ Platform │ Device Identifier │ Type │ Status │ Connection Type │
│ 1 │ iPad Air (3rd generation) │ iOS │ BEF5DDC3-4EE7-4FA4-B37F-5E12D149A592 │ Emulator │ Connected │ Local │
└───┴───────────────────────────┴──────────┴──────────────────────────────────────┴──────────┴───────────┴─────────────────┘
Below are the configuration files:
package.json
"dependencies": {
"@angular/animations": "~10.0.0",
"@angular/common": "~10.0.0",
"@angular/compiler": "~10.0.0",
"@angular/core": "~10.0.0",
"@nativescript/datetimepicker": "~2.0.0-rc.0",
"@angular/forms": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@nativescript/angular": "10.0.0-rc.10",
"@nativescript/appversion": "~2.0.0",
"@nativescript/core": "~7.0.0-rc.52",
"@nativescript/firebase": "11.0.0-rc.5",
"@nativescript/iqkeyboardmanager": "~2.0.0",
"@nativescript/local-notifications": "~5.0.0",
"@nativescript/shared-notification-delegate": "~1.0.0",
"@nativescript/theme": "~2.3.0",
"@ngxs/devtools-plugin": "^3.6.2",
"@ngxs/logger-plugin": "^3.6.2",
"@ngxs/store": "^3.6.2",
"@nota/nativescript-accessibility-ext": "^6.4.3",
"@nota/nativescript-webview-ext": "^6.5.4",
"base-64": "^0.1.0",
"dayjs": "1.8.32",
"istanbul-instrumenter-loader": "^3.0.1",
"js-yaml": "^3.13.1",
"moment": "^2.24.0",
"nativescript-adobe-marketing-cloud": "^1.6.0",
"nativescript-couchbase": "^1.0.18",
"nativescript-drop-down": "^5.0.6",
"nativescript-lottie": "^4.0.1",
"nativescript-microsoft-appcenter": "^2.0.0",
"nativescript-phone": "^2.0.0",
"nativescript-theme-core": "^2.0.24",
"nativescript-tslib": "^1.9.1-r1",
"nativescript-ui-calendar": "~7.0.1",
"npm-run-path": "^4.0.1",
"p-finally": "^2.0.1",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.6.2",
"semver": "^6.3.0",
"terser-webpack-plugin": "^4.0.0",
"tslib": "^1.10.0",
"utf8": "^3.0.0",
"zone.js": "^0.10.3"
},
"devDependencies": {
"@angular-devkit/schematics": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@nativescript/types": "^7.0.0-rc.0",
"@nativescript/webpack": "^2.1.3",
"@ngtools/webpack": "~10.0.0",
"@types/chai": "^4.2.12",
"@types/chai-spies": "^1.0.1",
"@types/couchbase": "^2.4.2",
"@types/karma-chai": "0.1.2",
"@types/mocha": "^8.0.1",
"@types/node": "^12.12.14",
"@types/semver": "^7.3.1",
"@typescript-eslint/eslint-plugin": "^3.8.0",
"@typescript-eslint/eslint-plugin-tslint": "^3.8.0",
"@typescript-eslint/parser": "^3.8.0",
"aws-sdk": "^2.611.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"chai": "4.2.0",
"chai-as-promised": "~7.1.1",
"chai-spies": "^1.0.0",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^6.0.3",
"cross-env": "^6.0.3",
"css-loader": "~3.2.0",
"cucumber": "^6.0.5",
"eslint": "^7.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsdoc": "^27.0.7",
"eslint-plugin-prefer-arrow": "^1.2.1",
"eslint-plugin-prettier": "^3.1.4",
"extract-text-webpack-plugin": "^3.0.2",
"fs-extra": "^9.0.0",
"husky": "^4.2.5",
"karma": "^5.1.1",
"karma-chai": "0.1.0",
"karma-chai-spies": "^0.1.4",
"karma-coverage": "^2.0.2",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-mocha": "2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-nativescript-launcher": "^0.4.0",
"karma-webpack": "^4.0.2",
"lazy": "1.0.11",
"lint-staged": "^10.2.10",
"mocha": "^7.0.1",
"mocha-junit-reporter": "^1.23.3",
"mocha-multi": "^1.1.3",
"mocha-typescript": "^1.1.17",
"mochawesome": "~4.1.0",
"ms": "^2.0.0",
"multiple-cucumber-html-reporter": "^1.18.0",
"nativescript-custom-entitlements": "^0.2.0",
"nativescript-dev-appium": "^6.1.3",
"nativescript-unit-test-runner": "^0.7.0",
"nativescript-worker-loader": "~0.9.0",
"ngx-cookie-service": "^2.2.0",
"node-sass": "4.13.1",
"npm-force-resolutions": "0.0.3",
"prettier": "^2.0.5",
"raw-loader": "~0.5.1",
"resolve-url-loader": "^3.1.1",
"rimraf": "^3.0.2",
"shelljs": "^0.8.4",
"tslint": "6.1.2",
"typescript": "^3.9.7",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.44.1",
"webpack-bundle-analyzer": "^3.8.0",
"webpack-cli": "^3.3.12",
"wiremock-standalone": "^2.26.3-1",
"yargs": "^15.3.1"
}
tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": true,
"skipLibCheck": true,
"lib": [
"es2017",
"dom",
"es6",
"ESNext"
],
"types": [
"node",
"chai",
"mocha",
"chai-spies",
"karma-chai",
"couchbase"
],
"baseUrl": ".",
"paths": {
"*": [
"node_modules/@nativescript/*",
"node_modules/*"
],
"chai": [
"app/tests/types/chai.d.ts"
],
"~/*": [
"app/*"
]
}
},
"angularCompilerOptions": {
"enableIvy": true,
},
"include": [
"references.d.ts",
"node_modules",
"app/tests/**/*.ts"
],
"files": [
"./app/main.ts"
],
"exclude": [
"mammock",
"node_modules",
"platforms",
"plugins/charts/demo",
"plugins/charts/src/node_modules",
"plugins/charts/src/references.d.ts",
"**/*.aot",
"e2e"
]
}
tsconfig.tns.json
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "node"
}
}
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 20 (2 by maintainers)
I found that creating the folder “Applications” inside ‘/Users/yourusername/Library/Developer/CoreSimulator/Devices/yourdeviceid/data/’ fix the issue
Am I the only one that couldn’t solve this issue with the workaround suggested in here? My error message is almos identical except at the end it shows:
Unable to apply changes on device: CE34A729-ADB7-49B0-B998-3F3905176DBC. Error is: Command xcodebuild failed with exit code 65.Adding the applications folder to it doesn’t do anything.This should be linked to https://github.com/NativeScript/NativeScript/issues/8867