Xcode 13.2.1 Exporting Archive for Development team with "Distribute App" fails
Xcode 13.1 – works on the same MacBook to export IPA for development distribution. No errors!!
Xcode13.2.1 "Validate App" is successful, Error "The data couldn’t be read because it isn’t in the correct format." occurs only with the distribution.
Error: The data couldn’t be read because it isn’t in the correct format.
From the standard log:
2022-02-16 00:42:46 +0000 ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
2022-02-16 00:42:46 +0000 /Users/dev.d/.gem/ruby/2.6.3/gems/CFPropertyList-3.0.3/lib/cfpropertylist/rbCFPropertyList.rb:83: warning: assigned but unused variable - temp
2022-02-16 00:42:46 +0000 Ignoring ffi-1.14.2 because its extensions are not built. Try: gem pristine ffi --version 1.14.2
2022-02-16 00:42:46 +0000 Ignoring json-2.5.1 because its extensions are not built. Try: gem pristine json --version 2.5.1
2022-02-16 00:42:46 +0000 Ignoring json-1.8.6 because its extensions are not built. Try: gem pristine json --version 1.8.6
2022-02-16 00:42:46 +0000 Ignoring nokogiri-1.10.3 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.3
2022-02-16 00:42:46 +0000 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- sqlite3 (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:24:in `<main>'
2022-02-16 00:42:46 +0000 /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 1
2022-02-16 00:42:46 +0000 ipatool JSON: (null)
6
Answers
I had a similar issue, but for me it was because I forgot to change the bundle identifier when I deployed my app on an Iphone. In my case, it was due to signing.
If thats also the case for you, I think you can try something like this :
Another thing you can try if things like that happen is :
I hope this will help you with your issue.
Go to Xcode folder > right click open Get Info > make sure open using Rosetta has been checked
don’t forget quit Xcode then open it
for this you have to open your xCode without rosetta this solve my problem..
In my case I got the error only when I open Xcode with the capacitor cli (
npx cap open ios
). I can create a distribution by opening Xcode with Spotlight.In my case Distribute development certificate was expired!
So I created another one and then restarted the XCode.
That solved my problem.
I also have faced this issue using M1 chip.
Following steps resolved the issue:
Then you will be able to upload your archive.