Post

Replies

Boosts

Views

Activity

Swift build tool plugin unable to write to pluginWorkDirectory using Xcode Cloud
I have created a Swift package build tool plugin for colour generation. The plugin takes two input files from a project or swift package and from them generates a new Swift file containing references to all of the generated UIColors. When building locally and when using Github Actions the plugin is able to generate the required file within the pluginWorkDirectory and the project that references it can then access it as an input file during its build process. However, when building my project using Xcode Cloud, the plugin appears to be unable to create the file, it fails with the following error: Error while generating colours Files encountered an error at '/Volumes/workspace/DerivedData/SourcePackages/plugins/GLA.output/GLA/ColorGeneratorPlugin/GeneratedColors/Colors.swift'. 2022-11-22T15:46:11.344345498Z Reason: fileCreationFailed 2022-11-22T15:46:11.344390826Z LLVM Profile Error: Failed to write file "default.profraw": Operation not permitted` This then means that the build of the project fails with this error: Error opening input file '/Volumes/workspace/DerivedData/SourcePackages/plugins/GLA.output/GLA/ColorGeneratorPlugin/GeneratedColors/Colors.swift' (No such file or directory) It appears that Xcode Cloud is blocking the creation of files in the pluginWorkDirectory, even though locally it can. Has anyone faced a similar issue? Is there anything I can do to make it work in Xcode Cloud?
4
3
2.4k
Feb ’23