-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
Per the documentation, and VS tooling, you can manually set the path to an .plist
file for the management of Entitlements for a MAUI application. However, the build process does not respect this setting and ALWAYS looks for Entitlements.plist
within the solution
Steps to Reproduce
- Within the
\Platforms\iOS\
folder add two.plist
files. In my example, I had
Entitlements.plist
which had anapn-environment
ofdevelopment
EntitlementsProduction.plst
which had anapn-environment
of 'production`
- Open the project properties
- Navigate to "iOS" -> "Bundle Signing"
- Within the "Custom Entitlements" option, navigate to your
EntitlementsProduction.plist
file
You will notice that Visual Studio automatically adds the following
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net9.0-ios|AnyCPU'">
<CodesignEntitlements>Platforms\iOS\EntitlementsProduction.plist</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net9.0-ios|AnyCPU'">
<CodesignEntitlements>Platforms\iOS\EntitlementsProduction.plist</CodesignEntitlements>
<UseInterpreter>true</UseInterpreter>
</PropertyGroup>
- Now execute a build with a provisioning profile that requires the
production
apn-environment. (Any profile that is Ad Hoc or Distribution)
You will get a build error
error MT7137: The app requests the entitlement 'aps-environment' with the value 'development', but the provisioning profile 'REDACTED' grants it for the value 'production'
The expected behavior for this is that I would be using the PROPER provisioning profile, as configured in my project setting, not a magical setting of the default.
Link to public reproduction project repository
No response
Version with bug
9.0.0 GA
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
There is a manual workaround of pre-build and manual developer steps to modify the values of the publish profiles; however, this results in risks of misconfiguration and other related hindrances.
Relevant log output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status