Configuration
Screen orientation is configured inconfig/nativephp.php:
Applying Changes
After modifying orientation settings, rebuild the native configuration:Orientation Options
Each platform supports four orientation modes:Portrait
Standard vertical orientation with the device held upright:- Most mobile apps
- Content-focused apps (news, social media)
- Forms and data entry
- Apps with vertical scrolling
Upside Down
Inverted portrait orientation (device rotated 180 degrees):- Rarely used on iPhones (typically disabled)
- May be useful for specialized use cases
Landscape Left
Horizontal orientation with the home button on the left (or device tilted left):- Video playback
- Games
- Dashboard and data visualization apps
- Apps with wide content
Landscape Right
Horizontal orientation with the home button on the right (or device tilted right):- Video playback (usually combined with landscape_left)
- Games
- Apps requiring horizontal viewing
Platform-Specific Behavior
iPhone
iPhone orientation is configured independently from iPad:- At least one orientation must be enabled
- Upside-down portrait is typically disabled
- Settings apply to all iPhone models
iPad
iPad support is controlled by theipad configuration option:
- All orientations are automatically supported (portrait, upside down, landscape left, landscape right)
- This is required by Apple’s App Store guidelines
- You cannot selectively disable iPad orientations
- Your app UI scales well to larger screens
- You want to reach iPad users
- Your app provides a good experience on tablets
- Your app is designed specifically for phone-sized screens
- You’re not ready to support tablet layouts
- You want to limit your app to iPhones initially
Android
Android orientation is configured independently:- At least one orientation must be enabled
- Settings apply to all Android devices (phones and tablets)
- Upside-down portrait is less common on Android
Common Configurations
Portrait Only (Default)
Most mobile apps use portrait-only orientation:- Social media apps
- News and content apps
- E-commerce apps
- Form-heavy apps
Landscape Only
For games or horizontal-focused apps:- Racing games
- Horizontal scrolling games
- Video editing apps
- Dashboard apps
All Orientations
For apps that work well in any orientation:- Video playback apps
- Photo viewing apps
- Reading apps
- Flexible UI apps
Portrait with Landscape Video
For portrait apps that support landscape video playback:- Social media apps with video
- News apps with video content
- Apps with embedded video players
Responsive Design Considerations
When supporting multiple orientations, design your UI to adapt:Using Tailwind CSS Responsive Classes
Detecting Orientation in JavaScript
Detecting Orientation in Livewire
Validation
The build process validates orientation configuration: iPhone validation:Testing Orientations
Test your app in all supported orientations:iOS Simulator
Android Emulator
Physical Devices
Test on real devices with auto-rotate enabled:- Enable auto-rotate in device settings
- Physically rotate the device
- Verify UI adapts correctly
- Check for layout issues
Best Practices
Start with portrait only
Start with portrait only
Most apps work best in portrait mode. Only add landscape support if your app truly benefits from it.
Support both landscape directions
Support both landscape directions
If you enable landscape mode, enable both left and right to allow natural device rotation.
Consider iPad requirements
Consider iPad requirements
Remember that iPad support requires all orientations. Only enable iPad if you’re ready to support tablet layouts.
Test orientation changes
Test orientation changes
Test your app’s behavior when rotating between orientations to ensure smooth transitions.
Use responsive design
Use responsive design
Design your UI to adapt gracefully to different orientations using responsive CSS classes.
Disable upside-down portrait
Disable upside-down portrait
For iPhones, keep upside-down portrait disabled unless you have a specific use case.
Troubleshooting
App doesn’t rotate
- Verify orientation is enabled in config
- Run
php artisan native:install --force - Check device auto-rotate is enabled
- Rebuild and reinstall the app
iPad shows wrong orientations
Remember: Whenipad is enabled, all orientations are automatically supported regardless of iPhone settings.
Build fails with orientation error
Ensure at least one orientation is enabled for each platform:Next Steps
Configuration
Learn about other configuration options
Responsive Design
Build responsive layouts for different orientations