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
Share Data Across Extension and App with Realm
Search
Kishikawa Katsumi
May 14, 2015
Programming
1
3.1k
Share Data Across Extension and App with Realm
Share Data Across Extension and App with Realm
Kishikawa Katsumi
May 14, 2015
Tweet
Share
More Decks by Kishikawa Katsumi
See All by Kishikawa Katsumi
浮動小数の比較について
kishikawakatsumi
0
440
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
230
愛される翻訳の秘訣
kishikawakatsumi
3
410
Private APIの呼び出し方
kishikawakatsumi
3
1k
iOSでSVG画像を扱う
kishikawakatsumi
0
230
Build your own WebP codec in Swift
kishikawakatsumi
2
1.9k
iOSDC 2024 SMBファイル共有をSwiftで実装する
kishikawakatsumi
1
310
Enhancing Applications with Accessibility API
kishikawakatsumi
3
5.4k
Mastering SwiftSyntax
kishikawakatsumi
4
7.7k
Other Decks in Programming
See All in Programming
飯MCP
yusukebe
0
410
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.6k
Coding as Prompting Since 2025
ragingwind
0
110
20260320登壇資料
pharct
0
140
PHPのバージョンアップ時にも役立ったAST(2026年版)
matsuo_atsushi
0
270
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
270
Symfonyの特性(設計思想)を手軽に活かす特性(trait)
ickx
0
100
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
700
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
190
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
440
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
190
Codex の「自走力」を高める
yorifuji
0
1.3k
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
260
The Language of Interfaces
destraynor
162
26k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Writing Fast Ruby
sferik
630
63k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Designing for humans not robots
tammielis
254
26k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.6k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
250
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]; } }];