Using Core Data With Swift
Tom Harrington: Both Core Data and Swift include the concept of an optional value. But when Xcode generates subclasses, it doesn’t consider whether Core Data thinks the value is optional when...
View ArticleZarra’s Core Data Stack
Marcus Zarra creates a private queue context for writing to disk and a main queue (child) context for all user interaction: To protect our main thread, we call -addPersistentStoreWithType:...
View ArticleWWDC 2015 Links
General: Download Xcode 7 Beta What’s New in Xcode (PDF, comments) Apple Developer Forums (a new set of forums that are viewable without logging in) WWDC 2015 Sample Code (intriguing CompressionSample...
View ArticleCore Data Bugs
Almost four years ago, Dev reported a bug with Core Data’s NSOrderedSet generated accessors (via Ling Wang). DaGaMs, in 2013: I just brought this up with an Apple engineer during one of the CoreData...
View ArticleDynamic Swift
Lee Morgan: We’ll go ahead and extend our KVC protocol and add our default implementation. extension KVC { func valueForKey(key : String) -> Any? { let mirror = reflect(self) for index in 0 ..<...
View ArticleA Eulogy for Objective-C
Aaron Hillegass (comments: 1, 2): The wonderful thing about Objective-C is that it’s so dynamic. As we start moving into languages that are a little bit more uptight about such things, it’s nice to...
View ArticleGit as a Document Format
Wil Shipley: Undo and redo was sort of part of Core Data, but they tried to do it at the lowest level, where any time you changed the database, it just registered an undo event. This turned out to be a...
View ArticleThe Big Nerd Ranch Core Data Stack
Robert Edwards notes that the Nested Managed Object Context Pattern has some cons: Slower than Shared Persistent Store Coordinator Pattern when inserting large data sets awakeFromInsert being called on...
View ArticleCore Data in El Capitan
There are again no Core Data release notes this year, but there is WWDC 2015 Session 220 (video, PDF): Previously you may have used -hasChanges, this was a rather basic dirty flag, if you touch the...
View ArticleThe Story of NetNewsWire
Rebekah Wolf: Still feeling that iCloud would be the best fit once it was fully functional, the product team shifted their focus to developing Kaleidoscope 2 while they waited for Apple to work out the...
View ArticleGenerating Core Data Swift
Human Friendly: There are two [Xcode] generation options, with “Use scalar properties for primitive data types” you get usefully typed integers, floats, doubles and bools but lose the expression to...
View ArticleDouble Core Data Accessors by Omitting @NSManaged
Trevor Squires: If our implementation is not exposed to Objective-C, then Core Data will not find it at runtime, which means that, yes, Core Data will dynamically generate the accessor implementation...
View ArticleCore Data Book
Florian Kugler and Daniel Eggert: With this book we try to shine a new light on a framework that has been around for a while: We embrace Swift 2 with all its latest language features to write more...
View ArticleCore Data Threading Demystified
Marcus Zarra (comments): In the best way, we go back to having one PSC, but we’re going to use the new APIs in iOS 6. We’re going to add a private MOC that talks to that PSC. Then, we’re going to add...
View ArticlePragmatic Core Data
Florian Kugler: Now to answer the ultimate question, how do I get best performance with Core Data? Is the question that I can un-answer in the abstract. I think that your best bet is to look at the...
View ArticleCore Data Join Table Records Not Deleted in Ordered Relationship
Tonester: I’m having trouble with a core data many-to-many relationship where both side’s delete rules are set to Nullify. I’m finding when I inspect the SQL database there are records left in the join...
View ArticleUTF-8 String in Swift 5
Michael Ilseman: Switching to UTF-8 fulfills one of String’s long-term goals to enable high-performance processing, which is the most passionate request from performance-sensitive developers. It also...
View Article@autoreleasepool Uses in 2019 Swift
Bruno Rocha: To put it short, autoreleasepool is still useful in iOS/Swift development as there are still legacy Obj-C classes in UIKit and Foundation that call autorelease, but you likely don’t need...
View ArticleWWDC 2019 Links
General: Keynote (Goodnight Developers Video, Hacker News) Schedule Videos Beta Downloads Customer Stuff: iPadOS Preview iOS 13 Preview macOS 10.15 Catalina Preview watchOS 6 Preview Documentation:...
View ArticleSyncing Core Data With CloudKit and NSPersistentCloudKitContainer
WWDC Session 202: CloudKit offers powerful, cloud-syncing technology while Core Data provides extensive data modeling and persistence APIs. Learn about combining these complementary technologies to...
View Article