You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'd commonly name your files Entitlements.Debug.plist and Entitlements.Release.plist. Then set $(CodesignEntitlements) in a PropertyGroup that has a condition based on the TFM and the build configuration:
<PropertyGroupCondition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Debug'">
<CodesignEntitlements>Entitlements.Debug.plist/</CodesignEntitlements>
</PropertyGroup>
<PropertyGroupCondition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
<CodesignEntitlements>Entitlements.Release.plist/</CodesignEntitlements>
</PropertyGroup>
It doesn't work, it randomly picks the entitlements from either debug or release, even if Build action is set to none.
and the docs don't mention that you can do this :
<ItemGroup Condition="$(TargetFramework.Contains('-ios'))">
<CustomEntitlements Include="aps-environment" Condition="'$(Configuration)' == 'Release'" Type="String" Value="production" />
<CustomEntitlements Include="aps-environment" Condition="'$(Configuration)' == 'Debug'" Type="String" Value="development" />
</ItemGroup>
________________________________
From: David Britch ***@***.***>
Sent: October 24, 2024 10:22 AM
To: dotnet/docs-maui ***@***.***>
Cc: NGumby ***@***.***>; Mention ***@***.***>
Subject: Re: [dotnet/docs-maui] You should document CustomEntitlements in csproj for different release and debug entitlements (Issue #2580)
Hi @NGumby<https://github.com/NGumby>
You'd commonly name your files Entitlements.Debug.plist and Entitlements.Release.plist. Then set $(CodesignEntitlements) in a PropertyGroup that has a condition based on the TFM and the build configuration:
<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Debug'">
<CodesignEntitlements>Entitlements.Debug.plist/</CodesignEntitlements>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.Contains('-ios')) and '$(Configuration)' == 'Release'">
<CodesignEntitlements>Entitlements.Release.plist/</CodesignEntitlements>
</PropertyGroup>
—
Reply to this email directly, view it on GitHub<#2580 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABKES2625I7OGSEPM3SO7P3Z5D7BZAVCNFSM6AAAAABQRFK3U2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZVGQZTMMZQGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Type of issue
Missing information
Description
It's nowhere to be found how to make different entitlements for release and debug
Page URL
https://learn.microsoft.com/en-us/dotnet/maui/ios/entitlements?view=net-maui-8.0
Content source URL
https://github.com/dotnet/docs-maui/blob/main/docs/ios/entitlements.md
Document Version Independent Id
3305d4a0-d05c-84db-0388-2dc01fbbcfc3
Article author
@davidbritch
Metadata
Related Issues
The text was updated successfully, but these errors were encountered: