Sam
Sam

Reputation: 30324

.NET MAUI Valid Provisioning Profile Issue

Using Visual Studio 17.4.4 on Windows 11 and I’m unable to test my .NET MAUI app on a tethered iPhone Xs because I get the following error in Xamarin logs.

A valid provisioning profile for this executable was not found

I tried it both with manual provisioning as well as automatic provisioning to no avail. I also have the Entitlements.plist file under \Platforms\iOS folder.

Does anyone have any suggestions about how to fix this issue?

Upvotes: 5

Views: 2678

Answers (2)

Kramer
Kramer

Reputation: 461

If you are using push notifications, this is probably the issue. You can't use the APS "production" certificate for debug/development builds. Change this:

<key>aps-environment</key>
<string>production</string>

to this:

<key>aps-environment</key>
<string>development</string>

Found solution here

Upvotes: 3

KRA2008
KRA2008

Reputation: 301

I'm answering this question a long time after it was asked if only to remind myself when it happens to me again, because Microsoft still doesn't believe this is happening.

Try emptying out your Entitlements.plist file down to ONLY an empty <dict></dict> element (plus the header boilerplate).

It seems this somehow fixes provisioning temporarily for me. To extend the temporariness I have made an entitlement file for each build configuration, with the debug one being empty as described above and the prod one having the stuff I actually need for prod (luckily for me it's just beta-reports-active and I don't need anything for debug builds).

Upvotes: 4

Related Questions