moisestech / artpost-react-native

Artpost React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Artpost

A simple grocery list app using React Native, Redux, Firebase, and Async Storage for offline data. It works on both iOS and Android.

Code Climate Dependency Status MIT License

demo

Install

Built and tested with:

  • OSX
  • Node 4.2.3 with npm 3
  • Xcode 7
  • Android SDK

A Firebase account is also needed.

Run:

git clone https://github.com/bruz/react-native-redux-artpost.git artpost
cd artpost
npm install

Configure:

cp config.js.example config.js

Edit config.js to have the URL of your Firebase app.

Develop on iOS

open ios/Artpost.xcodeproj

This will launch Xcode. Just choose a device a press run.

Develop on Android

react-native run-android

Build and install on an iOS device

  • Run:
react-native bundle --dev false --entry-file index.ios.js --platform ios --minify --bundle-output ios/main.jsbundle
  • In AppDelegate.m, comment out:
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
  • Then uncomment this in AppDelegate.m:
//jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  • In the Xcode menu, go to Product -> Scheme -> Edit Scheme..., and under Run change the Build Configuration to Release.
  • Choose your device in Xcode and run it on there.

To get back to development mode, just undo these changes.

Build and install on an Android device

It hasn't been testing with this app, but the React Native APK signing instructions may work.

Credits

Grocery bag icon by Claire Jones from the Noun Project

About

Artpost React Native

License:MIT License


Languages

Language:JavaScript 73.3%Language:Objective-C 18.0%Language:Python 4.9%Language:Java 3.6%Language:Shell 0.2%