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
2k
Kotlin Dynamic type
coe
0
280
iOSDC 2023 Web in tvOS and watchOS
coe
1
530
iOSDC 2023 Push To Talk
coe
1
1.6k
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
MAMを軸とした動画ハンドリングにおけるAI活用前提の整備と次世代ビジョン / abema-ai-mam
cyberagentdevelopers
PRO
1
110
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
250
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
650
APIテスト自動化の勘所
yokawasa
7
4.1k
Figma Dev Modeで進化するデザインとエンジニアリングの協働 / figma-with-engineering
cyberagentdevelopers
PRO
1
430
Java x Spring Boot Warm up
kazu_kichi_67
2
490
「 SharePoint 難しい」ってよく聞くけど、そんなに言うなら8歳の息子に試してもらった
taichinakamura
1
620
Automated Promptingを目指すその前に / Before we can aim for Automated Prompting
rkaga
0
110
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
3
590
急成長中のWINTICKETにおける品質と開発スピードと向き合ったQA戦略と今後の展望 / winticket-autify
cyberagentdevelopers
PRO
1
160
よくわからんサービスについての問い合わせが来たときの強い味方 Amazon Q について
kazzpapa3
0
220
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
480
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
692
190k
Bash Introduction
62gerente
608
210k
Producing Creativity
orderedlist
PRO
341
39k
For a Future-Friendly Web
brad_frost
175
9.4k
The World Runs on Bad Software
bkeepers
PRO
65
11k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Fireside Chat
paigeccino
32
3k
How STYLIGHT went responsive
nonsquared
95
5.2k
How to Ace a Technical Interview
jacobian
275
23k
KATA
mclloyd
29
13k
Visualization
eitanlees
144
15k
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 ࢀߟαΠτ ͪΌΜͱӫཆΛͱΖ͏