Skip to content

kilazi/ionic3-starter-app

Repository files navigation

Tech:

Ionic 3 + Ion2 FullApp Template + built with rxJS style

Building instructions:

  1. git clone

  2. npm i

  3. dev mode:

    1. in browser:

      1. ionic serve

    2. android:

      1. connect device in data transfer mode

      2. enable developer’s mode and USB debugging

      3. ionic run android --device -l -c

      4. open google chrome dev tools chrome://inspect, find the device/app, enjoy

    3. ios

      1. ionic run ios -l --device

      2. connect device with data transfer cable

      3. enable developers mode on device

      4. open project in xCode

      5. choose phone from dropdown, run project on your phone

      6. you will see console logs in xCode (mention you might want to JSON.stringify all the data you show in console, cant stringify errors though)

  4. production

    1. ionic build ios --release

      1. open in xcode

      2. you might need to modify version in “General” tab and Camera and Library usage on “Info” tab

      3. connect your ios device

      4. Go Product -> Archive (if “Archive” is grey problem might be in the device which is not connected or with provisioning profiles and teams)

      5. Open Window -> Organizer, you can see versions there (its important that every new version is higher then previous one)

      6. Choose version, click “Upload” button on the right

      7. Click “OK” and “Continue” etc. there might be an error while uploading, 2 things might help:

        1. unchecking and checking the team profile on “General” tab

        2. “restarting” the profile inside the popup window if “continue” button is grey

      8. go to itunesconnect, testflight versions, it will ask you a question about the encryption, just choose no - app is published to testflight

      9. to publish it into production go to production page, delete old version and choose new one, save

    2. ionic android build --release (instructions can be also found here: http://ionicframework.com/docs/v1/guide/publishing.html)

      1. sit in root of the application

      2. keytool -genkey -v -keystore bt.keystore -alias bt -keyalg RSA -keysize 2048 -validity 10000 ← you do this only once. dont lose the password it will prompt you to create

      3. jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore bt.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk bt ./platforms/android/build/outputs/apk/android-release-unsigned.apk bt ← thats basically the address which ionic build

      4. zipalign -v ./platforms/android/build/outputs/apk/android-release-unsigned.apk bt.apk

      5. ~/Library/Android/sdk/build-tools/VERSION_OF_YOUR_SDK_HERE/zipalign -v 4 ./platforms/android/build/outputs/apk/android-release-unsigned.apk bt.apk

      6. grab bt-release.apk, go to android developer’s console, go into Versions and upload new one

Things to mention when building:

  1. common/environment.ts holds connectivity info: API version and IP of a server

  2. you might need to use ionic proxy to develop on devices with live reload or CORS plugin to develop in browser mode

  3. if you want to develop on device with livereload, you will want to configure proxy. do so by adding this: "proxies": [ { "path": "/API", "proxyUrl": "YOUR_SERVER_ADDRESS" } ], into ionic-config.json. then you might want to configure the environment.ts file so that if "cordova" is detected (means livereload while you develop) it would go through proxy, otherwise (in browser) - straight to the server.
    while developing in browser you probably want to use one of the CORS plugins to avoid issues

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published