Questions tagged [swift-package-plugin]

5 questions
4
votes
0 answers

Xcode Cloud has no write permission when running Swift Package Plugin

I have this Plugin struct Main: BuildToolPlugin { func createBuildCommands(context: PluginContext, target: Target) async throws -> [Command] { let inputFolder = target.directory.appending("Image") let output =…
1
vote
0 answers

SPM Build tool not running when adding package to projec

I have created a new project and added this Swift Package to it: https://github.com/laevandus/SwiftExampleToomasKit If I build the project it fails to compile the SPM Package saying MyGeneratedEnum is missing. This enum is generated by build tool…
0
votes
1 answer

Local SPM library with SPM plugin generating file linked to iOS and watchOS targets causes Multiple commands produce error

I'm creating a watchOS app which depends on an iOS app. Both those apps have their corresponding targets. Both targets link my local SPM library, which have single target. This target calls R.swift plugin which generates file in the output…
0
votes
0 answers

Provide input to SPM Plugin from Host App

Is there a way to provide input from a spm package plug-in, from the host app that integrates it ? I see there is no way to access the host target (although the plugin has access to the package target). Is that possible with the current status quo ?
0
votes
0 answers

Swift Package Plugin - Copy Build Artifact

Is it possible to create a build tool plugin that runs after the build and copies build artifacts to another location in the package directory? For example, say I have an executable target named tool. Each time that I build tool, I'd like to copy…
Clay Ellis
  • 4,960
  • 2
  • 37
  • 45