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使ってみた (SWWDC 仙台iPhoneとか開発者勉強会 その26)
Search
tototti
February 02, 2016
Programming
470
0
Share
Realm使ってみた (SWWDC 仙台iPhoneとか開発者勉強会 その26)
2016/01/30 SWWDC 仙台iPhoneとか開発者勉強会 その26 - 新春ライトニングトーク大会 -
tototti
February 02, 2016
More Decks by tototti
See All by tototti
ShazamKit調べてみた - 仙台iOS開発者勉強会 SWWDC47 - AppleEvent振り返り + LT会
tototti
0
240
2017年 SWWDCの活動振り返りと来年の展望
tototti
0
700
CoreMLやってみた - 2017/07/15 AKIBA.Swift x SWWDC
tototti
0
1.2k
データサイエンスで宝くじ hack
tototti
0
1.4k
Xcodeの小ネタ (SWWDC 仙台iPhoneとか開発者勉強会 その26)
tototti
0
430
Other Decks in Programming
See All in Programming
Inside Stream API
skrb
1
600
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
320
dRuby over BLE
makicamel
2
290
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.1k
Transactional Change Stream Processing With Debezium and Apache Flink
gunnarmorling
1
160
ふつうのFeature Flag実践入門
irof
7
3.5k
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.9k
Lessons from Spec-Driven Development
simas
PRO
0
120
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.4k
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
130
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
230
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
3.3k
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
240
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
4 Signs Your Business is Dying
shpigford
187
22k
A better future with KSS
kneath
240
18k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
44k
WENDY [Excerpt]
tessaabrams
11
38k
Why Our Code Smells
bkeepers
PRO
340
58k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
250
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
550
Transcript
3FBMNͬͯΈͨ 488%$ !UPUPUUJ
ಡΈํϨϧϜ
3FBMN w NPCJMF͚ͷσʔλϕʔε w 42-JUFͷସΛࢦ͍ͯ͠ΔΒ͍͠ w 3FMBUJPOBMͰͳ͘ɺ,74Β͍͠ ˞ Ͳ͔ͬʹॻ͍͚ͯ͋ͬͨͲɺ ະ֬ೝ
ɾТɾA
ͬͯΈͨ w ʮઋϏʔϧϚοϓʯΞϓϦ w ళฮνΣοΫΠϯػೳ
Πϯετʔϧ w QPEl3FBMN w QPEJOTUBMM
ςʔϒϧఆٛ w ΫϥεΛॻ͚ͩ͘ͰPL @interface Visit : RLMObject @property NSString* shopID;
@property NSDate* visitDate; @property NSString* memo; @property NSData* imageData; @end 4XJGU0CK$ࠞࡏϓϩδΣΫτͷ߹ɺ 0CK$Ͱॻ͘΄͏͕ྑ͍Β͍͠ ŖAшŖ /4%BUF /4%BUB ͦͷ··Ϳͬ͜ΊΔ
JOTFSUEFMFUF RLMRealm *realm = [RLMRealm defaultRealm]; [realm beginWriteTransaction]; [realm addObject:visit];
[realm commitWriteTransaction]; RLMRealm *realm = [RLMRealm defaultRealm]; [realm beginWriteTransaction]; [realm deleteObject:visit]; [realm commitWriteTransaction];
VQEBUF w ࠓճΘͳ͔͕ͬͨʜ w ςʔϒϧʹϓϥΠϚϦΩʔΛࢦఆ͢Δ // addOrUpdateObjectͰupdate realm.beginWriteTransaction() realm.addOrUpdateObject(visit) realm.commitWriteTransaction()
4FMFDU // શऔಘ RLMResults<Visit *> *visits = [Visit allObjects]; //
શऔಘ + ιʔτ NSArray* sortProperties = @[[RLMSortDescriptor sortDescriptorWithProperty:@"visitDate" ascending:NO]]; RLMResults<Visit *> *visits = [[Visit allObjects] sortedResultsUsingDescriptors:sortProperties]; // ݅ࢦఆ NSPredicate *predicate = [NSPredicate predicateWithFormat:@"shopID = %@", shopID]; RLMResults<Visit *> *visits = [Visit objectsWithPredicate:predicate];
͜Εշదʜ
·ͱΊ w ͍Β͍͠ w ͱʹָ͔͘ɻ w ςʔϒϧ࡞ w JOTFSUEFMFUFTFMFDU w
খ͍͞σʔλͰɺQMJTUอଘ͢ΔΑΓָ