Giter Site home page Giter Site logo

sergiojorge / audius-mobile-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from audiusproject/audius-mobile-client

0.0 1.0 0.0 18.54 MB

The Audius React Native Mobile Client

License: Other

JavaScript 1.16% TypeScript 90.13% Ruby 3.09% Starlark 0.22% Java 1.28% Objective-C 3.99% C 0.04% Swift 0.08%

audius-mobile-client's Introduction

Audius Mobile Client

The Audius React Native mobile client.

This project is a React Native wrapper around the Audius web client, and requires a web client to be running. The native project can be built & run against a local client (serving at localhost) or against a vendored staging/production build.

Setup

Copy the environment variables and replace missing values. (You will need an FCM sender id as well as a Segment write key for those services to work properly, but any value will suffice if the data is not important to you.)

cp .env.dev.tmpl .env.dev
cp .env.stage.tmpl .env.stage
cp .env.prod.tmpl .env.prod

iOS

# install cocoapods
sudo gem install cocoapods
# install local dependencies
npm install

cd ios
pod install
cd ..

# Create main.jsbundle
npm run bundle:ios

Android

# install local dependencies
npm install

Running against localhost

To run against localhost, specify URL_OVERRIDE in the .env file you intend to use.

URL_OVERRIDE=http://localhost:3001

The WebView will be pointed at the url contained in URL_OVERRIDE

This URL should be a serving a mobile audius-client with either

npm run start:mobile-stage or npm run start:mobile-prod

Running against a local static build

To run against a local staging or production build, build the client and copy the build into the mobile client:

# staging

# audius-client
npm run build:mobile-stage

# audius-mobile-client
npm run copy:local-staging

# production

# audius-client
npm run build:mobile-prod

# audius-mobile-client
npm run copy:local-production

Running against a remote static build

To run against a remote staging or production build, pull a the latest dapp from s3:

Make sure you have s3 creds set up and the aws cli installed.

# staging
npm run copy:remote-staging

# production
npm run copy:remote-production

iOS

# Run a simulator using a prod configuration
npm run ios
# Run a simulator using a stage configuration
npm run ios:bounce
# Run a simulator using a dev configuration
npm run ios:dev

# Run the app on a device
npm run ios:device "Raymond's iPhone"
# To see available devices
xcrun xctrace list devices

Android

# Run a simulator using a prod configuration
npm run android
# Run a simulator using a stage configuration
npm run android:bounce
# Run a simulator using a dev configuration
npm run android:dev

# Look at android devices
adb devices
# Connect device to dev server
adb -s <device name> reverse tcp:8081 tcp:8081
# If connecting to localhost, set up port forwarding
adb -s <device name> reverse tcp:3001 tcp:3001
# Run on device
npm run android

If you run into issues, try cleaning the android build folder

cd android && ./gradlew clean && cd ..

Debugging

  • To debug the native-layer of the app, install React Native Debugger and enable debugging (Cmd + D) in the simulator.
  • Safari can also be used to debug against the WebView running the dapp. This can be seen by opening Safari > Develop > Device > Localhost.

On Android, you can use the adb Android Studio tool or

# Show device logs
adb logcat '*:V'

Helpful

  • Sometimes the simulator app code won't update. You should disable caching in settings/Network of React Native Debugger.
  • If you feel like debugging the actual static app contained in the build, you can:
npm install -g serve --user
serve -s web-app/Web.bundle/build -p 9000

audius-mobile-client's People

Contributors

jowlee avatar kyle-shanks avatar piazzatron avatar raymondjacobson avatar sddioulde avatar sliptype avatar

Watchers

 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.