Xcode 10.1 (10B61)
Carthage:
github "mac-cain13/R.swift.Library" ~> 5.0.2
Swift 4.2
Hi,
I'm struggling with 2 issues in generated file:
1)
/<path>/<project>/Resources/R.generated.swift:35:33: Module 'Rswift' has no member named 'ColorPaletteItemResource'
generated code
struct palette {
/// <span style='background-color: #00000066; color: #FFFFFF; padding: 1px 3px;'>#00000066</span> tabButtonInactive
static let tabButtonInactive = Rswift.ColorPaletteItemResource(name: "tabButtonInactive", red: 0.0, green: 0.0, blue: 0.0, alpha: 0.4)
2)
/<path>/<project>/Resources/R.generated.swift:760:60: Cannot convert value of type '[NSObject : AnyObject]?' to expected argument type '[UINib.OptionsKey : Any]?'
generated code:
struct _BuyAccessView: Rswift.NibResourceType {
let bundle = R.hostingBundle
let name = "BuyAccessView"
func firstView(owner ownerOrNil: AnyObject?, options optionsOrNil: [NSObject : AnyObject]? = nil) -> BuyAccessView? {
return instantiate(withOwner: ownerOrNil, options: optionsOrNil)[0] as? BuyAccessView
}
fileprivate init() {}
}
I have encountered the similar problem too, but delete R.generated.swift file and build then re-generate R.generated.swift file solved the problem.
is there an update on this issue? I have deleted the file and attempted to regenerate but to no avail
The error message mentions ColorPaletteItemResource, this was a type to support R.clr from R.swift 4.
Color pallet based colours are no longer supported in R.swift 5.
If you're seeing this error, it means your code is generated by R.swift 4, working agains the R.swift 5 library.
Make sure the R.swift and R.swift.Library pods are both using the latest version 5.
it's working now, thanks for help. i'm closing the issue
Most helpful comment
I have encountered the similar problem too, but delete
R.generated.swiftfile and build then re-generateR.generated.swiftfile solved the problem.