R.swift
R.swift copied to clipboard
Proper SPM support for iOS projects
The new Swift Package Manager (Xcode 13.3 / Swift 5.6) enables extensible build tools and custom command plugins. So now it's possible to make proper integration with SPM for iOS projects. Do you have any plans/raw estimations to implement this?
Hi, I've tried to create SPM custom command for R.swift, but it's not working completely according to R.swift - is using xcodeproj for detecting resources in project. It's time to add possibility in R.swift to take package.swift resources.
My example of build tool plugin:
https://github.com/martinpristas/SPM-Plugins-Example
I'm also wondering if there is anything planned already? We have several former Pods that we're changing to SPM and quite a bunch of them used R.Swift.
https://github.com/fthdgn/R.swift.Plugin
I've developed a SPM build plugin for R.swift. It works for my project, however there are some points which I am not sure.
rswift generate
command requires many environment variable which provided by Xcode while running on a standart build phase. However, the new system does not provide these environment variables. I set some environment variables, and put empty string to the others.
The other problem is, I cannot use rswift executable zip file from GitHub release directly. Plugin requires an info.json. I put the executable inside Binaries directory.