iOS: error: exportArchive: exportOptionsPlist

Hi, I build my app the last time without problems for iOS.
Now I’m facing this error:

xcodebuild[19008:3386282] DTDeviceKit: deviceType from 65c0bbd09c1893a33a8ebe10f8 was NULL

error: exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided

Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided}

My ionic info

Ionic:

   Ionic CLI          : 5.4.2 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 4.1.0, (and 17 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.8 (update available: 0.2.9)

System:

   ios-deploy : 1.9.2
   ios-sim    : 8.0.2
   NodeJS     : v10.16.3 (/usr/local/bin/node)
   npm        : 6.10.2
   OS         : macOS Catalina
   Xcode      : Xcode 11.1 Build version 11A1027

Does anybody know what to do now?

Hey basti, got stuck into this as well. I wrote an article about how to solve the error: https://medium.com/@michele.patrassi/https-medium-com-michele-patrassi-add-icloud-icloudcontainerenvironment-to-your-ionic-ios-app-227300bf8896

I think you’re close, so all you need to do it this: ionic cordova build ios --prod --release – --iCloudContainerEnvironment=Production