Quick Start
Prerequisites
For iOS:- macOS with Xcode installed
- iOS Simulator or physical device
- Rust iOS targets:
rustup target add aarch64-apple-ios
- Android SDK and NDK installed
- Android Studio (recommended)
- Rust Android targets:
Create a Mobile App
Initialize a new mobile project:iOS Development
Run on iOS Simulator
- Build your Rust code for iOS
- Generate an Xcode project
- Launch the iOS Simulator
- Install and run your app
Run on Physical Device
- Connect your iOS device
- Configure signing in Xcode
- Run:
Build for Release
.app bundle will be in target/ios/release/.
iOS-Specific Configuration
Create anInfo.plist for iOS-specific settings:
Android Development
Run on Android Emulator
- Build your Rust code for Android
- Generate an Android project
- Launch the Android Emulator
- Install and run your APK
Run on Physical Device
- Enable USB debugging on your device
- Connect via USB
- Run:
Build for Release
target/android/release/.
Android-Specific Configuration
Configure your app inDioxus.toml:
Android Manifest
CustomizeAndroidManifest.xml for advanced features:
Mobile-Specific Features
Touch Events
Handle touch interactions:Responsive Design
Detect and respond to screen size:Device Orientation
Haptic Feedback
Trigger device vibration:Native Plugins
Access native device features through custom plugins:Camera Access
Use the device camera:Geolocation
Local Storage
Persist data on mobile:Performance Optimization
1. Minimize JavaScript Bridge Calls
2. Optimize Images
Use responsive images and lazy loading:3. Reduce Bundle Size
Strip debug symbols and optimize:Testing
iOS Simulator Testing
Android Emulator Testing
Publishing
iOS App Store
- Build release version
- Archive in Xcode
- Upload to App Store Connect
- Submit for review
Google Play Store
- Build signed APK:
- Upload to Google Play Console
- Submit for review
Troubleshooting
iOS Build Issues
- Ensure Xcode is up to date
- Check provisioning profiles
- Verify bundle identifier matches
Android Build Issues
- Update Android SDK and NDK
- Check
ANDROID_HOMEenvironment variable - Verify NDK version compatibility
Next Steps
- Desktop Platform - Desktop development
- Assets - Managing app resources
- Deployment - Publishing your app