-
Notifications
You must be signed in to change notification settings - Fork 558
[MacCatalyst] Added Default Entitlements for MacCatalyst projects #18669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ede766e
f43ae76
483d2ea
4892823
bcae3c0
a7ffe68
f84522c
2a79af0
2be6ea2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,19 @@ | |
| <None Include="@(ObjcBindingCoreSource)" /> | ||
| </ItemGroup> | ||
|
|
||
| <PropertyGroup Condition="'$(_PlatformName)' == 'MacCatalyst'"> | ||
| <EnableDefaultMacCatalystReleaseEntitlements Condition="'$(EnableDefaultMacCatalystReleaseEntitlements)' == ''">True</EnableDefaultMacCatalystReleaseEntitlements> | ||
| <EnableDefaultMacCatalystDebugEntitlements Condition="'$(EnableDefaultMacCatalystDebugEntitlements)' == ''">True</EnableDefaultMacCatalystDebugEntitlements> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Condition="'$(EnableDefaultMacCatalystDebugEntitlements)' == 'True' and '$(Configuration)' == 'Debug'"> | ||
| <CustomEntitlements Include="com.apple.security.get-task-allow" Type="boolean" Value="true" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup Condition="'$(EnableDefaultMacCatalystReleaseEntitlements)' == 'True' and '$(Configuration)' == 'Release'"> | ||
| <CustomEntitlements Include="com.apple.security.app-sandbox" Type="boolean" Value="true" /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 since it allows sandboxing on catalyst apps: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_app-sandbox
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was under the impression that Xcode also automatically adds this entitlement for apps that run on MacOS: https://developer.apple.com/documentation/uikit/mac_catalyst/creating_a_mac_version_of_your_ipad_app @rolfbjarne Should app-sandbox get the same treatment as network.client? MAUI wanted this in our sdk.. can you publish Mac Catalyst apps in the Mac App Store without this entitlement?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No: "To distribute a macOS app through the Mac App Store, you must enable the App Sandbox capability." |
||
| </ItemGroup> | ||
|
|
||
| <!-- Architecture --> | ||
| <!-- If the old-style variables are set, use those --> | ||
| <PropertyGroup Condition=" '$(TargetArchitectures)' == '' "> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 On debugging: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087731
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being that this isn't part of the Release configuration and only Debug, and that this is something that Xcode adds in itself to enable web debugging, wouldn't this be fine? I'll add an assert in the unit test to make sure it's not being passed into the release configuration.