Skip to content

YishaiGlasner/Sefaria-Mobile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sefaria-Mobile

This repo contains the source code and export script to generate the content for Sefaria's iOS App AND Sefaria's Android App.

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.

If you haven't already done so, install React Native for your development environment using the React Native CLI Quickstart. Follow the instructions on the "React Native CLI Quickstart" tab (not "Expo CLI Quickstart") for your operating system. You should follow the instructions for both iOS and Android. Skip the "Creating a new application" section since you'll be using this repo as the project.

Getting Started

brew install node
brew install watchman
git clone https://github.com/Sefaria/Sefaria-iOS/
cd Sefaria-iOS                          
npm install
npm run setup
brew install cocoapods
cd ios
pod install

Google service file from Firebase

Firebase requires that you download the Google service files for Android and iOS to make Firebase work. These aren't included in the repo since they are private. For Sefaria employees, you can access these files from the Firebase Project Settings. If you don't have access to Firebase, please reach out to your friendly coworker :).

Put GoogleService-Info.plist in the ios directory. Put google-services.json in the android/app directory.

Build and run

To build and start the simulator:

From the root of the repo, run react-native start.
From another terminal, run react-native run-ios or react-native run-android

Alternatively for iOS, you can open /ios/ReaderApp.xcworkspace and hit run.

Local Development

Connect Simulator to Local Django Server

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:

  1. 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, not localhost).
  2. From your home directory, navigate to Android/Sdk/platform-tools (or add to PATH). Then execute ./adb reverse tcp:8000 tcp:8000

Simulate Deep Linking

To simulate deep linking, use these commands in your terminal

For Android:

adb shell am start -W -a android.intent.action.VIEW -d "<INSERT_URL_HERE>" org.sefaria.sefaria

For iOS:

xcrun simctl openurl booted <INSERT_URL_HERE>

License

GPL

About

Sefaria for iOS and Android

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.9%
  • Ruby 1.4%
  • Objective-C 0.6%
  • Java 0.6%
  • Shell 0.4%
  • Starlark 0.1%