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
0
470
Realm使ってみた (SWWDC 仙台iPhoneとか開発者勉強会 その26)
2016/01/30 SWWDC 仙台iPhoneとか開発者勉強会 その26 - 新春ライトニングトーク大会 -
tototti
February 02, 2016
Tweet
Share
More Decks by tototti
See All by tototti
ShazamKit調べてみた - 仙台iOS開発者勉強会 SWWDC47 - AppleEvent振り返り + LT会
tototti
0
240
2017年 SWWDCの活動振り返りと来年の展望
tototti
0
650
CoreMLやってみた - 2017/07/15 AKIBA.Swift x SWWDC
tototti
0
1.1k
データサイエンスで宝くじ hack
tototti
0
1.4k
Xcodeの小ネタ (SWWDC 仙台iPhoneとか開発者勉強会 その26)
tototti
0
430
Other Decks in Programming
See All in Programming
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
470
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
1
220
ふつうのRubyist、ちいさなデバイス、大きな一年 / Ordinary Rubyists, Tiny Devices, Big Year
chobishiba
1
420
株式会社 Sun terras カンパニーデック
sunterras
0
2k
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
210
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
170
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
390
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.5k
CSC307 Lecture 13
javiergs
PRO
0
320
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
210
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
240
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Technical Leadership for Architectural Decision Making
baasie
3
280
Paper Plane (Part 1)
katiecoart
PRO
0
5.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
We Have a Design System, Now What?
morganepeng
55
8k
Google's AI Overviews - The New Search
badams
0
930
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Done Done
chrislema
186
16k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
200
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
150
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
330
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อଘ͢ΔΑΓָ