xcode 脚本打包报错 error: exportArchive: The data couldn’t be read because it isn’t in the correct format.

xcodebuild[47029:2402102] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/vs/n9h9vgh55xq1hmfry3n0_p9c0000gn/T/Chainup_2020-02-16_14-40-08.682.xcdistributionlogs'.
error: exportArchive: The data couldn’t be read because it isn’t in the correct format.

Error Domain=NSCocoaErrorDomain Code=3840 "No value." UserInfo={
     NSDebugDescription=No value., NSFilePath=/var/folders/vs/n9h9vgh55xq1hmfry3n0_p9c0000gn/T/ipatool-json-filepath-~~~SRY1mT}

** EXPORT FAILED **

解决方法:

  1. 打开报错信息的log日志,具体查看报错的内容,
2020-02-16 06:40:12 +0000  /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool:3800: warning: parentheses after method name is interpreted as an argument list, not a decomposed argument
2020-02-16 06:40:12 +0000  /Users/peng/.rvm/gems/ruby-2.6.1/gems/CFPropertyList-3.0.2/lib/cfpropertylist/rbCFPropertyList.rb:83: warning: assigned but unused variable - temp
2020-02-16 06:40:12 +0000  Ignoring executable-hooks-1.6.0 because its extensions are not built. Try: gem pristine executable-hooks --version 1.6.0
2020-02-16 06:40:12 +0000  Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0
2020-02-16 06:40:12 +0000  Ignoring unf_ext-0.0.7.6 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.6
2020-02-16 06:40:12 +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>'
2020-02-16 06:40:12 +0000 [MT] /Applications/Xcode.app/Contents/Developer/usr/bin/ipatool exited with 1
2020-02-16 06:40:12 +0000 [MT] ipatool JSON: (null)
  1. gem list | grep sqlite3 如果没有输出信息则说明确实少了sqlite3 这个文件。
  2. 执行 gem install sqlite3 --platform=ruby 安装,如果是已安装 则继续执行 rvm use system --default

你可能感兴趣的:(ios,xcode)