I tried using FileManager and Bundle class methods to read Assets.xcassets folder but it returns nil or some other file names. Is it even possible to read that catalog in iOS?
These are the methods I tried:
let fileManager = FileManager.default
let contents = fileManager.contentsOfDirectory(atPath: "")
let contents = contentsOfDirectory(at: assetURL, includingPropertiesForKeys: [URLResourceKey.nameKey, URLResourceKey.isDirectoryKey], options: .skipsHiddenFiles)
let contents = try? fileManager.subpathsOfDirectory(atPath: Bundle.main.resourcePath!)
Any kind of help is appreciated. Thanks.