Xcode 9.2 Archive fails due to missing iCloudContainerEnvironment in exportOptionsPlist

ios

#1

Bitrise Build Issue Report template

Description of the issue

My app uses iCloud and fails during the Xcode Archive step with the following error:
❌ error: exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided

Environment:

Where did the issue happen?

Xcode 9.2

Which build Step causes the issue and which version of the step?

xcode-archive, version: 2.4.5

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : always

#2

Ok, fixed this by providing a custom exportOptionsPlist. However, it would be nice if we could add single keys to the automatically generated exportOptions instead.


#3

Glad to hear you managed to solve the issue @matthias.buchetics! :slight_smile:

Can you please copy paste the related build’s bitrise.io URL? Without the config & logs it’s hard to tell what the issue was… I believe this should be possible, not 100% sure though, will ask around :slight_smile:


#4

Here is the build’s URL: https://www.bitrise.io/build/c4477f1d5d459e88


#5

Thanks @matthias.buchetics, we’ll check this ASAP! :slight_smile:


#6

This is a great idea!


#7

Could you point me in the right direction? I have the exact same issue but and I don’t know how to add the custom exportOptionsPlist. It seams that the latest version of Xcode Archive & Export for iOS does not have this option?


#8

Could you point me in the right direction? I have the exact same issue but and I don’t know how to add the custom exportOptionsPlist. It seams that the latest version of Xcode Archive & Export for iOS does not have this option?


#9

Here is the setting found in the latest version of the Export & Archive step. You can find the setting if you expand “Export Options (debug)”:

Not sure why it’s called “debug”.


#10

@matthias.buchetics we moved it into the (debug) section because too many users tried to set it when 1) it was easier to not set it / their use case did not require to set it 2) and even more importantly they set it to completely invalid or unrelated value (e.g. set only part of the plist or not even a plist).


#11

@viktorbenei any chance on implementing an option for adding single keys like @matthias.buchetics suggested?


#12

Sure @infinum , feel free to create a #feature-request for that! Please try to summarize what you’d need and how you’d solve it :thinking:


#13

FYI we ran into the same issue. :sob:


#14

Any chance you could post the contents of your plist file for others to reference in future? Thanks!