Skip to content

almapp/uc-maps-mobile

Repository files navigation

UC Maps Mobile App

Build Status dependencies dev-dependencies

Multi-platform mobile app built with React Native.

Client of almapp/uc-maps

AppStore PlayStore

Development

Clone this repository:

git clone https://github.com/almapp/uc-maps-mobile.git
cd uc-maps-mobile

Dependencies

Make sure you have installed react-native-cli and rnpm:

npm install -g react-native-cli rnpm

Project dependencies:

npm install

API Keys

To run on Android, first you need a valid Google Maps API Key. Then put it in android/app/src/main/AndroidManifest.xml:

<meta-data
  android:name="com.google.android.geo.API_KEY"
  android:value="API_KEY"/>

The current API KEY only works on signed com.almapp.ucmaps apps.

Run

Start the development server with:

npm start

To run on an Android device, first you need the Android SDK and allow development options on the device. Then:

npm run android

To run on an iOS emulator:

npm run ios

Releasing

Follow this steps to publish the app:

Android

https://facebook.github.io/react-native/docs/signed-apk-android.html

Set the API KEY and then run:

cd android
./gradlew assembleRelease

Test on device with:

./gradlew installRelease

The signed .apk is located in:

app/build/outputs/apk/app-release.apk

iOS

  1. Open ios/UCMaps.xcodeproj with XCode.
  2. Uncomment jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  3. Select Generic iOS Device
  4. Go to Product -> Archive

The final file should appear on the Organizer.