wiki:DeveloperGuidelines/EdenMobile/ProductionRelease

Build for Release

  • Ensure the build is able to be run on the oldest devices possible (v6.0): platforms/android/project.properties
    # 6.0 Marshmallow
    target=android-23
    
  • Configure the default server, if-required: www/config/settings.js
    'url': {
            type: 'url',
            defaultValue: 'http://my.server.org/eden',
            writable: false,
    
  • @ToDo: Branding
  • create the non-debug APK
    cd eden_mobile
    cordova build --release android
    
  • File available as: platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk
  • Sign the app:
    • https://developer.android.com/studio/publish/app-signing.html
    • https://cordova.apache.org/docs/en/latest/guide/platforms/android/
      # Generate Private Key (just once, outside the eden_mobile folder)
      # keytool comes with your JRE, so may need to ensure it's bin directory is in your PATH
      keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
      # Optimise (zipalign comes with Android SDK build-tools, so may need to ensure it's in your PATH, e.g. %USERPROFILE%\AppData\local\android\sdk\build-tools\29.0.3)
      zipalign -v -p 4 app-release-unsigned.apk app-release-unsigned-aligned.apk
      # Sign (apksigner comes with Android SDK build-tools too)
      apksigner sign --ks my-release-key.jks --out app-release.apk app-release-unsigned-aligned.apk
      
Last modified 5 years ago Last modified on 02/01/20 11:40:19
Note: See TracWiki for help on using the wiki.