Can't generate Enterprise or Ad-hoc distribution with new MBPro M1

Hi,

I'm trying to generate an Enterprise or Ad-hoc distribution package in XCode 12.4 installed in a new Macbook PRO 13" with the new M1.

After successfully archiving the app, selecting "Enterprise Distribution" I get a "The data couldn’t be read because it isn’t in the correct format." error just after verifying the signature.

This is the error log


2021-04-05 11:23:34 +0000 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require': dlopen(/Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle - /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date_core.bundle (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 /Library/Ruby/Gems/2.6.0/gems/date-3.1.1/lib/date.rb:4:in <top (required)>' 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 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' from /Library/Ruby/Gems/2.6.0/gems/CFPropertyList-3.0.3/lib/cfpropertylist/rbCFPropertyList.rb:4:in <top (required)>'
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 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require'
from /Library/Ruby/Gems/2.6.0/gems/CFPropertyList-3.0.3/lib/cfpropertylist.rb:3:in <top (required)>' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in rescue in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in require'
from /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:15:in <main>' /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 -- cfpropertylist (LoadError

It works as expected in an Intel MBPro with the same Xcode version.

Any help to address this issue?

The error os cause by missing compatible architecture. This can happen due to Cocoapods or any other tool which does not run natively. Here is how you can resolve this issue.

  1. Quit Xcode
  2. Go to Applications folder and right click Xcode and click Get Info.
  3. Check "Open using Rosetta"
  4. Launch Xcode again and archive/ build.
Can't generate Enterprise or Ad-hoc distribution with new MBPro M1
 
 
Q