R.swift
R.swift copied to clipboard
image return nil when using r.swift.imageName
Hi everyone,
i'm currently build a framework for ios using r.swift (using r.swift in framework) but when i plug a framework into my main app an image will disappeared (r.swift.imageName
return nil) but image that set using storyboard is showing normally so how could i fix my issue
FYI:
- My main project also use r.swift
- when i use
UIImage(named: imageName , in: bundle, compatibleWith: nil)
image show up normally - when i use R.swift.imageName i also use command
"po UIImage(imageName)"
its also return nil)
Thanks for your help
Can you provide a demo project?
R.swift in the end does call UIImage(named: imageName , in: bundle, compatibleWith: nil)
to get the image, where the bundle is the bundle where the R.generated.swift is embedded into.
Are you sure you are calling the R.swift.imageName
from the framework and not the one that might be in the app or something like that?
Closing this since it's a bit dated already, but feel free to comment, we can reopen if this is still relevant.