1

I created a .Net MAUI app on Visual Studio for Windows. Now I need to work on it on Visual Studio for Mac. I cannot build it due to the following error: Could not find any available provisioning profiles for MyProject on iOS.

I tried whatever I could, created a new project on xCode with the same bundle identifier as in my Info.plist etc. Nothing helps. All I want currently is just to be able to run the app locally. I don't need any signing for this. When I create a new blank Maui app on Mac, neither its project file nor Info.plist mentions anything about signing or bundle. And it runs without problem. I tried to remove that stuff from my project, but keep getting this error. What makes the project require a provisioning profile, and how can I prevent it?

ToolmakerSteve
  • 18,547
  • 14
  • 94
  • 196
David Shochet
  • 5,035
  • 11
  • 57
  • 105
  • You said: "Now I need to work on it on Visual Studio for Mac." How do you run your project on the Mac, upload it to GitHub and then download it? You can build a blank project with a Mac, right? – Zack Mar 09 '23 at 05:18
  • @DongzhiWang-MSFT I just copied the project az .zip and emailed myself. Then downloaded on Mac. Yes, I can build a blank MAUI project on Mac. – David Shochet Mar 09 '23 at 14:04
  • You want to run on iOS Simulator? Did you check that `Debug | iPhoneSimulator` is selected as target in VS? – ToolmakerSteve Mar 09 '23 at 22:23
  • @ToolmakerSteve I did – David Shochet Mar 09 '23 at 23:48
  • 1
    Make sure you copy ONLY source files. Or after copying, delete all `.obj` and `.bin` folders. Also delete hidden `.vs` folder. The usual way to move between computers is to upload *sources only* to a private github repo (or other online source-code-control), then download that repo on the new computer. This is much easier to maintain. – ToolmakerSteve Mar 10 '23 at 00:08
  • @DavidShochet You can try to upload to github, and then download the project through mac to see if this problem occurs. – Zack Mar 10 '23 at 06:56
  • Looks like the issue is resolved after removing aps-environment key from Entitlements.plist... – David Shochet Mar 10 '23 at 13:33
  • @DavidShochet You can post your answer as it will help others who have similar issue. If you don't mind, I can help you do that. – Zack Mar 13 '23 at 01:23

1 Answers1

1

As David Shochet said, you need to delete the aps-environment key from Entitlements.plist to solve this problem.

Zack
  • 1,255
  • 1
  • 2
  • 5