Cleanup
A wrapper around xcodebuild, agvtool, and other xcrun tools, built on top of Sh.
xcodebuild
agvtool
xcrun
For a full example app, please see https://github.com/FullQueueDeveloper/SwishExampleiOSProject
dependendies: [ .package(url: "https://github.com/FullQueueDeveloper/ShXcrun.git", from: "0.1.0") ]
Create an Xcodebuild object, with the parameters that you need, for example Xcodebuild(scheme: "MySceme") and then call a method on it.
Xcodebuild
Xcodebuild(scheme: "MySceme")
try Xcodebuild(scheme: "MySceme").test(.terminal)
To send the output to a log file
try Xcodebuild(scheme: "MySceme").test(.file("logs/test.log"))
Create an ExportOptionsPlist and call write to save it to a path on disk. exportArchive needs this path.
ExportOptionsPlist
write
exportArchive
Perhaps your script looks something like this.
let exportOptionsPath = "/tmp/exportOptions.plist" let plist = ExportOptionsPlist(distributionBundleIdentifier: "com.example.App") try plist.write(to: exportOptionsPath) let xcodeBuild = Xcodebuild(scheme: "MyScheme") try xcodeBuild.archive(.file("logs/archive.log"), path: "products") try xcodeBuild.exportArchive(.file("log/exportArchive.log"), archivePath: "products", exportPath: "products", exportOptionsPlistPath: exportOptionsPath)
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
ShXcrun
A wrapper around
xcodebuild
,agvtool
, and otherxcrun
tools, built on top of Sh.For a full example app, please see https://github.com/FullQueueDeveloper/SwishExampleiOSProject
Installation
Xcodebuild
Create an
Xcodebuild
object, with the parameters that you need, for exampleXcodebuild(scheme: "MySceme")
and then call a method on it.To send the output to a log file
ExportOptionsPlist
Create an
ExportOptionsPlist
and callwrite
to save it to a path on disk.exportArchive
needs this path.Perhaps your script looks something like this.