SO NASTY THAT ITS PROBABLY SOMEWHAT OF A TRAVESTY
bevy for iphone and android, using React Native
- OS X - This repo only contains the iOS (7+) implementation right now, and Xcode only runs on Mac.
- Xcode 6.3 or higher is recommended.
- Homebrew is the recommended way to install node, watchman, and flow.
brew install node.
New to node or npm?brew install watchman.
We recommend installing watchman, otherwise you might hit a node file watching bug.brew install flow.
If you want to use flow.
git clone git@github.com:kevtastic/bevy-mobile.git
- in the shell, naviagte to (your git folder)/bevy-mobile/
npm install
- open xcode
- In XCode, in the project navigator right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-icons
➜ios
and addReactNativeIcons.xcodeproj
- Add
libReactNativeIcons.a
(from 'Products' under ReactNativeIcons.xcodeproj) to your project'sBuild Phases
➜Link Binary With Libraries
phase - Run the project (
Cmd+R
)
- Download Android Studio
- Android Studio isn't completely necessary, we just need the android sdk. download it separately if you want to
- Download the Java JDK
- Download node.js (^v4.0.0)
- Mac OSX:
brew install node.
- Windows: nodist
- Linux: nvm
- If not using an emulator, enable developer mode on your device (go to settings and tap version 7 times)
- Add android-sdk/tools to path so we can use adb commands
- Run
android sdk
- Download the latest API version (SDK platform and Google APIs Intel x86_64 image are the only ones we need)
- Also Install (in Extras) Android Support Repository, Android Support Library, Google Repository, all the Google Play stuff, and Intel HAXM (need to run a separate installer)
- Install Genymotion here - we're not using the default emulator
- You need to create an account. Just use the free version for now
- Im currently using a virtual Nexus 5 w/ API 22
- Flash Genymotion with ARM translation and the Google APIs. Instructions here
- This allows us to use Google Login, and maybe some other neat stuff in the future. Right now the default emulators have crappy support for Google APIs and are usually outdated
git clone git@github.com:kevtastic/bevy-mobile.git
npm install
npm install -g react-native-cli
- Add the ANDROID_HOME path variable
- Linux:
export ANDROID_HOME="/home/[user]/Android/Sdk"
- Windows: path is probably at C:\Users[user].android\sdk
- in a separate terminal -
npm start
orreact-native start
react-native run-android
- This will build the app, install it, and run it on your virtual/physical device
- In the root of the project, run
./android-bundle.js
- This bundles and optimizes all the js into the index.android.bundle js file.
- If you can't execute the script, then run
chmod +x ./android-bundle.sh
to flip the executable flag
cd android
./gradlew assembleRelease
will give you a production APK (located in android/app/build/outputs/apk/app-release.apk)- IMPORTANT!! Test the release build on an emulator/physical device first with
./gradlew installRelease
DONT PUSH A BROKEN BUILD - Once you're sure it works, upload the app-release.apk to the Google Play Store