Skip to content

almapp/uc-courses-mobile

Repository files navigation

UC Courses Mobile App

Build Status dependencies dev-dependencies

Multi-platform mobile app built with Ionic2, Angular2 and Typescript.

Client of almapp/uc-courses

AppStore PlayStore

Development

Clone this repository:

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

Dependencies

Make sure you have installed Ionic2, Cordova and Typescript's Typings:

npm install -g cordova ionic@beta typings

Project dependencies:

npm install

Setup API endpoint

By default, the application will try to connect to http://uc-courses.lopezjuri.com/api/v1. You can change this value by setting the API_URL environment variable.

export API_URL=http://your.url.com/api/v1

Run

To view both Android and iOS views on the browser:

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

See: http://ionicframework.com/docs/v2/getting-started/installation/#building-for-android

Installing new Cordova plugins

ionic plugin add <plugin name>

Releasing

Make sure to enable production mode as NODE_ENV.

export NODE_ENV=production

Then run:

npm run release

Or in one line:

NODE_ENV=production npm run release

Android

The Android .apk will be generated at platforms/android/build/outputs/apk/android-release-unsigned.apk. To sign it:

cd platforms/android/build/outputs/apk

# Generate keystore (if you don't have one)
keytool -genkey -v -keystore release.keystore -alias almapp -keyalg RSA -keysize 2048 -validity 10000

# Sign in
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release.keystore android-release-unsigned.apk almapp

# Build release .apk
rm app.apk; zipalign -v 4 android-release-unsigned.apk app.apk

The release .apk is located at: platforms/android/build/outputs/apk/app.apk and it's ready to be uploaded to the AppStore.

iOS

  1. Open platforms/ios/Cursos UC.xcodeproj with XCode.
  2. Select Cursos UC -> Generic iOS Device
  3. Go to Product -> Archive

The final product should appear on the Organizer.