Sefaria-iOS
This repo contains the source code and export script to generate the content for Sefaria's iOS App AND Sefaria's Android App. The repo name is a historical holdover, but it includes code for both apps.
We're using React-Native, so much of the app is written in JavaScript and we deploy almost the same code to both Android and iOS. There are minor differences in native packages that we use and a small amount of native code we've written ourselves.
Getting Started
brew install node
brew install watchman
git clone https://github.com/Sefaria/Sefaria-iOS/
cd Sefaria-iOS
npm install
npm run setup
gem install cocoapods
cd ios
pod install
Put GoogleService-Info.plist
in the ios
directory. It's available from the Firebase console (or your friendly co-worker.)
This step can be skipped if just running for android. Skipping it for ios can get you in trouble though.
To build and start the simulator:
From the root of the repo, run react-native start
.
From another terminal, run react-native run-ios
Alternatively, you can open /ios/ReaderApp.xcworkspace
and hit run.
Local Development
It's quite natural to want to test the app against a local instance of Sefaria-Project. This can be done in 2 simple steps:
- Set
Api._baseHost
to the ip address that your local server is serving from (this has to be the actual ip address displayed by django, notlocalhost
). - From your home directory, navigate to
Android/Sdk/platform-tools
(or add toPATH
). Then execute./adb reverse tcp:8000 tcp:8000