Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Realm Japan meetup #16
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kishikawa Katsumi
July 24, 2016
Programming
0
190
Realm Japan meetup #16
- Realm Objective-C/Swift 1.0.1
- Realm video tutorial
- What's new in CoreData
Kishikawa Katsumi
July 24, 2016
Tweet
Share
More Decks by Kishikawa Katsumi
See All by Kishikawa Katsumi
浮動小数の比較について
kishikawakatsumi
0
65
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
愛される翻訳の秘訣
kishikawakatsumi
3
390
Private APIの呼び出し方
kishikawakatsumi
3
980
iOSでSVG画像を扱う
kishikawakatsumi
0
220
Build your own WebP codec in Swift
kishikawakatsumi
2
1.6k
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
290
Enhancing Applications with Accessibility API
kishikawakatsumi
3
5.2k
Mastering SwiftSyntax
kishikawakatsumi
4
7.5k
Other Decks in Programming
See All in Programming
Data-Centric Kaggle
isax1015
2
780
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
210
Raku Raku Notion 20260128
hareyakayuruyaka
0
370
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
660
CSC307 Lecture 08
javiergs
PRO
0
670
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
180
Fluid Templating in TYPO3 14
s2b
0
130
AgentCoreとHuman in the Loop
har1101
5
250
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
470
要求定義・仕様記述・設計・検証の手引き - 理論から学ぶ明確で統一された成果物定義
orgachem
PRO
1
240
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
480
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
1
760
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
55
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
65
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
77
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
58
50k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
A Soul's Torment
seathinner
5
2.3k
RailsConf 2023
tenderlove
30
1.3k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
What's in a price? How to price your products and services
michaelherold
247
13k
Agile that works and the tools we love
rasmusluckow
331
21k
Transcript
Realm meetup #16
[email protected]
Katsumi Kishikawa Realm Inc.
[email protected]
Recent Updates
[email protected]
Recent Updates • Realm Objective-C/Swift 1.0.1 (was 1.0.0) • Realm
Java 1.0.1 (was 1.0.0) • Realm React Native 0.13.0 • Realm Xamarin 0.76.0
[email protected]
[email protected]
Realm Objective-C/Swift 1.0.1 (was 1.0.1)
[email protected]
Realm Objective-C/Swift 1.0.1 • RealmϑΝΠϧΛ։͘ࡍͷύϑΥʔϚϯε্ • ॻ͖ࠐΈτϥϯβΫγϣϯͷύϑΥʔϚϯε্ • RealmOptionalܕͷϓϥΠϚϦΩʔΛ࣋ͭΦϒδΣΫ τΛߋ৽Ͱ͖ͳ͍ͷमਖ਼
• objectForPrimaryKey(_:key:)ͷύϥϝʔλ͕Φϓγϣ φϧʹ • ෆ۩߹ͷमਖ਼
[email protected]
[email protected]
Already compatible with Swift 3 & Xcode 8 https://github.com/realm/realm-cocoa/issues/3796
[email protected]
Realm Objective-C/Swift 1.0.2 will be very soon!
[email protected]
Realm Video Tutorial
[email protected]
Beginning Realm on iOS www.raywenderlich.com/video-tutorials#begrealm
[email protected]
Beginning Realm on iOS raywenderlich.com
[email protected]
Beginning Realm on iOS raywenderlich.com
[email protected]
WWDC 2016
[email protected]
What’s new in Core Data
[email protected]
What’s new in Core Data • Simple Core Data Stack
• NSPersistentStoreDescription (Like RealmConfiguratin?) • Type safety • Subclass generation • Version Pinning
[email protected]
[email protected]
Simpler Core Data Stack
[email protected]
lazy var managedObjectModel: NSManagedObjectModel =
{ let modelURL = NSBundle.mainBundle().URLForResource("Example", withExtension: "momd")! return NSManagedObjectModel(contentsOfURL: modelURL)! }() lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = { var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel) let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("Example.sqlite") var error: NSError? = nil var failureReason = "There was an error creating or loading the application's saved data." if coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil, error: &error) == nil { coordinator = nil NSLog("Unresolved error \(error), \(error!.userInfo)") abort() } return coordinator }() lazy var managedObjectContext: NSManagedObjectContext? = { let coordinator = self.persistentStoreCoordinator if coordinator == nil { return nil } var managedObjectContext = NSManagedObjectContext() managedObjectContext.persistentStoreCoordinator = coordinator return managedObjectContext }()
Simpler Core Data Stack
[email protected]
lazy var persistentContainer: NSPersistentContainer =
{ let container = NSPersistentContainer(name: "Example") container .loadPersistentStores(completionHandler: { (storeDescription, error) in if let error = error { fatalError("Unresolved error \(error), \(error.userInfo)") } }) return container }()
Typed fetch request
[email protected]
let request: NSFetchRequest<Dog> = Dog.fetchRequest() request.predicate
= Predicate(format: "...") request.fetchBatchSize = 20 let dogs = try! persistentContainer.viewContext.fetch(request) print(dogs)
Typed fetch request
[email protected]
let request: NSFetchRequest<Dog> = Dog.fetchRequest() request.predicate
= Predicate(format: "...") request.fetchBatchSize = 20 let dogs = try! persistentContainer.viewContext.fetch(request) print(dogs)
Insert
[email protected]
let dog = Dog(context: persistentContainer.viewContext) ... try! persistentContainer.viewContext.save()
Backgroud task
[email protected]
let context = persistentContainer.newBackgroundContext() ...
Backgroud task
[email protected]
persistentContainer.performBackgroundTask { (context) in ... }
Auto generation subclasses
[email protected]
import Foundation import CoreData class Dog:
NSManagedObject { } extension Dog { @nonobjc class func fetchRequest() -> NSFetchRequest<Dog> { return NSFetchRequest<Dog>(entityName: "Dog"); } @NSManaged var age: Int64 @NSManaged var name: String? }
Where to find us • ! Realm Japan User Group:
facebook.com/groups/realmjp • ! Twitter: twitter.com/realmJapan • GitHub: github.com/realm • ! StackOverflow: ja.stackoverflow.com/questions/tagged/realm • ! Email:
[email protected]
• ! Slack: slack.realm.io/
[email protected]
[email protected]
Realm Japan User Group Facebook
[email protected]
Support Chat Slack
[email protected]
Ξϯέʔτ http://bit.ly/RealmJP_16
[email protected]
Questions? Katsuma Kishikawa
[email protected]
www.realm.io/jp @k_katsumi