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
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
720
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
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
130
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.1k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
310
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
280
さぁV100、メモリをお食べ・・・
nilpe
0
160
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
600
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
280
dRuby over BLE
makicamel
2
390
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
790
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
8.5k
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
260
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
210
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
470
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
440
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
Darren the Foodie - Storyboard
khoart
PRO
3
3.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Music & Morning Musume
bryan
47
7.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Code Review Best Practice
trishagee
74
20k
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อଘ͢ΔΑΓָ