Create Swift Package plugins

RSS for tag

Discuss the WWDC22 Session Create Swift Package plugins

Posts under wwdc2022-110401 tag

3 Posts
Sort by:
Post not yet marked as solved
0 Replies
390 Views
Hi team,    I am working with CommandPlugin and with the help of command plugin I can able to create files inside my Package directory but I want to create a file in my project directory but whenever I try to create new file outside Package directory it is saying like there is no permission to create a file in this folder. Is this possible to create new file inside project directory using CommandPlugin ? Can you please help me for this ? I am struggling on this more than a week. Eagerly waiting for you kind support. Thank you so much. Scenario, 1.Able to Crete new file inside Package directory, 2.Facing permission issues - while creating new files inside project directory with the help of CommandPlugin Issue: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file file.txt in the folder ProjectFolder
Posted
by Jana_iOS.
Last updated
.
Post not yet marked as solved
0 Replies
358 Views
I am using a pre-build plugin with the Xcode 14 beta to verify cer files are in the correct format before every build. The code loops through the files the same way as this wwdc video: https://developer.apple.com/videos/play/wwdc2022/110401/ None of the commands have dependancies on each other so it should be running parallel if possible, but the build timeline shows the returned commands are all run serially. are there any changes I could make to parallelize them?     Here is a snippet of the code returning the commands as described! return try target.sourceFiles(withSuffix: "cer").map { file in           .prebuildCommand(             displayName: "Validate Cer is running",              executable: try context.tool(named: "verify-file").path,             arguments: [file.path],             outputFilesDirectory: verifOutputsDir           )       } Thanks for the help!
Posted
by Glennonr.
Last updated
.
Post not yet marked as solved
0 Replies
800 Views
The session on creating a plugin mentioned that you don’t have access to networking. Is this functionality that may come in a future update, or is there no plan to ever add it? My specific use case is to use a public API my company has available, which provides us a JSON payload so we can generate theme resources. I’d love to be able to put our theming code into a Swift Package, but it sounds like I won’t be able to use a plugin to be able to do the code generation that I need to do.
Posted
by Danberry.
Last updated
.