I have this Plugin
struct Main: BuildToolPlugin {
func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] {
let inputFolder = target.directory.appending("Image")
let output = context.pluginWorkDirectory.appending("GeneratedImageAssets.swift")
return [
.buildCommand(
displayName: "Running ImageAssets parser",
executable: try context.tool(named: "ImageAssetsParser").path,
arguments: [inputFolder.string, output.string],
environment: [:],
inputFiles: [inputFolder],
outputFiles: [output]
)
]
}
}
ImageAssetsParser
is an executableTarget
in swift code that scan folders and write them in the output
folder sent by the plugin.
Although locally it works everything, on Xcode Cloud I got permission error:
The weird things is that I have also a prebuildCommand
plugin that uses swiftgen
, as an artifactbundle
and it works properly, it writes in same folder.
Am I missing something?