按需资源下载后使用文件 Swift 3

Use Files after On demand resource download Swift 3

按需资源放置。

大家好。 我已经为点播资源设置了标签,我已经编写了下载它的代码,但我不知道如何访问它?使用 swift 3

下面是我的代码。

在设置 ODR 之前,我从 main.bundle 获取音频。

 try vox = AVAudioPlayer(contentsOf: URL(fileURLWithPath: Bundle.main.path(forResource: sV, ofType: "mp3")!))
        try music = AVAudioPlayer(contentsOf: URL(fileURLWithPath: Bundle.main.path(forResource: sM, ofType: "mp3")!))

下载文件的代码。

 request = NSBundleResourceRequest(tags: ["Stress"])
    request.beginAccessingResources { (error) in
        //  Called on background thread
        if error == nil {
            OperationQueue.main.addOperation({ () -> Void in

            })
        }
    }

我只是看不到下载后如何访问该文件?

来自 documentation for NSBundleResourceRequest.init(tags:):

The managed resources are loaded into the main bundle