White-Label Support
Implementing splash screens for multi-brand applications with build-time and runtime configurations
White-Label Support
Overview
White-label applications require different branding assets and configurations based on the brand or client. This guide provides comprehensive strategies for implementing splash screens that support multiple brands with minimal code duplication.
White-Label Considerations
When building multi-brand apps, splash screens need to:
- Display brand-specific logos and colors
- Support different configurations per brand
- Maintain a single codebase for easier maintenance
- Allow for both build-time and runtime brand selection
Configuration Strategies
Build-Time vs Runtime
Build-Time Configuration
Each brand gets its own build with embedded assets:
Advantages:
- Native splash screens work perfectly
- Smaller app size per brand
- Better performance (no runtime decisions)
- More secure (assets are embedded)
Disadvantages:
- Multiple builds to maintain
- Longer deployment process
- App store submissions per brand
When to use:
- Distributing through app stores
- Brands have very different features
- Security is paramount
Build-Time Implementation
Asset Organization
Generating Brand Assets
Create a script to generate assets for each brand:
Android Build Flavors
Configure product flavors in android/app/build.gradle:
iOS Build Schemes
Create Build Configurations
In Xcode:
- Select your project
- Go to Info tab
- Duplicate configurations for each brand
- Name them: Debug-BrandA, Release-BrandA, etc.
Create Schemes
- Go to Product > Scheme > Manage Schemes
- Duplicate the default scheme for each brand
- Edit each scheme to use appropriate build configuration
- Set environment variables or preprocessor macros
JavaScript Configuration
Use react-native-config or similar to load brand config:
Runtime Implementation
Brand Manager
Create a centralized brand management system:
Branded Splash Screen Component
Brand Selection Screen
For apps where users select their brand:
Hybrid Implementation
Combine native and React splash screens for optimal experience:
Theming Integration
Integrate splash screen branding with app theming:
Testing White-Label Apps
Automated Testing
Manual Testing Checklist
- Test each brand configuration
- Verify correct assets display
- Check app store builds
- Test brand switching (if applicable)
- Verify theme consistency
- Test on various devices
- Check memory usage with all assets
Best Practices
White-Label Best Practices
- Consistent Asset Naming: Use the same filenames across brands
- Validate Assets: Ensure all brands have required assets
- Automate Generation: Script asset generation and testing
- Document Brand Configs: Maintain clear documentation
- Test Thoroughly: Test each brand configuration
Asset Guidelines
- (Do ✅) Standardize dimensions across all brand assets
- (Do ✅) Use consistent file formats (PNG for all)
- (Do ✅) Optimize file sizes for each brand
- (Do ✅) Include all required densities/resolutions
- (Don't ❌) Hardcode brand-specific values in shared code
- (Consider 🤔) Using SVG for scalable brand assets
Code Organization
Summary
White-label splash screen support requires careful planning:
- Choose the right strategy: Build-time, runtime, or hybrid
- Organize assets properly: Consistent structure across brands
- Automate processes: Asset generation and testing
- Test thoroughly: Each brand on multiple devices
- Maintain flexibility: Easy to add new brands
The approach depends on your specific requirements for distribution, brand selection, and maintenance.
Next Steps
- Explore Advanced Topics for animations
- Review Platform Implementation for setup
- Set up Design & Assets pipeline