IndexPackages

create-mobile-wrapper

Turn any website URL into a native iOS and Android app wrapper with push notifications.

Documentation
Coverage

πŸ€– Agent skill β€” npx skills@latest add https://github.com/OpenSourceAGI/dev-tools-starter-agent --skill web2mobile (what it covers)

πŸ’One Code to rule them all β€” and in the cloud compile them.

Transform your website into a native mobile app in minutes. No coding required.

Why Your Website Needs a Mobile App

Boost Your SEO & Customer Discovery

  1. App Store Presence = Free Marketing

    • Your app appears in Apple App Store and Google Play Store searches
    • Millions of users discover apps through app stores daily
    • New discovery channel beyond Google search
  2. Improved SEO Rankings

    • Google favors websites with mobile apps in search results
    • App deep links boost your website's domain authority
    • Increased brand signals across multiple platforms (website + app stores)
  3. Higher Customer Engagement

    • Push notifications keep customers coming back (39% higher retention)
    • Home screen icon = constant brand visibility
    • Faster load times than mobile web browsers
  4. Competitive Advantage

    • Stand out from competitors who only have websites
    • Professional appearance increases trust and credibility
    • Capture mobile-first users who prefer apps over browsers
  5. Additional Marketing Channels

    • App Store Optimization (ASO) - like SEO for apps
    • Get featured in app store categories
    • Run app-specific promotions and campaigns

What This Tool Does

Web2Mobile creates a production-ready mobile app wrapper for your existing website using React Native and Expo. Your website loads inside a native WebView, giving users a seamless native app experience.

Perfect for:

  • E-commerce stores
  • SaaS products
  • Content websites & blogs
  • Online services
  • Portfolio & business websites
  • Any responsive website

Quick Start

Prerequisites

  • Node.js 18+ installed
  • Your website must be HTTPS (required for mobile apps)
  • A logo/icon image file (PNG, JPG, or SVG)

Installation

npm install

Configuration

Create a config.json file in the root directory:

{
  "name": "Your App Name",
  "url": "https://yourwebsite.com",
  "icon": "path/to/your/logo.png",
  "packageName": "com.yourcompany.app"
}

Configuration Options:

  • name: Your app's display name (shown on home screen) - Required
  • url: Your website URL (must be HTTPS) - Required
  • icon: Path to your logo/icon image (optional - will auto-detect if not provided)
  • packageName: Unique app identifier in reverse domain format - Required

Icon Auto-Detection:

If you don't specify an icon path, the tool will automatically search for common icon files in these locations:

  • Current directory: icon.png, logo.png, app-icon.png
  • assets/, public/, static/, images/, img/ folders
  • Supports: .png, .jpg, .jpeg, .svg formats

Generate Your App

npm run generate

Or directly:

node src/generate.js

This will:

  1. Auto-detect your icon or use the specified path
  2. Generate all required icon sizes (iOS, Android, web) in mobile-app/assets/
  3. Create splash screens
  4. Configure app settings in mobile-app/
  5. Set up the WebView wrapper

All generated files are placed in the mobile-app/ directory.

Test Your App

npm start

Then:

  • Scan the QR code with the Expo Go app on your phone
  • Test on iOS: Press i to open iOS simulator
  • Test on Android: Press a to open Android emulator

Building for Production

The project includes built-in scripts for building and submitting your app using Expo EAS (Expo Application Services).

First-Time Setup

  1. Create an Expo account at expo.dev
  2. Login via CLI:
npx eas-cli login
  1. Configure your project:
cd mobile-app
npx eas build:configure

Build Commands

From the project root, use these npm scripts:

Android Build:

npm run build:android

iOS Build:

npm run build:ios

Build Both Platforms:

npm run build:all

Production Build (with auto-increment):

npm run build:production

Submission Commands

After building, submit to app stores:

Submit to Google Play:

npm run submit:android

Submit to App Store:

npm run submit:ios

Submit to Both:

npm run submit:all

EAS Configuration

The mobile-app/eas.json file includes three build profiles:

  • development: For internal testing with development client
  • preview: For creating APK files for testing
  • production: For app store releases with auto-increment version

For detailed setup and store submission, follow the Expo EAS Build documentation.

Features

Built-in Capabilities

  • Full Website Functionality: All your website features work seamlessly
  • JavaScript Enabled: Interactive features, forms, and scripts work perfectly
  • Local Storage: User sessions and data persist across app launches
  • Native Performance: Optimized WebView with native app speed
  • Status Bar: Automatically styled for iOS and Android
  • Safe Areas: Respects device notches and home indicators
  • Responsive: Adapts to all screen sizes and orientations

Automatic Asset Generation

The tool automatically creates all assets in mobile-app/assets/:

  • App icons (1024x1024 for iOS and Android)
  • Adaptive icons for modern Android devices
  • Splash screens (2048x2048)
  • Favicons for web version (48x48)
  • Auto-detects icons from common locations
  • Creates placeholder icons if none found

Generated Files:

mobile-app/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ icon.png          (1024x1024 - iOS & Android)
β”‚   β”œβ”€β”€ adaptive-icon.png (1024x1024 - Android adaptive)
β”‚   β”œβ”€β”€ splash.png        (2048x2048 - Splash screen)
β”‚   └── favicon.png       (48x48 - Web favicon)
β”œβ”€β”€ App.js                (WebView wrapper)
β”œβ”€β”€ app.json              (Expo configuration)
β”œβ”€β”€ package.json          (Mobile app dependencies)
└── eas.json              (Build configuration)

SEO Benefits in Detail

App Store Optimization (ASO)

Having an app unlocks App Store Optimization, which works alongside your website SEO:

  1. Keyword Rankings: Rank for keywords in app stores
  2. Visual Search: Users discover apps through screenshots and icons
  3. Category Placement: Get listed in relevant app categories
  4. Ratings & Reviews: Social proof increases downloads
  5. Update Visibility: Regular updates show active development

Cross-Platform Authority

Search engines recognize brands with:

  • A website
  • An iOS app
  • An Android app
  • Consistent branding across all platforms

This multi-platform presence signals legitimacy and boosts your overall SEO.

Mobile-First Indexing

Google prioritizes mobile experiences. A native app:

  • Loads faster than mobile web
  • Provides better user experience
  • Reduces bounce rates
  • Increases session duration

All of these signals improve your website's SEO rankings.

Customer Discovery Benefits

Reach New Audiences

App Store Users:

  • 230+ billion app downloads annually
  • Users specifically browsing for solutions in app stores
  • High-intent users ready to engage

Referrals & Sharing:

  • "Download our app" is easier than "visit our website"
  • App links share cleanly on social media
  • Users share apps more frequently than websites

Offline Discovery:

  • App stays installed on home screen
  • No need to remember your URL
  • One-tap access increases usage

Brand Visibility

  • Home screen icon = 24/7 brand exposure
  • Push notifications (optional, can be added)
  • Badge notifications for updates
  • Native sharing capabilities

Customization

Modify the WebView Behavior

Edit mobile-app/App.js after generation to customize:

  • Loading states and progress indicators
  • Error handling and offline messages
  • Navigation behavior (back button, external links)
  • Custom HTTP headers
  • JavaScript injection scripts
  • User agent customization

Example customizations:

<WebView
  source={{ uri: 'https://yoursite.com' }}
  onLoadStart={() => console.log('Loading...')}
  onError={(syntheticEvent) => {
    const { nativeEvent } = syntheticEvent;
    console.warn('WebView error: ', nativeEvent);
  }}
  // Add custom headers
  injectedJavaScript={`
    // Custom JavaScript to run in the page
    console.log('Mobile app loaded');
  `}
/>

Change App Appearance

Edit mobile-app/app.json after generation to modify:

  • Splash screen background color
  • Status bar style (light/dark)
  • Orientation settings (portrait/landscape)
  • Platform-specific configurations
  • App name and slug

Modify Build Configuration

Edit mobile-app/eas.json to customize:

  • Build profiles (development, preview, production)
  • Auto-submit settings
  • Version management
  • Platform-specific build options

Common Use Cases

E-Commerce Stores

Convert your Shopify, WooCommerce, or custom store into an app for:

  • Push notifications for sales and promotions
  • Easy reordering from purchase history
  • One-tap checkout

SaaS Products

Give users a dedicated app for:

  • Professional appearance
  • Desktop-like experience on mobile
  • Better engagement metrics

Content Platforms

Blogs, news sites, and media companies benefit from:

  • Higher time-on-site
  • Push notifications for new content
  • Offline reading (with additional configuration)

Service Businesses

Restaurants, salons, gyms get:

  • Easy booking through the app
  • Loyalty program integration
  • Direct communication channel

Technical Details

Built With

Requirements

  • Website must use HTTPS
  • Website should be mobile-responsive
  • Modern browsers supported

Limitations

  • Apps must comply with App Store guidelines
  • Some web features may not work (e.g., browser extensions)
  • Camera/location require additional configuration

Project Structure

web2mobile/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ generate.js           # Main generation script
β”‚   β”œβ”€β”€ App.template.js       # WebView template
β”‚   β”œβ”€β”€ app.template.json     # Expo config template
β”‚   └── eas.template.json     # Build config template
β”œβ”€β”€ mobile-app/               # Generated app (created after running generate)
β”‚   β”œβ”€β”€ assets/              # Auto-generated icons
β”‚   β”œβ”€β”€ App.js               # Generated WebView wrapper
β”‚   β”œβ”€β”€ app.json             # Generated Expo config
β”‚   β”œβ”€β”€ package.json         # Mobile app dependencies
β”‚   └── eas.json             # Build configuration
β”œβ”€β”€ config.json              # Your app configuration
β”œβ”€β”€ package.json             # Build scripts & dependencies
└── README.md                # This file

Troubleshooting

Website Doesn't Load

  • Verify your URL is HTTPS (required for mobile apps)
  • Check if your website blocks iframes/embedding (some sites use X-Frame-Options)
  • Test the URL in a mobile browser first
  • Check CORS settings on your website

Icons Look Wrong

  • Provide a square image (1:1 aspect ratio works best)
  • Use PNG with transparent background for best results
  • Minimum 512x512px, recommended 1024x1024px or larger
  • The tool will auto-resize and center your icon

Build Fails

  • Ensure dependencies are installed: cd mobile-app && npm install
  • Check Node.js version (18+ required)
  • Verify your config.json is valid JSON
  • Make sure you're logged in to Expo: npx eas-cli login
  • Check the Expo EAS Build documentation

Icon Not Found

  • Verify the icon path in config.json is correct
  • Use relative paths from the project root
  • Supported formats: PNG, JPG, JPEG, SVG
  • Let the tool auto-detect by placing icon in common locations

Generation Errors

  • Ensure config.json exists with required fields: name, url, packageName
  • Check that Sharp can process your icon file
  • Verify write permissions for the mobile-app/ directory

Next Steps

  1. Test Thoroughly: Try all website features in the app
  2. Get Feedback: Share with beta testers before launching
  3. Prepare Store Listings: Create screenshots and descriptions
  4. Submit to Stores: Follow Apple and Google submission guidelines
  5. Market Your App: Promote on your website and social media

Resources

Support

For issues or questions:

  1. Check the troubleshooting section above
  2. Review Expo documentation
  3. Ensure your website works properly on mobile browsers first

License

MIT License - Feel free to use for personal or commercial projects


Ready to boost your SEO and reach millions of app store users? Generate your mobile app in the next 5 minutes.


PRs Welcome

Please star this repo for updates! 🌟


Source: packages/web2mobile-wrapper/README.md

Last updated on

On this page