Post

Replies

Boosts

Views

Activity

Reply to error: CoreData+CloudKit: Never successfully initialized and cannot execute request - incomprehensible archive
I had this happen again when I was adding a couple new properties to my schema. I had forgotten to switch back to the development settings in the entitlements file and ran against production. It gave some errors and I remembered I needed to switch to development, run the app there so it could update the schema, then promote the schema to production. When I did that, I started getting those incomprehensible archive errors again. So I looked at the records in the CloudKit dashboard and I noticed a couple entries that had the word FAKE in them in all caps. Didn't know how they got there, so deleted them. Then switched back to production and everything worked again. Oh, I did reset the development environment as well, but the problem was in production, not development. Those FAKE records were in production. Seems to be working now. Phew! I was worried I'd have to make all new entities and change the location of my CoreData store or something. Dodged a bullet I think.
Apr ’25
Reply to Image Playground API
How do you use the delegate? When I implement the delegate , I get an error in my AppName-Swift.h file. I have a Swift class that I've implemented to be the delegate for ImagePlaygroundViewController. Unless there's a way to access it directly from Objective-C. I figured I'd use an intermediate Swift class and then just pass the selected image to my Objective-C view controller. This is an AppKit app. Mostly in Objective-C, but with sprinkles of Swift and SwiftUI here and there. I've implemented the delegate and all the required methods. @objc public class TFImagePlaygroundManager: NSObject, ImagePlaygroundViewController.Delegate This error is what I get: Cannot find protocol declaration for 'ImageGenerationViewControllerDelegate'; did you mean [some other delegate] Is it not posible to use Image Playground in a mixed Swift / Objective-C Mac AppKit app? This is the code that's auto-generated inside my AppName-Swift.h file: @interface TFImagePlaygroundManager : NSObject <ImageGenerationViewControllerDelegate> - (void)imagePlaygroundViewController:(ImagePlaygroundViewController * _Nonnull)imagePlaygroundViewController didCreateImageAt:(NSURL * _Nonnull)imageURL; - (void)imagePlaygroundViewControllerDidCancel:(ImagePlaygroundViewController * _Nonnull)imagePlaygroundViewController; - (nonnull instancetype)initWithDelegate:(id <TFImagePlaygroundDelegate> _Nonnull)delegate OBJC_DESIGNATED_INITIALIZER; - (void)showImagePlaygroundFromController:(NSViewController * _Nonnull)controller; - (nonnull instancetype)init SWIFT_UNAVAILABLE; + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable"); @end
Topic: UI Frameworks SubTopic: General Tags:
Dec ’24
Reply to WARNING: Application performed a reentrant operation in its NSTableView delegate. This warning will become an assert in the future.
I'm using NSTableViewDiffableDataSource and as soon as I import a bunch of records (not even that many - like 600), I get the error if I have animations turned on. [self.tableDiffableDataSource applySnapshot:snapshot animatingDifferences:YES completion:^{ }]; But as soon as I turn OFF animatingDifferences, I no longer get the error.
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’23
Reply to NSCloudKitMirroringExportRequest issues
I had this same problem, but as soon as I uncommented out this code and ran my app, while connected to the Production CloudKit container, it started to work. I thought you only had to do it one time on the Development container and then publish to production in the CloudKit Dashboard. Once I let this code run one time, after that it all started to work. do { // Use the container to initialize the development schema. try container.initializeCloudKitSchema(options: []) } catch { // Handle any errors. print(error) } #endif
Jun ’22
Reply to Xcode 12.2 Beta 3 on macOS 11 Beta 11: SIGCONT when debugging projects
This is also happening to me. It happened to me after I upgraded to macOS 11 Beta 10, but before Xcode 12.2 Beta 3. I was still on Beta 2 when I first saw the crash. So then I upgraded to Xcode 12.2 Beta 3 and it still crashes. I knew it had to be something with the debugger because I could launch the built application from the Finder, but not from within Xcode. Thanks for the workarounds. At least I can run now.
Oct ’20
Reply to OutlineGroup and hierarchical List with Core Data
I'm in the same boat. But I have a hierarchical relationship with 3 different entities: CDCategory ->> CDForm ->> CDSearch ->> CDSearch A Search can have a list of child Searches and a Search can represent a folder. So basically any number of nested folders/searches. For example: > Personal (CDCategory) > My Movie Library (CDForm) > Searches by Genre (CDSearch with isFolder = true) Action Movies (CDSearch) Comedies (CDSearch) and so on. I can't seem to get OutlineGroup to handle this. The first issue is the error about NSSet not being the required Set&lt;Form&gt;, etc. To get around that I'm using Array(category.forms as! Set&lt;CDForm&gt;) I use that with List but I can't seem to use it with OutlineGroup because when I provide the children key path, I get that similar error: Key path value type 'NSSet?' cannot be converted to contextual type '[CDSearch]?' I've looked around for examples that use OutlineGroup with Core Data but haven't found anything yet. OutlineGroup(Array(form.searches as! Set&lt;CDSearch&gt;), id: \.uuid, children: \.searches) { (search : CDSearch) in SearchRow(search: search) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’20