R.swift: R.generated.swift not compiling

Created on 8 Feb 2019  路  4Comments  路  Source: mac-cain13/R.swift

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() {}
    }

Most helpful comment

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.

All 4 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aliasdoc picture aliasdoc  路  3Comments

Samback picture Samback  路  7Comments

apascual picture apascual  路  6Comments

andreadelfante picture andreadelfante  路  6Comments

serejahh picture serejahh  路  4Comments