I’m having a weird issue with capacitor where when I try to run my app on an external device it doesn’t run.
The device I’m trying to run my app on is iPhone 12 / iOS 15.4.1 (been doing this for a long time without an issue)
I get no error and the last lines in console are:
[capacitor] Running xcodebuild in 14.71s
[capacitor] Deploying Foodie Syndicate.app to device-id-here in 854.58ms
[INFO] App deployed to device!
Development server will continue running until manually stopped.
Use Ctrl+C to quit this process
If I run it on a simulator then it does work correctly and if I run it directly from Xcode to the physical device it will also work but not when I try to run it on a physical device using ionic capacitor run ios -l --external.
I’ve checked the device ID and it is correct, what could be the problem here?
I have a similar problem, where I get no errors. I tried to downgrade and upgrade node, but that didn’t solve the problem.
I also tried uninstalling and installing the ionic/cli again. It still doesn’t work.
My last line with verbose is:
I found the error. For me it was that @ionic/cli version 6.20.2 livereload didn’t work with capacitor version 4.3.0. So when I downgraded to @ionic/cli 6.20.1 it worked again.
You also have to have node version v16.14.2. With node version v17.7.2 or v18.10.0, the error also occurs with ionic/cli version 6.20.1
I’ve been having this exact same issue the last couple of weeks and the only solution for me was to do what @calDion suggested - go back down to ionic 6.20.1 and node 16.14.2. This is a shame because I like to be on the same version of node as we use on Appflow for our release builds so it would be good to see this fixed.
I was having an issue with this and it seems like it stemmed from a linting warning – not even an error, just a warning about a non-used import. Make sure your linter is free from… lint!
I upgraded capacitor-cli, and cococapods but it didnt work for me.
I solved it with
0- Before i start this procedure, i upgraded version of cocoapods from 1.13.x to 1.14.2 by using the following command, homebrew brew upgrade cocoapods
1- Delete DerivedData folder and capacitor-cordova-ios-plugins if exists
2- Go to ios/App and delete Pods folder
3- run pod install inside of ios/App
4- go to root folder which your project is located and run ionic cap sync
5- Better first test directly run this project in a simulator ionic cap run ios and choose a device.
6- If everyyhing works fine then try to run ionic capacitor run ios -l --external
Same issue, with simulator works fine. Haven’t tried yet, but next thing I’ll do is make sure both devices are on the same network, turn off any VPN connection.