dotnet-uno-targets
Per-target deployment guidance for Uno Platform applications: Web/WASM, iOS, Android, macOS (Catalyst), Windows, Linux
(Skia/GTK), and Embedded (Skia/Framebuffer). Each target section covers project setup, debugging workflow,
packaging/distribution, platform-specific gotchas, AOT/trimming implications, and behavior differences from other
targets.
Scope
- Per-target project setup: WASM, iOS, Android, macOS (Catalyst), Windows, Linux, Embedded
- Debugging workflow per target platform
- Packaging and distribution (App Store, Play Store, MSIX, Flatpak)
- Platform-specific gotchas and AOT/trimming implications
Out of scope
- Core Uno Platform development (Extensions, MVUX, Toolkit) -- see [skill:dotnet-uno-platform]
- MCP integration for live docs -- see [skill:dotnet-uno-mcp]
- Uno Platform testing -- see [skill:dotnet-uno-testing]
- General AOT/trimming patterns -- see [skill:dotnet-aot-wasm]
- UI framework selection -- see [skill:dotnet-ui-chooser]
Cross-references: [skill:dotnet-uno-platform] for core development, [skill:dotnet-uno-mcp] for MCP integration,
[skill:dotnet-uno-testing] for testing, [skill:dotnet-aot-wasm] for general WASM AOT patterns, [skill:dotnet-ui-chooser]
for framework selection.
Target Platform Overview
| Target |
TFM |
Tooling |
Packaging |
Key Constraints |
| Web/WASM |
net8.0-browserwasm |
Browser DevTools |
Static hosting / Azure SWA |
No filesystem access, AOT recommended, limited threading |
| iOS |
net8.0-ios |
Xcode / VS Code / Rider |
App Store / TestFlight |
Provisioning profiles, entitlements, no JIT |
| Android |
net8.0-android |
Android SDK / Emulator |
Play Store / APK sideload |
SDK version targeting, permissions |
| macOS (Catalyst) |
net8.0-maccatalyst |
Xcode |
Mac App Store / notarization |
Sandbox restrictions, entitlements |
| Windows |
net8.0-windows10.0.19041 |
Visual Studio |
MSIX / Windows Store |
WinAppSDK version alignment |
| Linux |
net8.0-desktop |
Skia/GTK host |
AppImage / Flatpak / Snap |
GTK dependencies, Skia rendering |
| Embedded |
net8.0-desktop |
Skia/Framebuffer |
Direct deployment |
No windowing system, headless rendering |
TFM note: Use version-agnostic globs (net*-ios, net*-android) when detecting platform targets programmatically
to avoid false negatives on older or newer TFMs.
Web/WASM
Project Setup
# Run the WASM target
dotnet run -f net8.0-browserwasm --project MyApp/MyApp.csproj
```bash
The WASM target renders XAML controls in the browser. The renderer depends on project configuration: Skia (canvas/WebGL) or native HTML mapping. The app loads via a JavaScript bootstrap (`uno-bootstrap.js`) that initializes the .NET WASM runtime.
### Debugging
- **Browser DevTools:** Use F12 in Chrome/Edge to inspect DOM, network, console output
- **.NET debugging:** Visual Studio and VS Code support debugging the .NET WASM runtime via browser CDP
- **Uno DevServer:** `dotnet run` starts a development server with live reload support
- **Console logging:** `ILogger` output appears in the browser console
### Packaging/Distribution
```bash
# Publish for production
dotnet publish -f net8.0-browserwasm -c Release --output ./publish
# Output is a static site (HTML/JS/WASM)
# Deploy to: Azure Static Web Apps, GitHub Pages, Netlify, any static host
```text
Published output is a self-contained static site. No server-side runtime required.
### Platform Gotchas
- **No filesystem access:** Use browser storage APIs (IndexedDB, localStorage) via JS interop or Uno.Storage
- **Threading limitations:** Web Workers provide limited multi-threading; `Task.Run` may not parallelize on WASM
- **CORS restrictions:** HTTP requests from WASM are subject to browser CORS policy
- **Initial load time:** The .NET WASM runtime and assemblies must download before the app is usable. Use assembly trimming to reduce download size. AOT improves runtime execution speed but increases artifact size
- **Deep linking:** Configure URL routing in the Uno Navigation Extensions for browser URL bar navigation
### AOT/Trimming
**Trimming** reduces download size by removing unused code. **AOT** pre-compiles IL to WebAssembly, improving runtime execution speed but increasing artifact size. Use both together and measure the tradeoffs for your app.
```xml
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-browserwasm'">
<WasmShellMonoRuntimeExecutionMode>InterpreterAndAOT</WasmShellMonoRuntimeExecutionMode>
<RunAOTCompilation>true</RunAOTCompilation>
</PropertyGroup>
```bash
**Trimming is critical for WASM.** Untrimmed apps can exceed 30MB. With trimming, typical apps are 5-15MB. AOT adds to the artifact size but eliminates interpreter overhead at runtime -- profile both download time and execution speed in target conditions.
For Uno-specific AOT gotchas (linker descriptors, Uno source generators), see the AOT section. For general WASM AOT patterns, see [skill:dotnet-aot-wasm].
### Behavior Differences
- **Navigation:** URL-based deep linking works natively; route maps should define URL patterns
- **Authentication:** OAuth flows use browser redirects (popup or redirect); no native browser available. Token storage uses browser secure storage
- **Debugging:** Full .NET debugger available via CDP; breakpoints work in Visual Studio/VS Code
- **File pickers:** Use browser file input APIs; `FileOpenPicker` maps to `<input type="file">`
---
## iOS
### Project Setup
```bash
# Build for iOS simulator
dotnet build -f net8.0-ios
# Run on simulator
dotnet run -f net8.0-ios
```text
Requires Xcode installed on macOS. The renderer (Skia or native) depends on project configuration and Uno version.
### Debugging
- **Visual Studio (Pair to Mac) / VS Code + C# Dev Kit / Rider:** Attach to iOS simulator or device
- **Xcode Instruments:** Profile CPU, memory, and energy usage
- **Hot Reload:** Supported via `DOTNET_MODIFIABLE_ASSEMBLIES=debug`
### Packaging/Distribution
```bash
# Publish for App Store
dotnet publish -f net8.0-ios -c Release \
/p:CodesignKey="Apple Distribution: MyCompany" \
/p:CodesignProvision="MyApp Distribution Profile"
```text
Distribution channels: App Store (requires Apple Developer account), TestFlight (beta testing), Ad Hoc (enterprise).
**Required:** Provisioning profiles, signing certificates, entitlements file for capabilities (push notifications, HealthKit, etc.).
### Platform Gotchas
- **No JIT compilation:** iOS prohibits JIT. All code must be AOT-compiled or interpreted. The .NET runtime uses the Mono interpreter by default
- **Provisioning profiles:** Must match bundle ID, team ID, and entitlements. Expired profiles cause cryptic build failures
- **Background execution:** iOS restricts background processing. Use `BGTaskScheduler` for background work
- **App Transport Security (ATS):** HTTPS required by default; HTTP requires an `NSAppTransportSecurity` exception in `Info.plist`
- **Memory pressure:** iOS aggressively kills background apps. Handle `MemoryWarning` events
### AOT/Trimming
iOS requires AOT by default (no JIT). The .NET runtime compiles to native ARM64 code.
```xml
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PublishTrimmed>true</PublishTrimmed>
<TrimMode>link</TrimMode>
</PropertyGroup>
```text
**Gotcha:** Reflection-heavy code fails silently on iOS. Test with trimming enabled during development, not just for release builds.
### Behavior Differences
- **Navigation:** Gesture-based back navigation (swipe from left edge) is automatic with Uno Navigation
- **Authentication:** Uses `ASWebAuthenticationSession` for OAuth; biometric auth via `LocalAuthentication` framework
- **Debugging:** Simulator is fast; device debugging requires USB connection and provisioning. Remote debugging with Hot Reload supported
---
## Android
### Project Setup
```bash
# Build for Android
dotnet build -f net8.0-android
# Deploy to connected device or emulator
dotnet run -f net8.0-android
```text
Requires Android SDK (installed via `dotnet workload install android` or Android Studio).
### Debugging
- **Android Emulator:** Use Android Studio's emulator or command-line `emulator`
- **ADB (Android Debug Bridge):** `adb logcat` for runtime logs, `adb devices` to verify connections
- **Visual Studio / VS Code:** Full debugging with breakpoints on emulator or device
### Packaging/Distribution
```bash
# Publish signed APK/AAB (use env vars or CI secrets for passwords — never hardcode)
dotnet publish -f net8.0-android -c Release \
/p:AndroidKeyStore=true \
/p:AndroidSigningKeyStore=mykey.keystore \
/p:AndroidSigningStorePass="$ANDROID_KEYSTORE_PASS" \
/p:AndroidSigningKeyAlias=myalias \
/p:AndroidSigningKeyPass="$ANDROID_KEY_PASS"
```text
Google Play requires Android App Bundle (AAB) format. Sideloading uses APK.
### Platform Gotchas
- **SDK version targeting:** `<SupportedOSPlatformVersion>` controls minimum API level. Target API 34+ for Google Play compliance
- **Runtime permissions:** Dangerous permissions (camera, location, storage) require runtime requests. Check and request in code, not just manifest
- **Activity lifecycle:** Android destroys activities on rotation by default. Uno handles this, but custom native code must be lifecycle-aware
- **ProGuard/R8:** Code shrinking may remove reflection targets. Use `@Keep` annotations or linker configuration for native interop types
### AOT/Trimming
```xml
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PublishTrimmed>true</PublishTrimmed>
<RunAOTCompilation>true</RunAOTCompilation>
</PropertyGroup>
```text
AOT on Android improves startup time. Unlike iOS, JIT is available as fallback for untrimmed code paths.
### Behavior Differences
- **Navigation:** Hardware/software back button triggers Uno navigation back. `BackRequested` event fires automatically
- **Authentication:** Uses `CustomTabs` (Chrome) for OAuth; biometric auth via `AndroidX.Biometric`
- **Debugging:** Emulator is slower than iOS Simulator but supports more API levels. Use hardware acceleration (HAXM/KVM) for performance
---
## macOS (Catalyst)
### Project Setup
```bash
# Build for macOS
dotnet build -f net8.0-maccatalyst
# Run on macOS
dotnet run -f net8.0-maccatalyst
```text
Uses Mac Catalyst (iOS APIs adapted for macOS). Requires Xcode on macOS.
### Debugging
- **Visual Studio (Pair to Mac) / VS Code + C# Dev Kit / Rider:** Native macOS debugging
- **Xcode Instruments:** Profile performance and memory
- **Console.app:** View system logs for the app process
### Packaging/Distribution
```bash
# Publish for distribution
dotnet publish -f net8.0-maccatalyst -c Release \
/p:CodesignKey="Developer ID Application: MyCompany" \
/p:CodesignProvision="MyApp Mac Profile"
```text
Distribution channels: Mac App Store, direct download with notarization, enterprise deployment.
**Notarization required:** macOS Gatekeeper requires notarized apps for distribution outside the App Store. Use `xcrun notarytool` to submit.
### Platform Gotchas
- **Sandbox restrictions:** Mac App Store apps run in a sandbox. File access requires entitlements and user grants
- **Catalyst limitations:** Not all iOS APIs translate to macOS. Check `SupportedOSPlatform` attributes
- **Menu bar:** macOS expects a proper menu bar. Uno provides default menus; customize via platform-specific code
- **Window management:** macOS apps support multiple windows. Uno's single-window model may need adaptation for multi-window scenarios
### AOT/Trimming
Same profile as iOS (AOT by default for Catalyst). Trimming recommended for distribution builds.
### Behavior Differences
- **Navigation:** No swipe-back gesture; relies on toolbar back button or keyboard shortcuts (Cmd+[)
- **Authentication:** Uses `ASWebAuthenticationSession` (shared with iOS); supports Touch ID via Secure Enclave
- **Debugging:** Native macOS process; standard .NET debugging tools work. No simulator -- runs as native app
---
## Windows
### Project Setup
```bash
# Build for Windows
dotnet build -f net8.0-windows10.0.19041
# Run on Windows
dotnet run -f net8.0-windows10.0.19041
```text
The Windows target can use either the Skia renderer or native WinAppSDK/WinUI 3 rendering.
### Debugging
- **Visual Studio:** Full debugging with XAML Hot Reload, Live Visual Tree, Live Property Explorer
- **WinUI diagnostics:** Built-in diagnostic overlay for layout inspection
### Packaging/Distribution
```bash
# Package as MSIX
dotnet publish -f net8.0-windows10.0.19041 -c Release \
/p:PackageOutputPath=./packages
```bash
Distribution: Microsoft Store (MSIX), sideloading (MSIX with certificate), ClickOnce, or direct EXE.
### Platform Gotchas
- **WinAppSDK version alignment:** The Windows TFM version must match the minimum Windows version. `10.0.19041` = Windows 10 2004+
- **UAC and elevation:** Apps cannot self-elevate. Design for standard user permissions
- **Windows-specific APIs:** `Windows.Storage`, `Windows.Networking` APIs are available only on Windows target. Use conditional compilation or Uno abstractions
- **MSIX signing:** MSIX packages must be signed for installation. Use a code signing certificate for distribution
### AOT/Trimming
```xml
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<PublishTrimmed>true</PublishTrimmed>
<PublishAot>true</PublishAot>
</PropertyGroup>
```text
Windows supports both JIT and AOT. AOT produces a single native EXE with faster startup.
### Behavior Differences
- **Navigation:** Standard Windows navigation (Alt+Left for back, title bar back button)
- **Authentication:** Uses system browser or WAM (Web Account Manager) for SSO with Microsoft accounts
- **Debugging:** Richest debugging experience with Visual Studio Live Visual Tree and XAML Hot Reload
---
## Linux (Skia/GTK)
### Project Setup
```bash
# Build for Linux desktop
dotnet build -f net8.0-desktop
# Run on Linux
dotnet run -f net8.0-desktop
```text
## Detailed Examples
See [references/detailed-examples.md](references/detailed-examples.md) for complete code samples and advanced patterns.
1---2name: dotnet-uno-targets3category: ui-frameworks4subcategory: uno5description: Deploys Uno Platform apps. Per-target guidance for WASM, iOS, Android, macOS, Windows, Linux.6license: MIT7targets: ['*']8tags: [ui, dotnet, skill]9version: '0.0.1'10author: 'dotnet-agent-harness'11invocable: true12claudecode:13 allowed-tools: ['Read', 'Grep', 'Glob', 'Bash', 'Write', 'Edit']14codexcli:15 short-description: '.NET skill guidance for ui tasks'16opencode:17 allowed-tools: ['Read', 'Grep', 'Glob', 'Bash', 'Write', 'Edit']18copilot: {}19geminicli: {}20antigravity: {}21---2223# dotnet-uno-targets2425Per-target deployment guidance for Uno Platform applications: Web/WASM, iOS, Android, macOS (Catalyst), Windows, Linux26(Skia/GTK), and Embedded (Skia/Framebuffer). Each target section covers project setup, debugging workflow,27packaging/distribution, platform-specific gotchas, AOT/trimming implications, and behavior differences from other28targets.2930## Scope3132- Per-target project setup: WASM, iOS, Android, macOS (Catalyst), Windows, Linux, Embedded33- Debugging workflow per target platform34- Packaging and distribution (App Store, Play Store, MSIX, Flatpak)35- Platform-specific gotchas and AOT/trimming implications3637## Out of scope3839- Core Uno Platform development (Extensions, MVUX, Toolkit) -- see [skill:dotnet-uno-platform]40- MCP integration for live docs -- see [skill:dotnet-uno-mcp]41- Uno Platform testing -- see [skill:dotnet-uno-testing]42- General AOT/trimming patterns -- see [skill:dotnet-aot-wasm]43- UI framework selection -- see [skill:dotnet-ui-chooser]4445Cross-references: [skill:dotnet-uno-platform] for core development, [skill:dotnet-uno-mcp] for MCP integration,46[skill:dotnet-uno-testing] for testing, [skill:dotnet-aot-wasm] for general WASM AOT patterns, [skill:dotnet-ui-chooser]47for framework selection.4849---5051## Target Platform Overview5253| Target | TFM | Tooling | Packaging | Key Constraints |54| ---------------- | -------------------------- | ----------------------- | ---------------------------- | -------------------------------------------------------- |55| Web/WASM | `net8.0-browserwasm` | Browser DevTools | Static hosting / Azure SWA | No filesystem access, AOT recommended, limited threading |56| iOS | `net8.0-ios` | Xcode / VS Code / Rider | App Store / TestFlight | Provisioning profiles, entitlements, no JIT |57| Android | `net8.0-android` | Android SDK / Emulator | Play Store / APK sideload | SDK version targeting, permissions |58| macOS (Catalyst) | `net8.0-maccatalyst` | Xcode | Mac App Store / notarization | Sandbox restrictions, entitlements |59| Windows | `net8.0-windows10.0.19041` | Visual Studio | MSIX / Windows Store | WinAppSDK version alignment |60| Linux | `net8.0-desktop` | Skia/GTK host | AppImage / Flatpak / Snap | GTK dependencies, Skia rendering |61| Embedded | `net8.0-desktop` | Skia/Framebuffer | Direct deployment | No windowing system, headless rendering |6263**TFM note:** Use version-agnostic globs (`net*-ios`, `net*-android`) when detecting platform targets programmatically64to avoid false negatives on older or newer TFMs.6566---6768## Web/WASM6970### Project Setup7172````bash7374# Run the WASM target75dotnet run -f net8.0-browserwasm --project MyApp/MyApp.csproj7677```bash7879The WASM target renders XAML controls in the browser. The renderer depends on project configuration: Skia (canvas/WebGL) or native HTML mapping. The app loads via a JavaScript bootstrap (`uno-bootstrap.js`) that initializes the .NET WASM runtime.8081### Debugging8283- **Browser DevTools:** Use F12 in Chrome/Edge to inspect DOM, network, console output84- **.NET debugging:** Visual Studio and VS Code support debugging the .NET WASM runtime via browser CDP85- **Uno DevServer:** `dotnet run` starts a development server with live reload support86- **Console logging:** `ILogger` output appears in the browser console8788### Packaging/Distribution8990```bash9192# Publish for production93dotnet publish -f net8.0-browserwasm -c Release --output ./publish9495# Output is a static site (HTML/JS/WASM)96# Deploy to: Azure Static Web Apps, GitHub Pages, Netlify, any static host9798```text99100Published output is a self-contained static site. No server-side runtime required.101102### Platform Gotchas103104- **No filesystem access:** Use browser storage APIs (IndexedDB, localStorage) via JS interop or Uno.Storage105- **Threading limitations:** Web Workers provide limited multi-threading; `Task.Run` may not parallelize on WASM106- **CORS restrictions:** HTTP requests from WASM are subject to browser CORS policy107- **Initial load time:** The .NET WASM runtime and assemblies must download before the app is usable. Use assembly trimming to reduce download size. AOT improves runtime execution speed but increases artifact size108- **Deep linking:** Configure URL routing in the Uno Navigation Extensions for browser URL bar navigation109110### AOT/Trimming111112**Trimming** reduces download size by removing unused code. **AOT** pre-compiles IL to WebAssembly, improving runtime execution speed but increasing artifact size. Use both together and measure the tradeoffs for your app.113114```xml115116<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-browserwasm'">117 <WasmShellMonoRuntimeExecutionMode>InterpreterAndAOT</WasmShellMonoRuntimeExecutionMode>118 <RunAOTCompilation>true</RunAOTCompilation>119</PropertyGroup>120121```bash122123**Trimming is critical for WASM.** Untrimmed apps can exceed 30MB. With trimming, typical apps are 5-15MB. AOT adds to the artifact size but eliminates interpreter overhead at runtime -- profile both download time and execution speed in target conditions.124125For Uno-specific AOT gotchas (linker descriptors, Uno source generators), see the AOT section. For general WASM AOT patterns, see [skill:dotnet-aot-wasm].126127### Behavior Differences128129- **Navigation:** URL-based deep linking works natively; route maps should define URL patterns130- **Authentication:** OAuth flows use browser redirects (popup or redirect); no native browser available. Token storage uses browser secure storage131- **Debugging:** Full .NET debugger available via CDP; breakpoints work in Visual Studio/VS Code132- **File pickers:** Use browser file input APIs; `FileOpenPicker` maps to `<input type="file">`133134---135136## iOS137138### Project Setup139140```bash141142# Build for iOS simulator143dotnet build -f net8.0-ios144145# Run on simulator146dotnet run -f net8.0-ios147148```text149150Requires Xcode installed on macOS. The renderer (Skia or native) depends on project configuration and Uno version.151152### Debugging153154- **Visual Studio (Pair to Mac) / VS Code + C# Dev Kit / Rider:** Attach to iOS simulator or device155- **Xcode Instruments:** Profile CPU, memory, and energy usage156- **Hot Reload:** Supported via `DOTNET_MODIFIABLE_ASSEMBLIES=debug`157158### Packaging/Distribution159160```bash161162# Publish for App Store163dotnet publish -f net8.0-ios -c Release \164 /p:CodesignKey="Apple Distribution: MyCompany" \165 /p:CodesignProvision="MyApp Distribution Profile"166167```text168169Distribution channels: App Store (requires Apple Developer account), TestFlight (beta testing), Ad Hoc (enterprise).170171**Required:** Provisioning profiles, signing certificates, entitlements file for capabilities (push notifications, HealthKit, etc.).172173### Platform Gotchas174175- **No JIT compilation:** iOS prohibits JIT. All code must be AOT-compiled or interpreted. The .NET runtime uses the Mono interpreter by default176- **Provisioning profiles:** Must match bundle ID, team ID, and entitlements. Expired profiles cause cryptic build failures177- **Background execution:** iOS restricts background processing. Use `BGTaskScheduler` for background work178- **App Transport Security (ATS):** HTTPS required by default; HTTP requires an `NSAppTransportSecurity` exception in `Info.plist`179- **Memory pressure:** iOS aggressively kills background apps. Handle `MemoryWarning` events180181### AOT/Trimming182183iOS requires AOT by default (no JIT). The .NET runtime compiles to native ARM64 code.184185```xml186187<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">188 <PublishTrimmed>true</PublishTrimmed>189 <TrimMode>link</TrimMode>190</PropertyGroup>191192```text193194**Gotcha:** Reflection-heavy code fails silently on iOS. Test with trimming enabled during development, not just for release builds.195196### Behavior Differences197198- **Navigation:** Gesture-based back navigation (swipe from left edge) is automatic with Uno Navigation199- **Authentication:** Uses `ASWebAuthenticationSession` for OAuth; biometric auth via `LocalAuthentication` framework200- **Debugging:** Simulator is fast; device debugging requires USB connection and provisioning. Remote debugging with Hot Reload supported201202---203204## Android205206### Project Setup207208```bash209210# Build for Android211dotnet build -f net8.0-android212213# Deploy to connected device or emulator214dotnet run -f net8.0-android215216```text217218Requires Android SDK (installed via `dotnet workload install android` or Android Studio).219220### Debugging221222- **Android Emulator:** Use Android Studio's emulator or command-line `emulator`223- **ADB (Android Debug Bridge):** `adb logcat` for runtime logs, `adb devices` to verify connections224- **Visual Studio / VS Code:** Full debugging with breakpoints on emulator or device225226### Packaging/Distribution227228```bash229230# Publish signed APK/AAB (use env vars or CI secrets for passwords — never hardcode)231dotnet publish -f net8.0-android -c Release \232 /p:AndroidKeyStore=true \233 /p:AndroidSigningKeyStore=mykey.keystore \234 /p:AndroidSigningStorePass="$ANDROID_KEYSTORE_PASS" \235 /p:AndroidSigningKeyAlias=myalias \236 /p:AndroidSigningKeyPass="$ANDROID_KEY_PASS"237238```text239240Google Play requires Android App Bundle (AAB) format. Sideloading uses APK.241242### Platform Gotchas243244- **SDK version targeting:** `<SupportedOSPlatformVersion>` controls minimum API level. Target API 34+ for Google Play compliance245- **Runtime permissions:** Dangerous permissions (camera, location, storage) require runtime requests. Check and request in code, not just manifest246- **Activity lifecycle:** Android destroys activities on rotation by default. Uno handles this, but custom native code must be lifecycle-aware247- **ProGuard/R8:** Code shrinking may remove reflection targets. Use `@Keep` annotations or linker configuration for native interop types248249### AOT/Trimming250251```xml252253<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">254 <PublishTrimmed>true</PublishTrimmed>255 <RunAOTCompilation>true</RunAOTCompilation>256</PropertyGroup>257258```text259260AOT on Android improves startup time. Unlike iOS, JIT is available as fallback for untrimmed code paths.261262### Behavior Differences263264- **Navigation:** Hardware/software back button triggers Uno navigation back. `BackRequested` event fires automatically265- **Authentication:** Uses `CustomTabs` (Chrome) for OAuth; biometric auth via `AndroidX.Biometric`266- **Debugging:** Emulator is slower than iOS Simulator but supports more API levels. Use hardware acceleration (HAXM/KVM) for performance267268---269270## macOS (Catalyst)271272### Project Setup273274```bash275276# Build for macOS277dotnet build -f net8.0-maccatalyst278279# Run on macOS280dotnet run -f net8.0-maccatalyst281282```text283284Uses Mac Catalyst (iOS APIs adapted for macOS). Requires Xcode on macOS.285286### Debugging287288- **Visual Studio (Pair to Mac) / VS Code + C# Dev Kit / Rider:** Native macOS debugging289- **Xcode Instruments:** Profile performance and memory290- **Console.app:** View system logs for the app process291292### Packaging/Distribution293294```bash295296# Publish for distribution297dotnet publish -f net8.0-maccatalyst -c Release \298 /p:CodesignKey="Developer ID Application: MyCompany" \299 /p:CodesignProvision="MyApp Mac Profile"300301```text302303Distribution channels: Mac App Store, direct download with notarization, enterprise deployment.304305**Notarization required:** macOS Gatekeeper requires notarized apps for distribution outside the App Store. Use `xcrun notarytool` to submit.306307### Platform Gotchas308309- **Sandbox restrictions:** Mac App Store apps run in a sandbox. File access requires entitlements and user grants310- **Catalyst limitations:** Not all iOS APIs translate to macOS. Check `SupportedOSPlatform` attributes311- **Menu bar:** macOS expects a proper menu bar. Uno provides default menus; customize via platform-specific code312- **Window management:** macOS apps support multiple windows. Uno's single-window model may need adaptation for multi-window scenarios313314### AOT/Trimming315316Same profile as iOS (AOT by default for Catalyst). Trimming recommended for distribution builds.317318### Behavior Differences319320- **Navigation:** No swipe-back gesture; relies on toolbar back button or keyboard shortcuts (Cmd+[)321- **Authentication:** Uses `ASWebAuthenticationSession` (shared with iOS); supports Touch ID via Secure Enclave322- **Debugging:** Native macOS process; standard .NET debugging tools work. No simulator -- runs as native app323324---325326## Windows327328### Project Setup329330```bash331332# Build for Windows333dotnet build -f net8.0-windows10.0.19041334335# Run on Windows336dotnet run -f net8.0-windows10.0.19041337338```text339340The Windows target can use either the Skia renderer or native WinAppSDK/WinUI 3 rendering.341342### Debugging343344- **Visual Studio:** Full debugging with XAML Hot Reload, Live Visual Tree, Live Property Explorer345- **WinUI diagnostics:** Built-in diagnostic overlay for layout inspection346347### Packaging/Distribution348349```bash350351# Package as MSIX352dotnet publish -f net8.0-windows10.0.19041 -c Release \353 /p:PackageOutputPath=./packages354355```bash356357Distribution: Microsoft Store (MSIX), sideloading (MSIX with certificate), ClickOnce, or direct EXE.358359### Platform Gotchas360361- **WinAppSDK version alignment:** The Windows TFM version must match the minimum Windows version. `10.0.19041` = Windows 10 2004+362- **UAC and elevation:** Apps cannot self-elevate. Design for standard user permissions363- **Windows-specific APIs:** `Windows.Storage`, `Windows.Networking` APIs are available only on Windows target. Use conditional compilation or Uno abstractions364- **MSIX signing:** MSIX packages must be signed for installation. Use a code signing certificate for distribution365366### AOT/Trimming367368```xml369370<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">371 <PublishTrimmed>true</PublishTrimmed>372 <PublishAot>true</PublishAot>373</PropertyGroup>374375```text376377Windows supports both JIT and AOT. AOT produces a single native EXE with faster startup.378379### Behavior Differences380381- **Navigation:** Standard Windows navigation (Alt+Left for back, title bar back button)382- **Authentication:** Uses system browser or WAM (Web Account Manager) for SSO with Microsoft accounts383- **Debugging:** Richest debugging experience with Visual Studio Live Visual Tree and XAML Hot Reload384385---386387## Linux (Skia/GTK)388389### Project Setup390391```bash392393# Build for Linux desktop394dotnet build -f net8.0-desktop395396# Run on Linux397dotnet run -f net8.0-desktop398399```text400401402## Detailed Examples403404See [references/detailed-examples.md](references/detailed-examples.md) for complete code samples and advanced patterns.