Sunday, September 27, 2026
HomeiOS Developmentios - Swift On Demand Assets Queueing Difficulty

ios – Swift On Demand Assets Queueing Difficulty

[ad_1]

I am having what I feel is a queueing challenge. I’ve by no means actually understood queueing, so actually respect any assist.

var ODRtags: Set = ["Soprano", "Alto", "Tenor", "Bass", "KeyCentre"]
...
    func testForChangeRangeMessage() {
        let check = ODRtags.checkIfTagsAvailable()
        if check == false {
                showExerciseDownloadAlert = true
        }
        print ("checks present content material downloaded = (check)")
    }
...
extension Set the place Factor == String {
    func checkIfTagsAvailable()-> Bool {
        let currentRequest = NSBundleResourceRequest(tags: self)
        var avail = false
        currentRequest.conditionallyBeginAccessingResources { standing in
            avail = standing
            print ("Donwloaded?? (standing)")
        }
        return avail
    }
}

So, ideally what would occur is the primary func checks if the ODRs are downloaded, utilizing the extension. If not, it will make a message pop up asking to obtain them. The problem is that the
print ("checks present content material downloaded = (check)") prints ‘false’ first, then the print ("Donwloaded?? (standing)") prints true. So it could appear that the primary operate is looking the extension operate, however then persevering with on with out ready for a solution from it. I do not actually perceive Queueing, however I attempted throwing each features inside DispatchQueue.most important.async {, with no change in consequence.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments