R.swift
R.swift copied to clipboard
Resources from package as input for generators
we are using terminal command base R.Swift solution like this in our build phase:
swift run -c release rswift generate --accessLevel public --generators image,string,color,font,file "$SRCROOT/someOutputPath/R.generated.swift"
Is it possible to make R.Swift work with resources inside packages as input for the generating process? Let's say we have a package named UIToolkit in the project where we have assets that we want to use as input for the generated file.
For example, the hierarchy would look like this:
We are able to set the output path to this package, but we haven't found a way to specify that the assets in UIToolkit should be added to the generated output. Any ideas?
thnx a lot for any suggestions, help
You can call the rswift executable with either an Xcode project file, or a list of files:
rswift generate R.generated.swift --input-type xcodeproj --xcodeproj MyApp.xcodeproj
rswift generate R.generated.swift --input-type input-files --input-files Assets.xcassets Localised.strings