Post

Replies

Boosts

Views

Activity

Reply to NSPersistentCloudkitContainer Memory Leak -> Crash? (iOS 15 beta 4 & 5)
Hello from 2025! iOS 18.5 and Xcode 16.4 here. App was working just fine after implementing CloudKit/CoreData syncing for a few days... then just now it stopped working. Hangs on startup with the long-running message folks have shared above. What on Earth... It's only trying to pull down about 300 entities consisting of a single String and Date :confused:
Jun ’25
Reply to Avoid Duplicate Records with CloudKit & CoreData
Hello from 2025! This seems like a mismatched degree of effort for this functionality. I.e. if you're using CoreData+CloudKit, of course you want to sync your entities across devices without creating duplicates; otherwise why use it? For others that are finding this in 2025 and beyond, is it still the case that we need to do all of this to avoid duplication when CloudKit is syncing our entities? I've been researching for two days, hoping that I'll eventually stumble into a magical incantation of a store or entity setting that will let the underlying CD+CK integration handle this. Unfortunately no luck. Is there a way to construct a CoreData Entity such that the underlying CKRecord.ID uses a particular value? If that were the case, it would let the underlying framework handle this.
Jun ’25
Reply to Core Data transformable attribute problem in Xcode16
Using Xcode 16.2 (16C5032a): The only Custom Class value that works for me is NSArray and casting to [Int]. All other combinations discussed above either don't compile or produce runtime errors. For the Transformer value I set either NSSecureUnarchiveFromData or NSSecureUnarchiveFromDataTransformerName ...and then experiment with different Custom Class settings: NSArray Works! Need to cast, but no errors and no crashes. [NSInteger] fault: Declared Objective-C type "[NSInteger]" for attribute named perkLevelRequirementsIntArray is not valid CoreData: fault: Declared Objective-C type "[NSInteger]" for attribute named perkLevelRequirementsIntArray is not valid CoreData: Declared Objective-C type "[NSInteger]" for attribute named perkLevelRequirementsIntArray is not valid NSArray<Int> @NSManaged public var perkLevelRequirementsIntArray: NSArray<Int>? Cannot specialize non-generic type 'NSArray' [Int] fault: Declared Objective-C type "[Int]" for attribute named perkLevelRequirementsIntArray is not valid CoreData: fault: Declared Objective-C type "[Int]" for attribute named perkLevelRequirementsIntArray is not valid CoreData: Declared Objective-C type "[Int]" for attribute named perkLevelRequirementsIntArray is not valid
Apr ’25
Reply to SwiftUI Previews creating views out of thin air?
Since the call stack was collapsed in the screenshot, here's the expanded version. It looks like the SwiftUI Preview system up to something? #0 0x00000001035e247c in closure #2 in AuthFirstCensusView.body.getter at /Users/vz/Documents/GitHub/reckoner-app/reckoner/Authentication/AuthFirstCensusView.swift:103 #1 0x00000001035e277c in partial apply for closure #2 in AuthFirstCensusView.body.getter () #2 0x00000001d1817138 in (1) await resume partial function for partial apply forwarder for closure #1 () async -> () in closure #1 (inout Swift.TaskGroup<()>) async -> () in closure #1 () async -> () in SwiftUI.AppDelegate.application(_: __C.UIApplication, handleEventsForBackgroundURLSession: Swift.String, completionHandler: () -> ()) -> () () #3 0x00000001d17b1e48 in (1) await resume partial function for dispatch thunk of static SwiftUI.PreviewModifier.makeSharedContext() async throws -> τ_0_0.Context () #4 0x00000001d19c10c0 in (1) await resume partial function for generic specialization <()> of reabstraction thunk helper <τ_0_0 where τ_0_0: Swift.Sendable> from @escaping @isolated(any) @callee_guaranteed @async () -> (@out τ_0_0) to @escaping @callee_guaranteed @async () -> (@out τ_0_0, @error @owned Swift.Error) () #5 0x00000001d17b1e48 in (1) await resume partial function for dispatch thunk of static SwiftUI.PreviewModifier.makeSharedContext() async throws -> τ_0_0.Context ()
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24