nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

Livesync not working for iOS simulator

Open overwise opened this issue 3 years ago • 6 comments

Issue Description

When I run ns debug ios on simulator, the app is installed but not launched. When I launch it, it works. After saving changes in code, those are compiled and installed, but app is not restarted. If I manually restart the app in simulator, the changes are there. Android works fine in emulator. There is one error in console, when I run ns debug ios or ns run ios, but it doesn't re-appear after that, on livesync:

Installing on device 50C0BB46-3D96-4FD7-9FC9-83613FA3D3E8...
Successfully installed on device with identifier '50C0BB46-3D96-4FD7-9FC9-83613FA3D3E8'.
Successfully transferred all files on device 50C0BB46-3D96-4FD7-9FC9-83613FA3D3E8.
Restarting application on device 50C0BB46-3D96-4FD7-9FC9-83613FA3D3E8...
Error while trying to start application org.nativescript.example on device 50C0BB46-3D96-4FD7-9FC9-83613FA3D3E8. Error is: Command xcrun with arguments simctl terminate 50C0BB46-3D96-4FD7-9FC9-83613FA3D3E8 org.nativescript.example failed with exit code 3. Error output:
 An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application termination failed.
FBSSystemService reported failure without an error, possibly because the app is not currently running.

Stack:

OS: darwin x64
MacOS Monterey 12.2.1
xCode v13.3 (13E113)
Node v16.14.1
npm v8.5.0
NativeScript CLI v8.2.2
Angular CLI v8.3.21

package.json

{
  "name": "some-app",
  "main": "./src/main.ts",
  "version": "1.0.0",
  "private": true,
  "dependencies": {
    "@angular/animations": "~13.2.0",
    "@angular/common": "~13.2.0",
    "@angular/compiler": "~13.2.0",
    "@angular/core": "~13.2.0",
    "@angular/forms": "~13.2.0",
    "@angular/platform-browser": "~13.2.0",
    "@angular/platform-browser-dynamic": "~13.2.0",
    "@angular/router": "~13.2.0",
    "@nativescript/angular": "^13.0.0",
    "@nativescript/core": "8.2.1-next-03-19-2022-2010078648",
    "@nativescript/theme": "~3.0.2",
    "moment": "^2.29.1",
    "nativescript-phone": "^3.0.3",
    "nativescript-ui-sidedrawer": "^10.0.2",
    "rxjs": "~7.5.0",
    "zone.js": "~0.11.5"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~13.2.0",
    "@angular/compiler-cli": "~13.2.0",
    "@nativescript/android": "8.2.2",
    "@nativescript/ios": "8.2.2",
    "@nativescript/types": "~8.2.0",
    "@nativescript/webpack": "~5.0.6",
    "@ngtools/webpack": "~13.2.0",
    "nativescript": "^8.2.2",
    "typescript": "~4.5.5"
  }
}

Reproduction

No response

Relevant log output (if applicable)

No response

Environment

No response

Please accept these terms

overwise avatar Mar 22 '22 14:03 overwise

I have a similar issue; the cli is unable to start/restart the app on the simulator (tested on both iOS 15.2 and 15.4). It seems like the app is installed and the files are transferred correctly, so I can start the app manually.

If I do some code changes, the livesync will update the files on the simulator, but not restart the app. If I restart the app manually, I can see my changes. If I do change some more code, the livesync is not transferring the files anymore, and restarting the app doesn't help.

To continue work I have to kill the cli process and start over.

On a real device this works just fine.

Same stack as OP, but NativeScript CLI v8.1.5

fpaaske avatar Mar 28 '22 09:03 fpaaske

Any news on this?

fpaaske avatar Apr 26 '22 12:04 fpaaske

Any update on this? This is really frustrating while developing

richardman1 avatar May 04 '22 10:05 richardman1

I have same problem on nativescript v6. xcode 13

Nexeuz avatar May 06 '22 02:05 Nexeuz

See https://github.com/NativeScript/NativeScript/issues/9907

romandrahan avatar May 17 '22 19:05 romandrahan

@romandragan this fixed it for me! Thanks!

richardman1 avatar May 18 '22 06:05 richardman1