Skip to content

Commit

Permalink
[release/8.0.1xx-rc2.2] [Templates] Remove get-task-allow entitlement…
Browse files Browse the repository at this point in the history
… from Templates (#18323)

* Removed get-task-allow entitlement from templates as they do not affect usability of developer tools in safari

* Updated CheckEntitlements unit test to remove check for get-task-allow

---------

Co-authored-by: Dustin Wojciechowski <dustin.wojciechowski@microsoft.com>
  • Loading branch information
1 parent cb4629c commit 731617e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
<key>com.apple.security.network.client</key>
<true/>
<!-- Enable this value to use browser developer tools while debugging. -->
<!-- See https://aka.ms/blazor-hybrid-developer-tools -->
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
<key>com.apple.security.network.client</key>
<true/>
<!-- Enable this value to use browser developer tools while debugging. -->
<!-- See https://aka.ms/blazor-hybrid-developer-tools -->
<!-- <key>com.apple.security.get-task-allow</key> -->
<!-- <true/> -->
</dict>
</plist>

Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,8 @@ public void CheckEntitlementsForMauiBlazorOnMacCatalyst(string id, string config
Assert.IsTrue(DotnetInternal.Build(projectFile, config, framework: $"{framework}-maccatalyst", properties: buildWithCodeSignProps),
$"Project {Path.GetFileName(projectFile)} failed to build. Check test output/attachments for errors.");

List<string> expectedEntitlements = config == "Release" ?
new() { "com.apple.security.app-sandbox", "com.apple.security.network.client" } :
new() { "com.apple.security.app-sandbox", "com.apple.security.network.client", "com.apple.security.get-task-allow" };
List<string> expectedEntitlements =
new() { "com.apple.security.app-sandbox", "com.apple.security.network.client" };
List<string> foundEntitlements = Codesign.SearchForExpectedEntitlements(entitlementsPath, appLocation, expectedEntitlements);

CollectionAssert.AreEqual(expectedEntitlements, foundEntitlements, "Entitlements missing from executable.");
Expand Down

0 comments on commit 731617e

Please sign in to comment.