TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Ultimate Portfolio App - Designing a great model

Forums > SwiftUI

in this code below i think there is an error: batchDeleteRequest1 in the text of video 2 called Designing a great model: I think we have to remove the 1

private func delete(_ fetchRequest: NSFetchRequest<NSFetchRequestResult>) {
    let batchDeleteRequest = NSBatchDeleteRequest(fetchRequest: fetchRequest)
    batchDeleteRequest.resultType = .resultTypeObjectIDs

    if let delete = try? container.viewContext.execute(batchDeleteRequest1) as? NSBatchDeleteResult {
        let changes = [NSDeletedObjectsKey: delete.result as? [NSManagedObjectID] ?? []]
        NSManagedObjectContext.mergeChanges(fromRemoteContextSave: changes, into: [container.viewContext])
    }
} 

2      

This post needs to be in the Hacking with Swift+ forum. That's the one dedicated to HWS+ subscribers and the UltimatePortfolio.

Are you looking at a cached page, as the issue you mention isn't there? It is possible that Paul, or someone else, spotted it and it has already been corrected, in which case refreshing your page should help.

2      

Send the typo to Paul at paul@hackingwithswift.com with Typo and link to page he will correct it

2      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.