I was running the app on my iPhone using Xcode and android studio. It worked fine. But I downloaded the same app through the app store on the same phone. And now when I run it on android studio, it shows the following error:
Launching lib/main.dart on iPhone in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: 59HZQ7G7DK Running Xcode build... Xcode build done.
29.2s Installing and launching... Could not run build/ios/iphoneos/Runner.app on 5bde4016fc......5f1439d5ef0. Try launching Xcode and selecting "Product > Run" to fix the problem: open ios/Runner.xcworkspaceError launching application on iPhone.
Running on Xcode shows the following error message
I tried deleting the app and rerunning it using android studio but the same error still appears.
Any idea how to resolve this?
-------------------Edit Below----------------------
I then followed this and deleted "Iphone Developer" and "Apple Worldwide Developer Relations Certification Authority".
However, after deleting, another error message appears when running on xcode as shown:
Command PhaseScriptExecution failed with a nonzero exit code
I then went over to the Member Center on the Apple Developer website to download the apple development cert but now it shows the same error message as the first error message shown above.
I then deleted all my provisioning profiles following this. Restarted the phone and rerun and the problem is resolved.