Skip to content

Publishing a new Funzo based app

Jay Larson edited this page Mar 31, 2017 · 22 revisions

Android

Prerequisites

  1. Create a Google developer account
  2. Create a developer key called funzo-app and store it in a .keystore file:
    KEYSTORE=/PATH/TO/MY.keystore
    keytool -genkey -v -keystore $KEYSTORE -alias funzo-app -keyalg RSA -keysize 2048 -validity 10000
    
  3. Install the Java JRE
  4. Install the Android developer tools (go here, then either install the full Android Studio IDE or scroll down to "Get just the command line tools")
  5. Run the Android SDK Manager (Android/tools/android) and install the following packages:
  • Android SDK Tools
  • Android SDK Platform Tools
  • Android 6.0 (API 23)
  • In the Extras category...
    • Android Support Repository
    • Google Repository
  1. Clone this repository and install its dependencies, following the instructions in README.md
  2. Create a copy of the template file in config/custom/ called config/custom/default.js
  3. Edit your default.js, and set all the variables to something appropriate for your app
  4. Set up the ability to build for android:
    cd funzo-app/cordova
    cordova platform add android
    

For each new release

Before you begin, make sure you have a copy of your keystore, and know the name and password of your key.

  1. Open a command-line terminal in your funzo-app directory
  2. Make the zipalign utility available to the build process by putting the android build tools in your PATH: (the following command assuming the Android directory is in your homedir)
    export PATH=$PATH:~/Android/build-tools/23.0.3
    
  3. Edit config/custom/default.js and increment the app.version value
  4. Build the app:
    ember build --environment=production
    
  5. And now package it for Android
    KEYSTORE=/PATH/TO/MY.keystore
    cd cordova
    cordova build android --release -- --keystore=$KEYSTORE --alias=funzo-app
    
  6. You should now see four .apk files when you run ls *.apk. You can delete the two that have unsigned in their names.
  7. Log into the Play Developer Console
  8. Select your app
  9. On the left menu, click APK
  10. Click the Upload new APK button
  11. Upload both of the signed APKs
  12. Select a publishing option
  13. Follow any other prompts you get, and soon your app should appear in the Play store!

iOS

Prerequisites

FIXME: These instructions are very rough and need work. For now, see the Cordova iOS docs and the Apple docs to which it links for details.

  1. Have a Mac (you cannot build iOS apps without OSX)
  2. Follow the instructions here to install Xcode and other requirements.
  3. Set up a requisite key and signing profile (FIXME: get detailed instructions)
  4. Clone this repository and install its dependencies, following the instructions in README.md
  5. Create a copy of the template file in config/custom/ called config/custom/default.js
  6. Edit your default.js, and set all the variables to something appropriate for your app

For each new release

Note: There's probably a better way to do this without having to use Xcode

  1. Run (cd cordova && cordova build ios)
  2. Open cordova/platforms/ios/YOUR_APP_NAME.xcodeproj in Xcode
  3. On the General tab, make sure Automatic Signing is checked, and your team is selected from the Team dropdown
  4. On the Build Settings tab, under Code Signing Identity, and make sure your teams key is selected for all items
  5. Select Product->Archive
  6. Follow the prompts to upload the build to the Apple store
Clone this wiki locally