When running flutter apps on the device, sometimes you may encounter the captioned error message as following (either from Android Studio, Intelligidea or CLI):
Could not install build/ios/iphoneos/Runner.app
To resolve this, try below measures, preferably sequentially in terminal:
cd "$(xcrun --sdk iphoneos -- show-sdk-platform-path)/DeviceSupport"
sudo ln -s 10.3.1\ \(14E8301\) 10.3
After running these commands, it should work fine, and if not, try run this command below in terminal:
flutter clean
The reason of running this is to clean the build since it is possible that the old build is still in effect and a clean build removes the legacy generated files.
Re-run the app, now it works like a charm.
Original article here. Happy coding!