Capacitor ios live reload not working after adding new ios certs

ionic info


Ionic CLI : 6.20.8 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.5.3
@angular-devkit/build-angular : 13.3.10
@angular-devkit/schematics : 13.3.10
@angular/cli : 13.3.10
@ionic/angular-toolkit : 6.1.0


Capacitor CLI : 4.6.3
@capacitor/android : 4.6.3
@capacitor/core : 4.6.3
@capacitor/ios : 4.6.3


cordova-res (update available: 0.15.4) : 0.15.3
native-run : 1.7.1


NodeJS : v19.6.0 (~/.nvm/versions/node/v19.6.0/bin/node)
npm : 6.14.18
OS : macOS Monterey


My ios certs have expired, and I have tried following these instructions to generated the certs:

I successfully generated the certs. When I run npx cap run ios, xcodes opens, and I can run my app on my iphone.

When I run ionic cap run ios -l --external --consolelogs, this is the output:

[ng] Build at: 2023-02-14T01:46:15.309Z - Hash: 569f125ecf0bc0a0 - Time: 28248ms
[ng] ✔ Compiled successfully.

[INFO] Development server running!

Local: [http://localhost:8100](http://localhost:8100/)
External: [](

Use Ctrl+C to quit this process

> capacitor run ios --no-sync --target 00008020-001964CA2679002E
[capacitor] ✔ Running xcodebuild in 23.06s
[capacitor] ✖ Deploying to 00008020-001964CA2679002E - failed!
[capacitor] [error] Error: There was an error installing app
[capacitor] at /node_modules/native-run/dist/ios/lib/client/installation_proxy.js:72:24
[capacitor] at LockdownProtocolReader.callback (/node_modules/native-run/dist/ios/lib/protocol/protocol.js:93:21)
[capacitor] at LockdownProtocolReader.onData (/node_modules/native-run/dist/ios/lib/protocol/protocol.js:53:26)
[capacitor] at Socket.emit (events.js:315:20)
[capacitor] at addChunk (internal/streams/readable.js:309:12)
[capacitor] at readableAddChunk (internal/streams/readable.js:284:9)
[capacitor] at Socket.Readable.push (internal/streams/readable.js:223:10)
[capacitor] at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
[ERROR] An error occurred while running subprocess capacitor.

capacitor run ios --no-sync --target 00008020-001964CA2679002E exited with exit code 1.

Re-running this command with the --verbose flag may provide more information.

I’ve uninstall and reinstall almost everything on my mac except for the macOS and using a time machine back up. I’ve even tried running the live reload process manually:

I don’t believe it’s the wifi connection either. I’ve tried multiple routers. The error is coming directly out of the native-run npm package which is used by capacitor. I just don’t know what that error means. I see it create the live reload server, but when it tries to install on my phone, it produces the error. I’ve tried using the --verbose flag, but I didn’t see anything that was useful.

How can I overcome this? Any idea’s what I could try to do?

Can you run the app from Xcode?
If you changed the iOS certificates you probably need to change them in the Xcode project as run command will use whatever you have selected in Xcode

Thank you so much for your response julio-ionic.

Yes, I can run the app from xcode.

I believe I have the certs in the xcode project. To be clear, which certs need to be in xcode?

When I manually run
ionic capacitor run ios --no-sync --target 00008020-001964CA2679002E
It produces the error as well.

Any other thoughts what it could be?

If you have signing set to “automatic” you shouldn’t need to do anything in Xcode, other than running once so it detects that the certificates have expired and download the new ones.
If you have been able to run from Xcode, and still doesn’t work from the CLI, then it’s probably not related to the certificates.

You are using node 19, that could be a problem, try with node 16.

Thank you for your reply.

I was able to successfully run the live reload on my iphone. It end up being the router (I haven’t used this router before) was too restrictive and didn’t allow the server to be hit from other devices on the network.

I suppose when I did the router test earlier, I had everything in a bad state. After we eliminated that the certs weren’t the problem, I time machine back to when I knew it worked, tried everything again, and narrow it down back to the router being the problem.

Thank you for your help!