I'm in the middle of updating my app to only support iOS 14+ and am moving to the new @main app structure. I'm trying to figure out how to deal with code in my App and Scene Delegate: mainly code related to Core Data and CloudKit persistent container.
Stuff like
and
Where do I put this kind of stuff in the new @main world?
Stuff like
Code Block lazy var persistentContainer: NSPersistentCloudKitContainer = {...}
and
Code Block let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext context.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy context.automaticallyMergesChangesFromParent = true
Where do I put this kind of stuff in the new @main world?