ios-xcodebuild 的打包使用

使用背景条件

  • Xcode Version 11.4 (11E146)
  • Build version 11E146
  • 工程项目为 xxx.workspace

CleanProject

  • 命令
xcodebuild clean -workspace   -scheme  -configuration 
  • 例子
xcodebuild clean -workspace /Users/eric/ClientRemote/xxx-ios/xxx.xcworkspace  -scheme xxx -configuration Release

Archive 过程

  • archive 的方法
workspace 工程:
xcodebuild archive -workspace /Users/eric/ClientRemote/xxx-ios/xxx.xcworkspace -scheme xxx -archivePath ~/Desktop/archive/archivearchive
project 工程:
xcodebuild archive -project <. xcodeproj_path> -scheme  -archivePath 
  • 使用报错
** ARCHIVE FAILED **


The following build commands failed:
	CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
	CompileSwift normal armv7

** 问题解决方法 **
希望有人可以帮忙回答我的问题,有结果我也会及时更新

打包 ipa 命令

xcodebuild -exportArchive -exportOptionsPlist "./ExportOptions.plist" -archivePath "~/Desktop/archive/archivearchive.xcarchive" -exportPath "~/Desktop/abc.ipa"

文件夹目录

  • ExportOptions.plist 文件可以在手动打包后的文件目录中获取上图 abc.ipa 文件夹中也有相同的问题件

你可能感兴趣的:(iOS)