This example includes web, iOS and Android projects to test with while developing and evaluating Capacitor Native Navigation.
nvm use
pnpm install
pnpm startThen navigate to the URL displayed.
Prerequisites:
rbenvfor managing Ruby versions
Setup the iOS toolchain using Ruby and bundler to install Cocoapods:
cd ios
gem install bundler
bundle install
cd ..From time to time we can update the iOS toolchain to the latest versions:
cd ios
bundle update
cd ..Update the iOS (and Android) project with the latest plugin code, expecting to connect to a dev server running on your local machine:
nvm use
pnpm cap:localThis script configures the iOS app to use the example app's web code by connecting directly to vite. You can see that by inspecting
the server.url property in ios/App/App/capacitor.config.json. So we also need to run vite and bind it to the LAN interface
(otherwise the app will fail with a "Failed to load page content" fatal error):
pnpm start:hostOpen the iOS project; build and run the app:
open ios/App/App.xcworkspaceOpen the Android folder in Android Studio; build and run the app. Or compile on the command-line:
cd android
gradle bundleChanges in the example app's web code should cause the app to automatically refresh.
To setup the app to run with built-in web code (not using a local development server):
pnpm exec cap sync