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
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
580
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
10XにおけるData Contractの導入について: Data Contract事例共有会
10xinc
5
610
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
OCI Network Firewall 概要
oracle4engineer
PRO
0
4.1k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
Amazon Personalizeのレコメンドシステム構築、実際何するの?〜大体10分で具体的なイメージをつかむ〜
kniino
1
100
強いチームと開発生産性
onk
PRO
34
11k
Featured
See All Featured
The Language of Interfaces
destraynor
154
24k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Code Review Best Practice
trishagee
64
17k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Six Lessons from altMBA
skipperchong
27
3.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
KATA
mclloyd
29
14k
How to Ace a Technical Interview
jacobian
276
23k
The Pragmatic Product Professional
lauravandoore
31
6.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
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 ࢀߟαΠτ ͪΌΜͱӫཆΛͱΖ͏