efraimbart / Sefaria-Mobile

Sefaria for iOS and Android

Home Page:http://www.sefaria.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  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

About

Sefaria for iOS and Android

http://www.sefaria.org


Languages

Language:JavaScript 96.9%Language:Ruby 1.4%Language:Objective-C 0.6%Language:Java 0.6%Language:Shell 0.4%Language:Starlark 0.1%Language:Swift 0.0%Language:C 0.0%