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
About HealthKit nutrition
Search
coe
November 14, 2023
Technology
0
340
About HealthKit nutrition
potatotips #85 iOS/Android開発Tips共有会
coe
November 14, 2023
Tweet
Share
More Decks by coe
See All by coe
すべてのヘルスケアデータを紐解く.pdf
coe
0
2.1k
Kotlin Dynamic type
coe
0
290
iOSDC 2023 Web in tvOS and watchOS
coe
1
540
iOSDC 2023 Push To Talk
coe
1
1.7k
iOSDC手で触れずにアプリを動かす技術
coe
1
1.4k
iOSDC令和時代のXML処理を考える
coe
3
2.1k
iOSDC 2021 Restore
coe
6
1.8k
詳解Storyboard
coe
7
3.4k
あなたの知らない連絡先の世界
coe
15
8k
Other Decks in Technology
See All in Technology
強いチームと開発生産性
onk
PRO
35
11k
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1.1k
組織成長を加速させるオンボーディングの取り組み
sudoakiy
2
210
SRE×AIOpsを始めよう!GuardDutyによるお手軽脅威検出
amixedcolor
0
170
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
『Firebase Dynamic Links終了に備える』 FlutterアプリでのAdjust導入とDeeplink最適化
techiro
0
130
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
Featured
See All Featured
Docker and Python
trallard
40
3.1k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
The Cult of Friendly URLs
andyhume
78
6k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
420
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
ڧ ͪΌΜͱӫཆΛͱΖ͏ QPUBUPUJQTJ04"OESPJE։ൃ5JQTڞ༗ձ
ͪΌΜͱӫཆΛͱΖ͏
ͪΌΜͱӫཆΛઁΖ͏
ͪΌΜͱӫཆΛઁΖ͏
ͪΌΜͱӫཆΛऔΖ͏
ӫཆΛͱΔ )FBMUI,JU OVUSJUJPO
wJ04ΤϯδχΞ wͪΐͬͱ͚ͩ"OESPJE wגࣜձࣾ"NB[JB wौ୩۠ೆฏொ൪ ߸"1-"$&ौ୩ೆฏ ' ڧ
Ͱ
ͪΌΜͱӫཆΛͱΖ͏
ͪΌΜͱӫཆΛͱΖ͏ ʮࢲɺJ1BE͔ͩΒ )FBMUI,JUؔͳ͍Ͷʯ
IUUQTXXXBQQMFDPNKQJQBEPTJQBEPT
ӫཆͷऔΓํ
ӫཆͷऔΓํ ͪΌΜͱӫཆΛͱΖ͏
ӫཆͷऔΓํ ͪΌΜͱӫཆΛͱΖ͏ let store = HKHealthStore() // ͱΓ͍ͨӫཆૉΛܾΊΔ let dietaries:
Set<HKQuantityType> = [ .init(.dietaryEnergyConsumed), .init(.dietaryCarbohydrates), .init(.dietaryProtein), .init(.dietaryMolybdenum), ] // ݖݶΛͱΔ try await store.requestAuthorization(toShare: dietaries, read: dietaries) // อଘ͢Δ try await store.save(HKObject)
ӫཆͷऔΓํ ͪΌΜͱӫཆΛͱΖ͏ let store = HKHealthStore() // ͱΓ͍ͨӫཆૉΛܾΊΔ let dietaries:
Set<HKQuantityType> = [ .init(.dietaryEnergyConsumed), .init(.dietaryCarbohydrates), .init(.dietaryProtein), .init(.dietaryMolybdenum), ] // ݖݶΛͱΔ try await store.requestAuthorization(toShare: dietaries, read: dietaries) // อଘ͢Δ try await store.save(HKObject)
w )FBMUI,JUετΞʹอଘͰ͖ΔσʔλΛද͢DMBTT w ΠϯελϯεΛ࡞ΒͣαϒΫϥεΛར༻͢Δ w ),$BUFHPSZ4BNQMF w ),2VBOUJUZ4BNQMF w ),$PSSFMBUJPO
w ),8PSLPVU ),0CKFDU ͪΌΜͱӫཆΛͱΖ͏
),0CKFDU ͪΌΜͱӫཆΛͱΖ͏ let molybdenum = HKQuantitySample(type: .init(.dietaryMolybdenum), quantity: .init(unit: .gramUnit(with:
.micro), doubleValue: 85), start: .now, end: .now) try await store.save(molybdenum)
ͪΌΜͱӫཆΛͱΖ͏ ),0CKFDU
ͪΌΜͱӫཆΛͱΖ͏ ),0CKFDU Αʔ͠ɺϞϦϒσϯΛЖH ৯ͨͧʔ
ͪΌΜͱӫཆΛͱΖ͏ let correlation = HKCorrelation(type: .init(.food), start: .now, end: .now,
objects: .init(arrayLiteral: HKQuantitySample(type: .init(.dietaryMolybdenum), quantity: .init(unit: .gramUnit(with: .micro), doubleValue: 85), start: .now, end: .now), HKQuantitySample(type: .init(.dietaryEnergyConsumed), quantity: .init(unit: .largeCalorie(), doubleValue: 717), start: .now, end: .now), HKQuantitySample(type: .init(.dietaryCarbohydrates), quantity: .init(unit: .gram(), doubleValue: 112), start: .now, end: .now), HKQuantitySample(type: .init(.dietaryProtein), quantity: .init(unit: .gram(), doubleValue: 18), start: .now, end: .now)), metadata: [HKMetadataKeyFoodType: "ڇက"]) try await store.save(correlation) ),$PSSFMBUJPOͰؔ࿈͚
w )FBMUI,JUͷɺهͰ͖ΔҰͭͷܕͷྔΛද͢ w ֤छӫཆEJFUBSZ ӳޠͰදͤΒΕΔ w EJFUBSZ7JUBNJO"Ϗλϛϯ" w EJFUBSZ*SPOమ ӫཆͷ),2VBOUJUZ5ZQF*EFOUJ
fi FS ͪΌΜͱӫཆΛͱΖ͏
͔ΜͨΜʂ
ҙ͖͢ӫཆૉ
ͪΌΜͱӫཆΛͱΖ͏ ҙ͖͢ӫཆૉ
w φτϦϜ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w φτϦϜ w EJFUBSZ/BUSJVN ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w φτϦϜ w EJFUBSZ4PEJVN w φτϦϜιδϜ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ΧϦϜ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ΧϦϜ w EJFUBSZ1PUBTTJVN w ΧϦϜϙλγϜ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w Ϗλϛϯ#⒪ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w Ϗλϛϯ#⒪ w EJFUBSZ3JCP fl BWJO w Ϗλϛϯ#⒪ϦϘϑϥϏϯ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w Ϧϯ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
None
w Ϧϯ w EJFUBSZ3JO ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
None
w Ϧϯ ྜྷ w EJFUBSZ1IPTQIPSVT ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ਫ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ਫ w EJFUBSZ8BUFS ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ਫ w EJFUBSZ8BUFS w ొ͢Δͱ͖ɺମੵͰొ͠ͳ͍ͱΫϥογϡ͢Δ w ࠓ·Ͱͷӫཆૉ࣭ྔͰొ͢Δ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ࢷ࣭ w ̏େӫཆૉͷҰͭ w ຊͰදࣔٛ͋Γ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
None
w ࢷ࣭ w ̏େӫཆૉͷҰͭ w ຊͰදࣔٛ͋Γ w )FBMUI,JUʹࢷ࣭ͱ͍͏߲ͳ͠ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ࢷ࣭ w ̏େӫཆૉͷҰͭ w ຊͰදࣔٛ͋Γ w )FBMUI,JUʹࢿ࣭ͱ͍͏߲߲ͳ͠ w EJFUBSZ'BU5PUBM
૯ࢷ ͱͯ͠ొ͢Δ w ૯ࢷ৯ʹؚ·ΕΔࢷ࣭ͷ૯ྔΛද͍ͯ͠Δ w ࢷ࣭ͷ༁ʹ֤छࢷࢎؚ͕·ΕΔ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ৯Ԙ૬ྔ w ຊͰදࣔٛ͋Γ w )FBMUI,JUʹ߲ͳ͠ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w ৯Ԙ૬ྔ w ຊͰදࣔٛ͋Γ w )FBMUI,JUʹ߲ͳ͠ w φτϦϜ EJFUBSZ4PEJVN ͔Βࢉग़Մೳ
w EJFUBSZ4PEJVN NH ৯Ԙ૬ྔ ҙ͖͢ӫཆૉ ͪΌΜͱӫཆΛͱΖ͏
w J1BE04͔ΒϔϧεέΞؚ͕·ΕΔΑ͏ʹͳͬͨ w φτϦϜιδϜ w ΧϦϜϙλγϜ w Ϗλϛϯ#⒪ϦϘϑϥϏϯ w ࢷ࣭૯ࢷ
w φτϦϜ NH ৯Ԙ૬ྔ ·ͱΊ ͪΌΜͱӫཆΛͱΖ͏
w ফඅऀி w ӫཆදࣔʹ͍ͭͯ w IUUQTXXXDBBHPKQQPMJDJFTQPMJDZGPPE@MBCFMJOHOVUSJFOU@EFDMFBSBUJPO w ӫཆදࣔΛͬͯɺ͋ͳͨ৯ԘઁऔྔΛݮΒͤΔ w IUUQTXXXDBBHPKQQPMJDJFTQPMJDZGPPE@MBCFMJOHIFBMUI@QSPNPUJPOQEG
GPPE@MBCFMJOH@DNT@@QEG w ֳϗʔϜϖʔδ w ӫཆදࣔݕ౼ձใࠂॻ w IUUQTXXXDBPHPKQDPOTVNFSIJTUPSZLBCVTPTIJLJPUIFSNFFUJOH EPD@TBOLPVQEG ࢀߟαΠτ ͪΌΜͱӫཆΛͱΖ͏