I’m able to build the macOS app from Xcode and run successfully, but when I’m trying to run it from Android Studio it’s giving me the following error:
Provisioning profile "mac Team Provisioning Profile: doesn’t include the currently selected device"
If I go to my apple developer account I can see my device UUID there as well.
5
Answers
That has been solved by:
Flutter clean
Run again
EDIT
You might need to open the project from Xcode and build it from there, and don't forget the
pod install
commandYou can try running the project via xcode first then running it via flutter SDK. This solved the mentioned issue for me.
If you’re on Mac M1, your device will have two UUIDs: one when Xcode / xcodebuild is running natively, the other when running under Rosetta.
To register your device ID under Rosetta:
Xcode will add the device ID to your profile. You can now uncheck "Open using Rosetta" to have Xcode running natively again.
See also this github issue.
Worked for me :
Delete macos folder inside your flutter project , and then run this command :
it creates a new macos folder for you and you can run your project now
Open your project from Xcode
Select the device that experienced the issue from the devices list.
check this
Product > Clean Build Folder
Product > Build
Then Xcode will then ask you to register the device to your developer account. Add it and run your project as normal from Flutter.