Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Share Data Across Extension and App with Realm
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kishikawa Katsumi
May 14, 2015
Programming
3.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Share Data Across Extension and App with Realm
Share Data Across Extension and App with Realm
Kishikawa Katsumi
May 14, 2015
More Decks by Kishikawa Katsumi
See All by Kishikawa Katsumi
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
240
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
180
Running Swift without an OS
kishikawakatsumi
0
1.1k
浮動小数の比較について
kishikawakatsumi
0
620
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
280
愛される翻訳の秘訣
kishikawakatsumi
3
500
Private APIの呼び出し方
kishikawakatsumi
3
1k
iOSでSVG画像を扱う
kishikawakatsumi
0
260
Build your own WebP codec in Swift
kishikawakatsumi
2
2.8k
Other Decks in Programming
See All in Programming
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
160
速習iPhone Duo対応
yuukiw00w
1
460
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
550
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
260
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
1k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
230
AIを上手に使っていこうとしたら越境せざるを得なくなった話 〜実践1年で見えた境界を越えなければならない理由と進め方〜 / Crossing borders with AI
tomoyakitaura
4
1.2k
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.2k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
280
SREの越境 / SRE Collaboration
y0hgi
0
180
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Documentation Writing (for coders)
carmenintech
77
5.5k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
280
Docker and Python
trallard
47
4.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Transcript
Share Data Across Extension and App with Realm
http://kishikawakatsumi.com kishikawa katsumi https://github.com/kishikawakatsumi
App Group
App Group
Realm
NSFileManager *fileManager = [[NSFileManager alloc] init]; NSURL *containerURL = [fileManager
containerURLForSecurityApplicationGroupIdentifier:@"group.com.xxx.realm"]; NSString *containerPath = [containerURL URLByAppendingPathComponent:@"test.realm"].path; [RLMRealm setDefaultRealmPath:containerPath]; RLMRealm *realm = [RLMRealm defaultRealm]; [realm transactionWithBlock:^{ NSString *text = ...; __block NSUInteger identifier = 0; [text enumerateLinesUsingBlock:^(NSString *line, BOOL *stop) { Address *address = [[Address alloc] init]; address.address = line; [realm addObject:address]; }]; }];
Memory Usage Limitations on App Extension
24MB?
Ұ෦ͷσʔλ͚ͩڞ༗͢Δ
RLMRealm *realm = [RLMRealm defaultRealm]; [realm transactionWithBlock:^{ NSString *text =
...; __block NSUInteger identifier = 0; [text enumerateLinesUsingBlock:^(NSString *line, BOOL *stop) { Address *address = [[Address alloc] init]; address.address = line; [realm addObject:address]; }]; }]; NSFileManager *fileManager = [[NSFileManager alloc] init]; NSURL *containerURL = [fileManager containerURLForSecurityApplicationGroupIdentifier:@"group.com.xxx.realm"]; NSString *containerPath = [containerURL URLByAppendingPathComponent:@"test.realm"].path; RLMRealm *sharedRealm = [RLMRealm realmWithPath:containerPath]; [sharedRealm transactionWithBlock:^{ for (int i = 0; i < 10; i++) { Address *address = addresses[i]; Address *clone = [[Address alloc] initWithValue:address]; [sharedRealm addObject:clone]; } }];