Coder Social home page Coder Social logo

animalparty-mobile's Introduction

Animal Party!

Animal Party! is a chat app that connects members of opposite U.S. political parties.

  • Choose your political leaning: Democrat or Republican
  • Get paired with someone from the opposite party
  • Message each other in an anonymous, one-on-one chat room
  • Leave conversations or join other ones whenever you want

Animal Party! was developed for Android & iOS in 2018 by Anshuman Dewangan and Vinit Parikh. The code is free for everyone to view, reuse, and evolve. If you do use the code in your own projects, attribution to Anshuman & Vinit would be appreciated.

Alt

animalparty-mobile

Repository for Animal Party's Android & iOS front-end using React Native. Also see animalparty-api.

Setup

Setup - General

  1. Clone repository
git clone https://github.com/anshuman64/animalparty-mobile.git
cd animalparty-mobile
  1. Install modules
npm install
  1. Fix mime-types module
open ./node_modules/mime-types/index.js

Edit var extname = require('path').extname to:

const extname = (path) => {
   if (!path || path.indexOf('.') === -1) { return '' }
   path = '.' + path.split('.').pop().toLowerCase()
   return /.*(\..*)/g.exec(path)[1] || ''
}
  1. Fix react-native-video-player
open ./node_modules/react-native-video-player/index.js

Replace contents with this file: https://drive.google.com/file/d/1-99De6dgEY4WnHhBvfqVrp5ktRA5a6wg/view?usp=sharing

  1. Replace files with secret keys (ask anshuman64):
ios/Insiya/GoogleService-Info.plist

Setup - Android

  1. Add animalparty-android.keystore (ask anshuman64) to /android/app directory

Setup - iOS

  1. Install Pods
cd ios && pod install && cd ..
  1. Fix search header for RCTBridgeModule.h
open ./node_modules/react-native/React/Base/RCTBridgeModule.h

Edit #import <React/RCTDefines.h> to #import "RCTDefines.h"

  1. Open XCode application
  2. File > Open > $ANIMALPARTY-MOBILE/ios
  3. Click on "Pods" in left panel
  4. Select "react-native-amplitude-analytics" from the dropdown at the top
  5. Click on "Header Search Paths"
  6. Add "$(PODS_ROOT)/../../node_modules/react-native/React/"
  7. Set as "Recursive"

Release

Release - General

  1. Comment all logging "console.", "debugger", and "Debug Test" lines
  2. ENV_SETTING = ENV_TYPES.PRODUCTION in app_config.js
  3. LoadingScreen inital={true} in App.js
  4. Run the app on iOS simulator with these settings and log in with your phone number. Make sure everything works.

CodePush Release

  1. Make sure you follow the steps under "Release - General"!
  2. Android
appcenter codepush release-react -a AnimalParty/AnimalParty-Android -d Production
  1. iOS
appcenter codepush release-react -a AnimalParty/AnimalParty-iOS -d Production

Note: Add option ---mandatory if the update should cause the app to refresh on start

Full Release - Android

  1. Make sure you follow the steps under "Release - General"!
  2. Increment versionCode and versionName in android > app > build.gradle
  3. Generate signed release APK
cd android && ./gradlew assembleRelease && cd ..
  1. Search for "app-release.apk" in animalparty-mobile/android/app/build/outputs/apk/release/app-release.apk and drag into Google Play Console

Note: If you want to test the signed release APK, run react-native run-android --variant=release

Full Release - iOS

  1. Make sure you follow the steps under "Release - General"!
  2. Increment Version and Build in XCode
  3. Set build target to "Generic iOS Device"
  4. Run Product > Archive

Post-Release

  1. Assuming you were on "master" branch:
git checkout stable
git merge master
git tag vX.Y.Z
git push
git push origin vX.Y.Z
git checkout master

Change CodePush Deployment Key

  1. Android
open ./android/app/src/res/values/strings.xml

Change "reactNativeCodePush_androidDeploymentKey" from Staging 0wdFZMRaBt_InRdAh5wxwr0fjqHhHkRQlzrRf to Production ####################

  1. iOS
open ./ios/AnimalParty/Info.plist

Change "CodePushDeploymentKey" from Staging W5sHjCByju5UuUQ3Y1jY8EIhByDVrJOBlfH0z to Production ####################

animalparty-mobile's People

Contributors

anshuman64 avatar bardiaalavi-2020 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.