I am trying to build an React Native app (iOS), but after I upgraded xcode and the OS to macOS Monterey I am getting this error when generating a release build. ARCHIVE SUCCEEDED but EXPORT FAILED (xcarchive is malformed).
/usr/bin/xcrun /usr/local/Cellar/fastlane/2.199.0/libexec/gems/fastlane-2.199.0/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/6s/9trt3rz94_bgpf2w8_k_0zt40000gn/T/gym_config20211227-97499-7urexl.plist' -archivePath /Users/ec2-user/Library/Developer/Xcode/Archives/2021-12-27/Paydentity\ 2021-12-27\ 23.35.08.xcarchive -exportPath '/var/folders/6s/9trt3rz94_bgpf2w8_k_0zt40000gn/T/gym_output20211227-97499-hv6qr1' [0m
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/6s/9trt3rz94_bgpf2w8_k_0zt40000gn/T/gym_config20211227-97499-7urexl.plist -archivePath '/Users/ec2-user/Library/Developer/Xcode/Archives/2021-12-27/Paydentity 2021-12-27 23.35.08.xcarchive' -exportPath /var/folders/6s/9trt3rz94_bgpf2w8_k_0zt40000gn/T/gym_output20211227-97499-hv6qr1
error: archive at path '/Users/ec2-user/Library/Developer/Xcode/Archives/2021-12-27/Paydentity 2021-12-27 23.35.08.xcarchive' is malformed
** EXPORT FAILED **
[23:50:42]: [31mExit status: 65[0m
[23:50:42]: ▸ [35m/Users/ec2-user/.jenkins/workspace/Mobile-App-Staging/paydentity-digital-wallet-ios-stage/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'RNSentry' from project 'Pods')[0m
[23:50:42]: ▸ [35m/Users/ec2-user/.jenkins/workspace/Mobile-App-Staging/paydentity-digital-wallet-ios-stage/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'RNFastImage' from project 'Pods')[0m
[23:50:42]: ▸ [35m/Users/ec2-user/.jenkins/workspace/Mobile-App-Staging/paydentity-digital-wallet-ios-stage/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'react-native-splash-screen' from project 'Pods')[0m
[23:50:42]: ▸ [35m/Users/ec2-user/.jenkins/workspace/Mobile-App-Staging/paydentity-digital-wallet-ios-stage/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'BVLinearGradient' from project 'Pods')[0m
[23:50:42]: ▸ [35m** ARCHIVE SUCCEEDED **[0m
Anyone have an ideia on how to debug this in a better way? I tried everything I saw on the forums but I could not solve this so far. Thanks.