Create Swift Package plugins

RSS for tag

Discuss the WWDC22 Session Create Swift Package plugins

Posts under wwdc2022-110401 tag

3 Posts

Post

Replies

Boosts

Views

Activity

New File Creation using Command Plugin under project directory
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
0
0
756
Oct ’22
Can Build Plugin Commands Run in Parallel? - Xcode14 Beta
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!
0
0
726
Aug ’22
Swift Plug-ins and Networking
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.
0
1
1.1k
Jun ’22
New File Creation using Command Plugin under project directory
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
Replies
0
Boosts
0
Views
756
Activity
Oct ’22
Can Build Plugin Commands Run in Parallel? - Xcode14 Beta
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!
Replies
0
Boosts
0
Views
726
Activity
Aug ’22
Swift Plug-ins and Networking
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.
Replies
0
Boosts
1
Views
1.1k
Activity
Jun ’22