I have some MP3 files in my .xcassets folder. I can play them directly using AVKit
's AVAudioPlayer(data: NSDataAsset(name: "foo")!.data).play()
. But, I want to extract the Metadata of the song using AVPlayerItem
. But AVPlayerItem
's Initializer wants an URL
as parameter.
How to extract the URL
of an NSDataAsset
? I am using UIKit Framework btw.