Repository navigation
Commit e838af9
authored
chore: iOS support for Native AOT (#1725)
Context: unoplatform/uno#21066
Context: unoplatform/uno@92676ea
Context: https://learn.microsoft.com/en-us/dotnet/maui/deployment/nativeaot?view=net-maui-10.0#publish-using-native-aot
MAUI documentation suggests that the `.csproj` should be modified to
contain `$(PublishAot)` instead of specifying it on the command-line.
In the case of `Chefs`, this doesn't appear to be necessary, but it
can be necessary if the project has `@(ProjectReference)`s which can't
be built in a trimming environment (e.g. .NET Standard projects).
As we *don't* want `$(PublishAot)` to be set by default, introduce a
`$(SkiaPublishAot)` "override", a'la unoplatform/uno@92676ea7.
`$(PublishAot)` will be true *only if* `$(SkiaPublishAot)`=true.
Additionally, it would be useful to install multiple different builds
side-by-side. In order for this to work on iOS (and Android), the
different builds must have different `$(ApplicationId)`s.
Introduce support for the following new MSBuild properties:
* `$(ApplicationIdVendorSuffix)`: Value to append to
`$(ApplicationId)`, so that separate builds have separate names.
* `$(ApplicationTitleVendorSuffix)`: Value to append to
`$(ApplicationTitle)`, so that the different builds are
distinguishable on the Home Screen.
This allows [^0] [^1]:
git clean -xdf Chefs{,.Api}
dotnet publish -c Release -r ios-arm64 -f net10.0-ios -p:TargetFrameworkOverride=net10.0-ios \
-bl Chefs/Chefs.csproj -p:UseSkiaRendering=true \
-p:ApplicationIdVendorSuffix=.mono "-p:ApplicationTitleVendorSuffix= (Mono)" \
-p:_DeviceName=$UDID "-p:CodesignKey=$CODESIGN_KEY" &&
cp Chefs/bin/Release/net10.0-ios/ios-arm64/publish/Chefs.ipa ../Chefs-monovm.ipa
git clean -xdf Chefs{,.Api}
dotnet publish -c Release -r ios-arm64 -f net10.0-ios -p:TargetFrameworkOverride=net10.0-ios \
-bl Chefs/Chefs.csproj -p:UseSkiaRendering=true -p:SkiaPublishAot=true \
-p:ApplicationIdVendorSuffix=.naot "-p:ApplicationTitleVendorSuffix= (NAOT)" \
-p:_DeviceName=$UDID "-p:CodesignKey=$CODESIGN_KEY" &&
\cp Chefs/bin/Release/net10.0-ios/ios-arm64/publish/Chefs.ipa ../Chefs-naot.ipa
Then *both* `Chefs-monovm.ipa` *and* `Chefs-naot.ipa` can be
installed *at the same time*, making it easier to do side-by-side
comparisons.
Finally, add a `Chefs App Finished Launching` message to the end of
`App.OnLaunched()` to provide a primitive way to determine app
startup times:
1. Launch **Console.app**
2. Select your target device in the Sources panel on the left
3. In the **Search** panel, enter: `Process:Chefs`
4. Click the **1 parent 53030d9 commit e838af9
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| |||
0 commit comments