Multi-platform mobile app built with Ionic2, Angular2 and Typescript.
Client of almapp/uc-courses
Clone this repository:
git clone https://github.com/almapp/uc-courses-mobile.git
cd uc-courses-mobile
Make sure you have installed Ionic2, Cordova and Typescript's Typings:
npm install -g cordova ionic@beta typings
Project dependencies:
npm install
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
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
ionic plugin add <plugin name>
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
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.
- Open
platforms/ios/Cursos UC.xcodeproj
with XCode. - Select
Cursos UC -> Generic iOS Device
- Go to
Product -> Archive
The final product should appear on the Organizer
.