I just got a new phone (same model) and I am trying to run my (Flutter) app. However, I'm running into an attach by pid '####' failed -- attach failed Not allowed to attach to process.
error during the “Installing and Launching” phase. I know it's an issue of some missing setup on the new device because I have the old phone (for now) and am still able to build my app on it without issue.
I think the problem is that I haven't explicitly trusted the developer profile from Settings, but there is no accessible option to do so. In my settings: General/VPN & Device Management
just shows VPN
and an option to Sign In to Work or School Account
with no mention of profiles or trusting a developer. This doesn't change if the phone is connected and Xcode open/running, as some answers suggest.
Not sure if this is an issue with the new version of iOS, or if there's something else I'm missing- but nothing from the many threads I've read has helped so far. Looking for a solution to this for iOS 17.4.1.
I have tried just about everything I can find on this issue, including:
It's an issue with iOS 17.4.1+. I upgraded my old phone to the latest iOS, and it now runs into the same error.
Slowly porting everything over from my old app to the new project to find the issue. It's not:
pubspec.yaml
)Podfile
)Info.plist
Solved it. You need to delete ALL of your XCode Schemes and remake them.
see https://github.com/flutter/flutter/issues/142502#issuecomment-1935453723