Abd Alrahman Alhayek
Abd Alrahman Alhayek

Reputation: 1952

Provisioning profile "iOS Team Provisioning Profile: doesn't include the currently selected device" Flutter - MacOS

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.

Upvotes: 17

Views: 38286

Answers (9)

gopelkujo
gopelkujo

Reputation: 832

If someone still not fix the problem do this:

  1. Connect to your iphone
  2. Open your project in Xcode
  3. In the menu, Product > Build
  4. Then, register the device will be prompted by Xcode

Based on the error message when i try flutter run --release in vscode. And thats what fix mine.

Upvotes: 5

Doug
Doug

Reputation: 31

This can also happen when the developer licence agreement changes. Open xCode and it should remind you that 'you haven't accepted the licence...' in your apple developer account, you can just read and accept and it works (O:

Upvotes: 1

cheiser
cheiser

Reputation: 177

Open flutter project in xcode. Connect iphone. Run from xcode. Xcode resolve your problem.

Upvotes: 1

ambassador
ambassador

Reputation: 444

Had this issue when running an XCode Project on my new mac for the first time. Solved by:

  1. Click on the error message
  2. Click "Try Again"
  3. Will show an error again, click "Register Device"

Upvotes: 2

SUDESH KUMARA
SUDESH KUMARA

Reputation: 1322

  1. Open your project from Xcode

  2. Select the device that experienced the issue from the devices list. check this

  3. Product > Clean Build Folder

  4. Product > Build

  5. Then Xcode will then ask you to register the device to your developer account. Add it and run your project as normal from Flutter.

Upvotes: 16

ParSa
ParSa

Reputation: 1436

Worked for me : Delete macos folder inside your flutter project , and then run this command :

flutter create .

it creates a new macos folder for you and you can run your project now

Upvotes: 0

Sebastian
Sebastian

Reputation: 671

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:

  1. Applications folder > Xcode > right-click > Get Info > check "Open using Rosetta"
  2. Open app in Xcode
  3. Runner > Runner > Signing & Capabilities > ensure "Automatically manage signing" is checked
  4. Xcode will give you an error about the device ID not being in the provisioning profile > click the fix button
  5. Repeat steps 3. & 4. for any extensions you might have

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.

Upvotes: 24

Abd Alrahman Alhayek
Abd Alrahman Alhayek

Reputation: 1952

That has been solved by:

  1. Deleting the provisioning profiles from the following path:

~/Library/MobileDevice/Provisioning/Profiles/

  1. Flutter clean

  2. Run again

EDIT

You might need to open the project from Xcode and build it from there, and don't forget the pod install command

Upvotes: 5

Arham S C
Arham S C

Reputation: 149

You can try running the project via xcode first then running it via flutter SDK. This solved the mentioned issue for me.

Upvotes: 14

Related Questions