[iOS] Add documentation for using alternate app icons on iOS and tvOS.#53
[iOS] Add documentation for using alternate app icons on iOS and tvOS.#53davidbritch merged 19 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
We're not really meant to do these type of index pages anymore, because they add nothing (basically just duplicating the links in the TOC). IIRC there are only two such pages in the MAUI docs, and they are for links from the IDE.
So I'd delete this.
There was a problem hiding this comment.
The value here should be dotnet-mobile, then an ms.subservice of dotnet-ios.
I'll fix it in the Android docs.
There was a problem hiding this comment.
In fact, delete the ms.service line here. It's not needed. The config is coming from docfx.json.
There was a problem hiding this comment.
Image needs resizing - look at the preview at https://review.learn.microsoft.com/en-us/dotnet/ios/app-fundamentals/images-icons/alternate-app-icons?branch=pr-en-us-53
There was a problem hiding this comment.
I'd delete this and put a colon on the end of the previous sentence.
Co-authored-by: David Britch <davidbritch@users.noreply.github.com>
There was a problem hiding this comment.
The TOC needs updating now that the index page has been removed.
|
So the issue blocking publication is that the content links to samples that are in a private repo. |
They're currently in a private repo, and it may take some time until they're made public. At that point I'll re-add the links.
I removed the links to the samples, and I'll add them back (in a different PR) when the samples repo is made public. |
|
Just took another look at this, and while the page titles use sentence case the headings still need converting to sentence case (e.g. Adding Alternate Icons to a .NET Project should be Adding alternate icons to a .NET project). |
This adds support for including all app icons in the app, as well as for specifying alternate app icons.
Including all app icons is enabled by setting the following MSBuild property:
```xml
<PropertyGroup>
<IncludeAllAppIcons>true</IncludeAllAppIcons>
</PropertyGroup>
````
This will make the `ACTool` task pass `--include-all-app-icons` to `actool` when compiling the asset catalog.
Specifying alternate app icon(s) is enabled by setting the following MSBuild item:
```xml
<ItemGroup>
<AlternateAppIcon Include="MyAlternateAppIcon" />
<AlternateAppIcon Include="MyOtherAlternateAppIcon" />
</ItemGroup>
```
Note that the included value is the name if the icon in question, not the path or the filename of the actual icon file (this way there's no need to have different items for different platforms, because there are some platform differences with regards to paths and icon file extensions).
In order to make the behavior consistent, this PR also adds support for specifying the app icon itself using an MSBuild property (in addition to the existing Info.plist property `XSAppIconAssets`, which will eventually be deprecated):
```xml
<PropertyGroup>
<AppIcon>MyAppIcon</AppIcon>
</PropertyGroup>
```
The same note applies here: the value is the name of the icon.
Note about platforms: the code is there for all platforms (iOS, tvOS, macOS and Mac Catalyst), but alternate app icons only seem to work for iOS and tvOS. `UIApplication.SupportsAlternateIcons` always returns `false` on Mac Catalyst (googling only find people in the same situation), and macOS doesn't have this API to begin with (nor anything similar):
Also:
* Add a bunch of tests.
* Document on our website: dotnet/docs-mobile#53
* Samples for iOS and tvOS: dotnet/macios-samples#2
Fixes #12790.
Fixes #20182.
I think I fixed them all now. I think we should wait with merging this until the new feature has actually been released though (should be the next service release after .NET 9). |
This reverts commit 0645b3d. These links are now public.
The feature has been released so this is good to go now. The samples repository is also public now, so I re-added the links to the samples. |
This documentation show the features being implemented in dotnet/macios#21475.
Companion sample projects: dotnet/macios-samples#2.
Internal previews