Skip to content
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

Updated Templates for Blazor apps for MacCatalyst #14196

Merged
merged 10 commits into from
Apr 11, 2023
Merged
19 changes: 19 additions & 0 deletions src/Templates/src/templates/maui-blazor/MauiApp.1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);DOTNET_TFM-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);DOTNET_TFM-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifer>.
The App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;

In case any reader is unfamiliar with the generic sounding term "App Store," I suggest adding "Mac" to the name.

The Apple App Store guidelines specifically mention that either form is acceptable, but I think the more specific one could be more helpful.

Guidelines: https://developer.apple.com/app-store/marketing/guidelines/

App Store
Always typeset App Store with an uppercase A and an uppercase S followed by lowercase letters.

Refer to just the App Store unless you need to be more specific; in that case, you can use App Store for iPhone, App Store for iPad, Mac App Store, App Store for Apple TV, App Store for Apple Watch, or App Store for iMessage. To refer to all the versions, use this order: App Store for iPhone, iPad, Mac, Apple Watch, Apple TV, and iMessage. Don’t use terms such as Apple Watch App Store or App Store for watchOS.

either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- ex. <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>MauiApp._1</RootNamespace>
<UseMaui>true</UseMaui>
Expand Down Expand Up @@ -52,4 +60,15 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="MS_EXT_VERSION" />
</ItemGroup>

<!-- Build Properties must be defined within these property groups to ensure successful publishing
to the App Store. See "Define build properties in your project file" here:
https://learn.microsoft.com/en-us/dotnet/maui/mac-catalyst/deployment/publish-app-store -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. This needs to be an aka.ms link
  2. Make sure you remove the en-us from the URL so that people don't always go to the English-US docs. If you omit the en-us then it will auto-redirect to the docs in the user's preferred locale

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Same applies to all other links.)

<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst')) and '$(Configuration)' == 'Debug'">
<CodesignEntitlements>Platforms/MacCatalyst/Entitlements.Debug.plist</CodesignEntitlements>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst')) and '$(Configuration)' == 'Release'">
<CodesignEntitlements>Platforms/MacCatalyst/Entitlements.Release.plist</CodesignEntitlements>
<UseHardenedRuntime>true</UseHardenedRuntime>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- Enable this value to use broswer developer tools with Blazor while debugging in order to use Dev tools.-->
<!-- See https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/developer-tools?view=aspnetcore-7.0&pivots=macos -->
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- See https://learn.microsoft.com/en-us/dotnet/maui/mac-catalyst/deployment/publish-app-store?view=net-maui-7.0#add-entitlements for more
information about adding entitlements.-->
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- The App store requires you specify if the app uses encryption. -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- The App store requires you specify if the app uses encryption. -->
<!-- The Mac App Store requires you specify if the app uses encryption. -->

(At a minimum the S needs to be capitalized, but I suggest also prefixing Mac.)

<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
<!-- Please indicate <true/> or <false/> here. -->

<!-- Specify the category for your app here. -->
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
<!-- <key>LSApplicationCategoryType</key> -->
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
<key>UIDeviceFamily</key>
<array>
<integer>2</integer>
Expand Down