How get URL from image located in asset catalog
before use:
let path = Bundle.main.path(forResource: "***", ofType: "png")
or
let path = Bundle.main.path(forResource: "***", ofType: "png", inDirectory: "Assets.xcassets")
let urlI = URL(fileURLWithPath: path!)
but this cause error URL is nil
Help me please