Xcode 9.2 Archive fails due to missing iCloudContainerEnvironment in exportOptionsPlist

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 Likes

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 Likes

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:

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

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

This is a great idea!

1 Like

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?

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?

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”.

@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).

1 Like

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

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:

FYI we ran into the same issue. :sob:

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

2 Likes