Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Example testflight

SamYStudiO edited this page Oct 29, 2016 · 3 revisions

In addition to standard debug/release builds you may want to have a testflight build for ios, let's have a look on how to set up such a build type. Edit your build.gradle file with the following :

flair {
  packageName "com.hello.world"

  appId "dev.hello.world"
  appName "Hello World"
  appFullScreen true
  appAspectRatio "portrait"
  appAutoOrients false
  appDepthAndStencil false
  appDefaultSupportedLanguage "en"
  
  buildTypes {
    debug {
      debug true
    }
    release {
      appId "com.hello.world"
    }
  }

  ios {

    appVersionLabel "1.0.0"
	
    buildTypes {
      testflight {
        // tesflight requires a production signing
        packageTarget "ipa-app-store"
      }
      release {
        packageTarget "ipa-app-store"
      }
    }
  }

  android {
    appVersionLabel "1.0.0"
  }
}

After refreshing your gradle script and your project tree new testflight and ios_testflight folders should be visible under app/src/. Copy then your app/src/ios/app_descriptor.xml under testflight or ios_testflight folder. This doesn't matter which folder you are using since testflight build type has been adding to ios only. Edit then your new app xml with requirement for testflight

<Entitlements>
  <![CDATA[
  <key>get-task-allow</key>
  <false/>
  <key>beta-reports-active</key>
  <true/>]]>
</Entitlements>

You may then use packageIosTestflight task to get a IPA to upload to testflight.