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
230
2017年 SWWDCの活動振り返りと来年の展望
tototti
0
620
CoreMLやってみた - 2017/07/15 AKIBA.Swift x SWWDC
tototti
0
1.1k
データサイエンスで宝くじ hack
tototti
0
1.4k
Xcodeの小ネタ (SWWDC 仙台iPhoneとか開発者勉強会 その26)
tototti
0
420
Other Decks in Programming
See All in Programming
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
230
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
AIを活用し、今後に備えるための技術知識 / Basic Knowledge to Utilize AI
kishida
22
5.8k
ぬるぬる動かせ! Riveでアニメーション実装🐾
kno3a87
1
220
1から理解するWeb Push
dora1998
7
1.9k
Improving my own Ruby thereafter
sisshiki1969
1
160
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
330
個人軟體時代
ethanhuang13
0
320
MCPでVibe Working。そして、結局はContext Eng(略)/ Working with Vibe on MCP And Context Eng
rkaga
5
2.3k
アルテニア コンサル/ITエンジニア向け 採用ピッチ資料
altenir
0
110
Swift Updates - Learn Languages 2025
koher
2
480
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
6
2.5k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Unsuck your backbone
ammeep
671
58k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Embracing the Ebb and Flow
colly
87
4.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
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อଘ͢ΔΑΓָ