Supported Platforms
iOS
iPhone, iPad, and tvOS support with Metal and OpenGL rendering
Android
Android phones and tablets with Vulkan and OpenGL rendering
iOS Support
Platform Requirements
- Minimum Version: iOS 10.0+
- Development: Requires macOS and Xcode
- Architectures: ARM64 (arm64), ARM64 simulator
- Devices: iPhone, iPad, iPod Touch
- Other: tvOS support available
iOS Configuration
Configure your iOS application inAppDelegate.cs:
src/iOS/Avalonia.iOS/Platform.cs:50
iOS Platform Options
Configure rendering options for iOS:src/iOS/Avalonia.iOS/Platform.cs:34
Rendering Modes
- Metal
- OpenGL
- Both
src/iOS/Avalonia.iOS/Platform.cs:109
iOS UI Integration
Embed Avalonia views in iOS applications:iOS Features
- Touch Input: Multi-touch gesture support
- Keyboard: On-screen keyboard integration
- Text Input: iOS text input method support
- Screen Info: Device screen and orientation detection
- Safe Areas: Notch and safe area support
- File Picker: iOS document picker integration
- Clipboard: iOS pasteboard integration
- Orientation: Portrait and landscape support
- Status Bar: Status bar control
src/iOS/Avalonia.iOS/iOSScreens.cs:10
Safe Area Insets
Handle safe areas for modern iOS devices:Android Support
Platform Requirements
- Minimum Version: Android 5.0 (API 21)+
- Target Version: Android 13.0 (API 33)+ recommended
- Architectures: ARM64 (arm64-v8a), ARMv7 (armeabi-v7a), x86_64
- Development: Windows, macOS, or Linux with Android SDK
Android Configuration
Configure your Android application:src/Android/Avalonia.Android/AndroidPlatform.cs:22
Android Platform Options
Configure rendering for Android:src/Android/Avalonia.Android/AndroidPlatform.cs:53
Rendering Modes
- Vulkan
- OpenGL
- Software
src/Android/Avalonia.Android/AndroidPlatform.cs:35
Android Features
- Touch Input: Multi-touch and gesture support
- Keyboard: Software keyboard with IME
- Back Button: Android back button handling
- Navigation Bar: System navigation integration
- Status Bar: Status bar customization
- Orientation: Portrait/landscape support
- File System: Android storage provider
- Clipboard: Android clipboard integration
- Notifications: Local notification support
- Permissions: Runtime permission handling
- Dark Mode: System theme detection
src/Android/Avalonia.Android/Platform/AndroidPlatformSettings.cs:13
System Navigation
Handle Android system navigation:System Insets
Handle Android system insets (notches, navigation bars):src/Android/Avalonia.Android/Platform/AndroidInsetsManager.cs:14
Mobile Application Lifetime
Mobile apps use an activatable lifetime:Touch and Gestures
Mobile platforms have full touch support:Virtual Keyboard
Control the on-screen keyboard:File System Access
Access device storage on mobile:src/Android/Avalonia.Android/Platform/Storage/AndroidStorageProvider.cs:8
Screen Orientation
Handle device orientation:src/iOS/Avalonia.iOS/iOSScreens.cs:25
Platform-Specific Code
Conditionally execute mobile-specific code:- Runtime Detection
- Compile-Time
Performance Tips
Optimize for Mobile
- Use GPU Rendering: Prefer Vulkan/Metal over software rendering
- Minimize Layout Passes: Avoid nested layouts
- Virtualize Lists: Use
VirtualizingStackPanelfor long lists - Optimize Images: Use appropriate resolutions
- Reduce Overdraw: Minimize overlapping UI elements
Memory Management
Deployment
iOS Deployment
- Configure
Info.plistfor iOS requirements - Add required device permissions
- Sign with Apple Developer certificate
- Test on physical devices
- Submit to App Store via Xcode
Android Deployment
- Configure
AndroidManifest.xml - Request necessary permissions
- Sign with keystore
- Create release APK/AAB
- Upload to Google Play Console
Next Steps
Platform-Specific Features
Access native mobile APIs
Web Platform
Deploy to browsers with WebAssembly