Build native iOS, Android, and Web apps with Capacitor and Remix.run 💿

Overview

Capacitor Templates for Remix.run

This repository holds production ready Capacitor templates for building native mobile applications using Remix. Using Capacitor, you can quickly build out a native mobile application for iOS and Android using web technology, such as Remix.

Getting Started

Be sure to follow our getting started guide for Capacitor to setup your environment correctly. Once your environment is set up for mobile development, you can use degit to clone one of these Capacitor templates and start building your native app with Remi!

When developing, you can use vite just as you would for a standard web application. For these templates, you can run npm start to boot up the remix dev server with Hot Module Replacement (HMR). Once you are ready to test your app on mobile, you can use one of the following commands to build and run your native app on your mobile device.

iOS

npm run build
npx cap run ios

Android

npm run build
npx cap run android

Setting your server.url variable

Remix is a full-stack framework. Meaning that your application needs a backend server to properly run your Remix app. When testing your application locally, you'll need to set your server.url variable to a currently running server. You can start a remix dev server with npm start and then run npx cap run on a separate process to start your Capacitor application. If your backend server is not running, your Capacitor Remix app will not work properly. When deploying your application to the App Store, be sure to set your server.url variable to a hosted server and not the default http://localhost value.

note: The Capacitor + Remix dependencies are maintained via pnpm via pnpm up -Lri. This is the reason you see a pnpm-lock.yaml. That being said, any package manager will work. The pnpn-lock.yaml file can be safely be removed once you clone a template if you would like to use another package manager like npm or yarn.

Deploying to App Stores

Once you are ready to deploy your app, you can follow our guides building your native application for the Apple App Store or the Google Play Store.

Template List

To download one of these templates, you use the following the command:

npx degit ionic-team/capacitor-remix-templates/<template> my-project
cd my-project
npm install # or pnpm install or yarn install

The following templates are available for both JavaScript and TypeScript:

To use the TypeScript version of the template, add -ts to the end of the template

# Use "remix-app-server" with TypeScript support
npx degit ionic-team/capacitor-remix-templates/remix-app-server-ts my-project
cd my-project
npm install

I don't see a template that matches my need?

You wish there was a template with your favorite library?

Feel free to make a pull request. Copy one of the template already available, tweak it, name it properly and make a PR. See contributing below.

Contributing

This project is managed with pnpm. You should install it first to test out your template or contribute to an existing one.

You can create your own template and prefix it with ts- or js- and giving it a name that describe the purpose.

To update all dependencies you can run:

pnpm up -Lri

Community

You learn more about Capacitor on the Capacitor Website and come chat with us the Ionic Discord if you have any questions. For Remix questions, you can learn more on the Remix Website and join the Remix Discord

You might also like...
Xcode storyboards diff and merge tool.
Xcode storyboards diff and merge tool.

StoryboardMerge Storyboard diff and merge tool which: compares and merges two storyboard files, provides an automatic merge-facility, The storyboardin

swiftenv allows you to easily install, and switch between multiple versions of Swift.
swiftenv allows you to easily install, and switch between multiple versions of Swift.

Swift Version Manager swiftenv allows you to easily install, and switch between multiple versions of Swift. This project was heavily inspired by pyenv

An adorable little framework and command line tool for interacting with SourceKit.

SourceKitten An adorable little framework and command line tool for interacting with SourceKit. SourceKitten links and communicates with sourcekitd.fr

Elm-parcel-capacitor - A sample setup to build an app with Elm, Capacitor, Parcel and Tailwind CSS

Elm, Capacitor, Parcel and Tailwindcss This project is a sample setup to build a

Android/iOS Apps created to practice with different iOS/Android Tech. These apps were built to have similar feature sets using native Android/iOS.

AgilityFitTodayApp Android/iOS Apps created to practice with different iOS/Android Tech. These apps were built to have similar feature sets using nati

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri
Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri

Capacitor File Opener. The plugin is able to open a file given the mimeType and the file uri. This plugin is similar to cordova-plugin-file-opener2 without installation support.

⚡️ Capacitor plugin to register push notifications via Azure Notification Hub.
⚡️ Capacitor plugin to register push notifications via Azure Notification Hub.

Azure Notification Hubs @jonz94/capacitor-azure-notification-hubs Capacitor plugin to register push notifications via Azure Notification Hub. Install

Runtime Mobile Security (RMS) 📱🔥  - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime
Runtime Mobile Security (RMS) 📱🔥 - is a powerful web interface that helps you to manipulate Android and iOS Apps at Runtime

Runtime Mobile Security (RMS) 📱 🔥 by @mobilesecurity_ Runtime Mobile Security (RMS), powered by FRIDA, is a powerful web interface that helps you to

Switchboard - easy and super light weight A/B testing for your mobile iPhone or android app. This mobile A/B testing framework allows you with minimal servers to run large amounts of mobile users.

Switchboard - easy A/B testing for your mobile app What it does Switchboard is a simple way to remote control your mobile application even after you'v

React-native-photo-editor - Photo editor using native modules for iOS and Android
React-native-photo-editor - Photo editor using native modules for iOS and Android

🌄 Image editor using native modules for iOS and Android. Inherit from 2 available libraries, ZLImageEditor (iOS) and PhotoEditor (Android)

An Xcode 7 plugin to build and run an app across multiple iOS devices with one click.
An Xcode 7 plugin to build and run an app across multiple iOS devices with one click.

RunEverywhere Xcode Plugin Overview An Xcode 7 plugin to build and run an app across multiple iOS devices with one click. Gone are the days of manuall

Next generation iOS and Android apps for Mattermost in React Native

Mattermost Mobile Minimum Server versions: Current ESR version (5.37.0) Supported iOS versions: 11+ Supported Android versions: 7.0+ Mattermost is an

ShortWebCore - This iOS library lets you run automations on Web Views.

This iOS library lets you run automations on Web Views. Example (Optional) Declare class conforming to AutomationRunnerDelegate: import S

An executable that can be called from a Run Script Build Phase that makes comments such as // TODO: or // SERIOUS: appear in Xcode's Issue Navigator giving them project-wide visibility.

XcodeIssueGenerator An executable that can be called from a Run Script Build Phase that makes comments such as // TODO: or // SERIOUS: appear in Xcode

🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web
🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web

Matchimals.fun an animal matching puzzle card game 🦁 🃏 🍎 Download for iOS from the App Store 🤖 Download for Android from the Google Play Store 🖥

The Swift-est way to build native mobile apps that connect to Salesforce.
The Swift-est way to build native mobile apps that connect to Salesforce.

Swiftly Salesforce is the Swift-est way to build native mobile apps that connect to Salesforce: Written entirely in Swift. Very easy to install and up

Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.
Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.

scrcpy-mobile Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone. Currently only supports control

Run iOS apps & games on M1 Mac with mouse, keyboard and controller support.
Run iOS apps & games on M1 Mac with mouse, keyboard and controller support.

‎ PlayCover Run iOS apps & games on M1 Mac with mouse, keyboard and controller support. Showcase · Contribute · Discord About the fork & Disclaimer Th

Comments
  • Problems Running Template

    Problems Running Template

    Since there are no specific instructions provided on how to run this template other than change the directory and run npm install....

    That's what I did and this is the output I get when trying to run the application on device

    aaronksaunders@Aarons-14MacBookProM1Pro my-ionic-remix-app % ionic cap build 
    ? What platform would you like to build for? ios
    > npm run ionic:build
    
    > ionic:build
    > npm run build
    
    
    > build
    > remix build
    
    Building Remix app in production mode...
    Built in 154ms
    > capacitor sync ios
    [capacitor] [error] The web assets directory (./public/build) must contain an index.html file.
    [capacitor]         It will be the entry point for the web portion of the Capacitor app.
    [ERROR] An error occurred while running subprocess capacitor.
            
            capacitor sync ios exited with exit code 1.
            
            Re-running this command with the --verbose flag may provide more information.
    aaronksaunders@Aarons-14MacBookProM1Pro my-ionic-remix-app % 
    
    
    opened by aaronksaunders 6
  • Adding ionic framework

    Adding ionic framework

    Hi, It's a very good job! But I can't use ionic components

    How to reproduce :

    • run on node 18 (same error with 14)
    • install @ionic/react and ionicons
    • white a simple functional component :
    import { camera } from "ionicons/icons";
    import { IonContent, IonFab, IonFabButton, IonIcon } from "@ionic/react";
    
    export default function Index() {
      return (
        <IonContent>
          <IonFab vertical="bottom" horizontal="center" slot="fixed">
            <IonFabButton onClick={() => null}>
              <IonIcon icon={camera}></IonIcon>
            </IonFabButton>
          </IonFab>
        </IonContent>
      );
    }
    

    I got this error :

    /Users/jeremie/Documents/PROJETS/RD/remixIonic/node_modules/@ionic/core/components/index.js:4
    export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
    ^^^^^^
    
    SyntaxError: Unexpected token 'export'
        at Object.compileFunction (node:vm:353:18)
        at wrapSafe (node:internal/modules/cjs/loader:1040:15)
        at Module._compile (node:internal/modules/cjs/loader:1076:27)
        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
        at Module.load (node:internal/modules/cjs/loader:988:32)
        at Function.Module._load (node:internal/modules/cjs/loader:834:12)
        at Module.require (node:internal/modules/cjs/loader:1012:19)
        at require (node:internal/modules/cjs/helpers:102:18)
        at Object.<anonymous> (/Users/jeremie/Documents/PROJETS/RD/remixIonic/node_modules/@ionic/react/dist/index.js:6:20)
        at Module._compile (node:internal/modules/cjs/loader:1112:14)
    

    I have tested to add serverDependenciesToBundle: ["@ionic/core"], in remix.config.js but I don't have a better result.

    Have you an idea ?

    thx Jeremie.

    opened by jsellam 1
Owner
Ionic
Powerful tools and services for building cross-platform mobile apps
Ionic
Automatically build and rebuild Xcode image catalogs for app icons, universal images, and more

Better asset workflow for iOS developers. Generate Xcode image catalogs for iOS / OSX app icons, universal images, and more.

Dotan J. Nahum 822 Dec 21, 2022
Xcode-compatible build tool.

xcbuild xcbuild is an Xcode-compatible build tool with the goal of providing faster builds, better documentation of the build process and running on m

Meta Archive 2k Dec 11, 2022
Command line program that detects unused resource strings in an iOS or OS X application.

Abandoned Resource String Detection This command line program detects unused resource strings in an iOS or OS X application. Updated to Swift 3, thank

Josh Smith 360 Nov 26, 2022
Shows your current framerate (fps) in the status bar of your iOS app

WatchdogInspector Shows your current framerate (fps) in the status bar of your iOS app Be a good citizen! Don't block your main thread! WatchdogInspec

Christian Menschel 510 Nov 24, 2022
All new design. Inspect your iOS application at runtime.

Peek: All new design Peek 5 with an all new design and all new features. Whether you're a developer, designer or QA/tester, Peek can help you at all s

Shaps 2.6k Dec 17, 2022
An iOS app decrypter, full static using fouldecrypt.

Iridium An iOS app decrypter, full static using fouldecrypt. Supporting iOS 13+ Note We have built everything into the package, you can install and fl

Lakr Aream 234 Jan 9, 2023
An iOS app decrypter, full static using fouldecrypt.

Iridium An iOS app decrypter, full static using fouldecrypt. Supporting iOS 13+ Note We have built everything into the package, you can install and fl

Lakr Aream 226 Dec 24, 2022
AVXCAssets Generator takes path for your assets images and creates appiconset and imageset for you in just one click

AVXCAssets Generator Often while developing an app, We ran into a condition when we need to scale images to each and every aspect ratios for icons and

Angel Vasa 339 Dec 6, 2022
Swift CLI for strong-typing images, colors, storyboards, fonts and localizations

Shark Shark is a Swift command line tool that generates type safe enums for your images, colors, storyboards, fonts and localizations. Because Shark r

Kaan Dedeoglu 377 Dec 1, 2022
Strong typed, autocompleted resources like images, fonts and segues in Swift projects

R.swift Get strong typed, autocompleted resources like images, fonts and segues in Swift projects Why use this? It makes your code that uses resources

Mathijs Kadijk 8.9k Jan 6, 2023