-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Running the Swiftgen plugin in an Xcode Cloud build fails with the following errors:
Plug-in ended with non-zero exit code: 64)
xcodebuild: error: Failed to copy build products to test products file with error: The file “Products” couldn’t be opened because there is no such file.
It seems like there was an error running SwiftGen.
Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “Strings.swift” in the folder “SwiftGenPlugin”." UserInfo={NSURL=file:///Volumes/workspace/DerivedData/SourcePackages/plugins/assets.output/Assets/SwiftGenPlugin/Strings.swift, NSUserStringVariant=Folder, NSUnderlyingError=0x6000036c5ce0 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}
The Package.swift for our "Assets" Package looks like this:
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "Assets",
defaultLocalization: "de",
platforms: [.iOS(.v17)],
products: [
.library(name: "Assets", targets: ["Assets"]),
],
dependencies: [
.package(url: "https://github.com/chrs1885/WCAG-Colors.git", from: "1.0.0"),
.package(url: "https://github.com/SwiftGen/SwiftGenPlugin", from: "6.6.0")
],
targets: [
.target(
name: "Assets",
dependencies: ["WCAG-Colors"],
path: "Sources",
resources: [.copy("Resources/dummy.txt")],
plugins: [
.plugin(name: "SwiftGenPlugin", package: "SwiftGenPlugin")
]
),
]
)
and swiftgen.yml is
xcassets:
inputs: Sources/Resources/Assets.xcassets
outputs:
templateName: swift5
output: ${DERIVED_SOURCES_DIR}/Assets.swift
params:
publicAccess: true
strings:
inputs: Sources/Resources/de.lproj/Localizable.strings
outputs:
templateName: structured-swift5
output: ${DERIVED_SOURCES_DIR}/Strings.swift
params:
publicAccess: true