are generally not thread safe. • Different contexts (NSManagedObjectContext) for different threads • It’s safer to pass around pure NSObjects (MTLModel) along different threads
Pod. • Kusanagi.xcdatamodel – Remember that object dele9on rules are in reverse • 95% of the 9me, JSON responses are saved to Core Data. • JSON “.me” responses are saved as “facts”
to the real API endpoints. • When adding new files 1. Add them to Kusanagi.xcodeproj 2. Update version of Kusanagi.podspec 3. Run `pod update` in Lifebit workspace •
should be in their specific classes • Use a single NSManagedObjectContext as much as possible. • Enclose JSON transformers in +JSONDic9onaryTransformer or +JSONArrayTransformer
should be in Lifebit (+FFExtensions): – KSQBTimelineItem+findForFeedOfRequestorId: • Other app specific stuffs should be in +FFExtensions: – KSPlace+urlStringForSta9cMapWithSize:
protocols – Forward declara9on for everything else • Implementa9on file – #import everything you use – Use <Library/Library.h> conven9on for impor9ng 3rd-‐party libraries
(`_property`). Use `self.property`. • Proper9es launch KVO no9fica9ons • Proper9es are atomic (cannot be accessed from more than one thread) -‐ safer to read and write in mul9ple threads • Prevent accidents when overriding proper9es
– API calls – RAC handlers – Not needed in UIView-‐animateWithDura9on: • Make sure you are using SDWebImage when loading remote images • Avoid singletons. Make app services instead. • -‐tableView:es9matedHeightForRowAtIndexPath