▶️ Running Your Shipnative App
Once you’ve completed the installation and setup, you’re ready to launch your Shipnative application. This guide covers how to run your app on iOS and Android, and explains the powerful mock mode feature.
Launching on iOS
To run your Shipnative app on an iOS simulator or device:
- Navigate to the
apps/app directory:
- Execute the iOS run command:
This command will build your app and launch it on an available iOS simulator. If you have a physical device connected and configured, it may also attempt to launch there.
Launching on Android
To run your Shipnative app on an Android emulator or device:
- Navigate to the
apps/app directory:
- Execute the Android run command:
This command will build your app and launch it on an available Android emulator. If you have a physical device connected and configured, it may also attempt to launch there.
Understanding Mock Mode
Shipnative comes with a powerful mock mode that allows you to develop and test your application’s frontend without needing to set up any backend services or API keys.
How it Works
During the yarn setup process, if you choose to skip configuring services like Supabase, RevenueCat, or PostHog, the app will automatically fall back to mock implementations for these services. This means:
- Supabase: Authentication, database operations, and storage will be simulated locally.
- RevenueCat: In-app purchase flows will be mocked, allowing you to test subscription states.
- PostHog: Analytics events will be captured and logged locally without sending data to a remote server.
- Sentry: Error tracking will be simulated.
Benefits of Mock Mode
- Frontend-First Development: Start building your UI and user experience immediately, without waiting for backend setup.
- Rapid Prototyping: Quickly iterate on features and designs.
- Offline Development: Work on your app even without an internet connection.
- Reduced Costs: Avoid incurring costs from third-party services during early development.
When to use Mock Mode: Use mock mode for the majority of your frontend development. Only integrate real API keys and services when you are ready to test end-to-end functionality or prepare for deployment.
Web Support (Coming Soon)
While Shipnative is primarily focused on iOS and Android, web support is actively being developed and will be available with the production release of NativeWind v5.
- Current Status: Web is not yet fully supported.
- Future Plans: We aim to provide a seamless web experience, allowing you to deploy your React Native app to the web with minimal changes.
Stay tuned for updates on web platform compatibility!