Could not run build/ios/iphoneos/Runner.app on Try launching Xcode and selecting "Product > Run" to fix the problem
Asked Answered
S

16

41

When running an iOS App on a real iPhone (not Simulator) you may run into this problem.
The reason is because the app isn't signed by a trusted source.

Simmer answered 12/6, 2020 at 0:5 Comment(0)
S
38

To fix this you have to Open Settings on your iPhone and navigate to: General -> Device Management, then select your Developer App certificate and "trust" it.

  • Update: it may now be called General -> VPN & Device Management
Simmer answered 12/6, 2020 at 0:5 Comment(5)
I dont have anything like "Device Management" on my iphone 7 - ios 14.2Sisera
Same as marhyno: Nothing like "Device Management". iPhone XR iOS 14.7.1.Ernieernst
This worked for me after updating the signing profile, took a few tries for it to appear. The menu item is now called "VPN & Device Management"Vestibule
@ Webkraft Studios I see "VPN & Device Management", but there's nothing there to "trust". What did you try a few times for it to appear?Dreamworld
then select your Developer App certificate I don't this option to select an appAlate
U
31

Same issue happened with me.

Device : iPhone XR and iOS version: 15.4

  1. Open Settings > Developer
  2. Click on Clear trusted computer
  3. Then click on trust this computer
Ullyot answered 23/3, 2022 at 6:36 Comment(2)
Thanks, this worked for me. Out of nowhere, VS Code and flutter threw this error, and it ran fine in XCode. Cleared the trusted computers, then it ran fine in VS Code.Vestry
This, plus flutter clean & flutter pub get. Thank you!Racer
P
19

For those having this issue on IOS 17 and Xcode 15, Just upgrade Flutter to at least version 3.13 where this issue has been solved

you may want to try running it multiple times before it works properly

Pyotr answered 13/10, 2023 at 10:8 Comment(5)
This is correct for people having this error after upgrading to iOS 17, which was my case. Thanks !Punch
That works. Just upgrade flutter to the latest version!Traction
I confirm that this solved the issue on my side as well. Thanks for this !Guardsman
Need a solution without upgrading flutter...Carlton
@Carlton check if this works for you https://mcmap.net/q/386038/-could-not-run-build-ios-iphoneos-runner-app-on-try-launching-xcode-and-selecting-quot-product-gt-run-quot-to-fix-the-problemPlowshare
S
7

Same issue here, I only solved it after uninstalling the app and run it again.

Sufferance answered 4/10, 2022 at 16:6 Comment(0)
A
7

Some Settings are changed in IOS 17 and New MAC OS Version. So we have to Upgrade Flutter Version 3.13.0 Minimum. For Single Project you can try with FVM (Flutter version Manager). No Other solution is working for me so I have to use this.

Ascetic answered 27/10, 2023 at 8:1 Comment(1)
This is the only solution that worked for me. Not the ideal solution as I need to upgrade my entire project to support upgraded Flutter, but as a hotfix.Foghorn
R
5

What worked in my case

A simple

flutter clean
flutter pub get

did solve the issue

What I tried before (and did not solve the issue)

  1. Run the project via Xcode > Product > Run

  2. Clear trusted computers by doing the following steps on iPhone

    • Settings > Developer > Clear Trusted Computers
    • Trust this computer
Rociorock answered 1/5, 2023 at 15:2 Comment(0)
G
3
  1. Go to your device Settings
  2. Go to General
  3. At the bottom you may find Transfer or Reset iPhone option, select that. (Be careful selecting anything here)
  4. Now choose Reset option and select Reset Location & Privacy. (Enter your pin to confirm. After few second it will prompt the trust this computer option.)

In Shortcut you can go Settings>General>Transfer or Reset iPhone>Reset>Reset Location & Privacy or directly search for Reset then choose Reset Location & Privacy

Now you will find the previous trusted app in Device Management. Please remove if you have same. Now re-run

Gyratory answered 21/6, 2022 at 15:49 Comment(0)
H
1

Xcode was configured with an ad hoc profile instead of a dev profile, changing that fixed it.

Hedberg answered 28/7, 2021 at 12:25 Comment(0)
H
1

The following steps worked for me:

  1. open the xcode
  2. select your device
  3. run build (sure you have signed your team first)
  4. trust for this developer
Host answered 14/10, 2021 at 8:23 Comment(0)
D
0

On iPhone 7 going to Settings and clearing trusted computers with further build clean did the trick for me

Dictatorship answered 11/5, 2022 at 7:7 Comment(0)
A
0

I ran into this issue when I had a very low wifi connection. The low connection would cause this issue intermittently. Fixing the wifi connection fixed this issue for me.

(In my case, I needed to reset my wifi settings on my iPhone).

Anne answered 21/10, 2022 at 7:52 Comment(0)
F
0

I had this issue when I tried to install a different version of the same app (store and dev). All I needed to do was to fully uninstall all versions of the app from the target iPhone. Might not work in every case, but easy to try.

Fulmis answered 25/10, 2022 at 9:1 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Annelid
C
0

This can also happen incase you machine runs out of space. Try to check fn storage is enough.

Cato answered 24/4, 2023 at 7:57 Comment(0)
A
0

You may need to fix the permissions of the /tmp folder on mac.

chmod 0777 /tmp/private
chmod +t /tmp/private
Ama answered 15/10, 2023 at 17:53 Comment(0)
I
0

Updated 2023, iOS17

Clear trusted computer was moved to Developer. in Paired Devices section, tap Clear Turst Computers then flutter clean && flutter pub get.

Inrush answered 17/11, 2023 at 1:3 Comment(0)
P
-1

The issue relates "Privacy & Security" from your macos. You need to allow Android Studio app to access Xcode.

Settings -> Privacy & Security -> Automation -> Android Studio -> Xcode: toggle ON

As shown in the screenshot below:

enter image description here

Plowshare answered 20/2 at 17:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.