A thin native app for persistent auth, app store presence and convenience.
Most views are provided by republik-frontend and rendered in a web view.
The logo (republik_logo.png) is property of its owner (Project R), and may not be reproduced without permission.
The source code is «BSD 3-clause» licensed.
Setup React Native for projects with native code.
Bootstrap your .env files:
cp .env.example .env.development
cp .env.example .env.staging
cp .env.example .env.production
If FRONTEND_BASE_URL
is changed you have to clear the babel loader cache:
rm -rf node_modules/.cache/babel-loader/*
The app is configured to be built on a Mac with Apple Silicon running MacOS Ventura.
For React Native dependencies see: Setting up the development environment
Tested software versions for building the app (the latest iOS build was created on 08.09.23 using these versions):
To build the current app via Terminal, the Terminal needs to run in Rosetta 2 (right click on the Terminal app in Finder and under "Get Info" select Rosetta 2).
Other Xcode, Node or macOS versions might cause build issues.
yarn
cd ios
pod install
Runs the app in a simulator and use localhost build of republik-frontend
with yaproxy for api.
in republik-frontend
:
npm run dev
npm run yaproxy
in app
:
yarn run ios
yarn run android
Optionally specify simulator: yarn run ios --simulator iPhone 11
Set a remote FRONTEND_BASE_URL
in .env.staging
and the run:
yarn run ios-staging
yarn run android-staging
The app is configured to responde to www.republik.ch
links.
You can test this in the iOS simulator by running following command:
xcrun simctl openurl booted "https://www.republik.ch/feed"
Testing with Android virtual devices:
adb shell am start -a android.intent.action.VIEW \
-c android.intent.category.BROWSABLE \
-d "https://www.republik.ch/feed"
On iOS you can drag the notification.apns
and notification-authorization.apns
file onto the simulator for testing.