Search Unity

Creating Appstoreinfo.plist From Ucb Using Gym File

Discussion in 'Unity Build Automation' started by tonemcbride, Apr 15, 2019.

  1. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Hi,

    I was looking to create builds on UCB that get uploaded to TestFlight from my Linux server. This is all working ok except for the upload part. Unfortunately ITMSTransporter for Linux needs an additional AppStoreInfo.plist file that can only be generated on a Mac or via xCode.

    To get it to generate in xCode I need to do this:

    1) Pass -exportOptionsPlist exportOptions.plist to xcodebuild

    2) In the exportOptions.plist I need to include the option <key>generateAppStoreInformation</key><true/>

    I understand I might be able to do this in the gym file but I'm not sure how.

    Would it work if my gym file looked like this?

    xcargs 'exportOptionsPlist exportOptions.plist'

    I'm not sure which directory to put the exportOptions.plist in, would that work if it was in the Assets folder root?

    Thanks!
     
  2. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
  3. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Hi @dannyd , thanks for the information - I didn't realise it was using fastlane so that should come in handy.

    I'd tried a gymfile with my 'exportOptionsPlist' but got this error:

    Code (CSharp):
    1. xcodebuild: error: The flag -exportArchive is requred when specifying -exportOptionsPlist
    I then tried to include -exportArchive but got this error:

    Code (CSharp):
    1. xcodebuild: error: The flag -scheme cannot be specified along with -exportArchive.
    Unfortunately the -scheme flag looks like it's part of your build system so I'm not sure how to get rid of that.

    FastLane appears to support uploading direct to TestFlight from within it's build system, is there any chance of that happening in UCB at some point in the future?
     
  4. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Fastlane is only used when building with Xcode 9 and above, so just wanted to double check you are targeting Xcode 9 or 10. And just in case that wasn't clear above - you shouldn't need to provide xcargs directly in the gym file, you can specify all of the options to build the export options plist directly in the gym file (as in the example from the first link).

    UCB actually supports running custom user-defined lanes before or after the UCB fastlane steps, so theoretically uploading to Testflight would work but I haven't tested that setup personally.

    Also, if you can't track down how to address this build issue, feel free to PM me your project details so I can look at it more closely.
     
  5. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,089
    Thanks, that sounds good - we're targeting the latest xCode so that shouldn't be a problem. I've not used fastlane much so I'll read up on that and possibly PM you next week at some point. I'd be happy to continue with my current setup (I have a server that downloads the completed UCB build and tries to upload it using ITMSTransporter) but I'd need to get the build to produce the additional plist data that Apple seems to require when validating the build. I currently sign the UCB builds with an 'app store' production provisioning profile which means they're valid for TestFlight but not for testing through the dashboard.

    XCode 10 seems to have an automatic upload option but apparently it needs the iTunes username/password set in the xCode preferences file. (https://heartbeat.fritz.ai/full-sta...odebuild-and-exportoptions-plist-28c48620593c)

    Fastlane users seem to be having the same issue as I am and have posted a bug here: https://github.com/fastlane/fastlane/issues/14349

    Thanks again.