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
350
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.2k
Kotlin Dynamic type
coe
0
300
iOSDC 2023 Web in tvOS and watchOS
coe
1
560
iOSDC 2023 Push To Talk
coe
1
1.7k
iOSDC手で触れずにアプリを動かす技術
coe
1
1.5k
iOSDC令和時代のXML処理を考える
coe
3
2.2k
iOSDC 2021 Restore
coe
6
1.9k
詳解Storyboard
coe
7
3.5k
あなたの知らない連絡先の世界
coe
15
8.1k
Other Decks in Technology
See All in Technology
ハイテク休憩
sat
PRO
2
140
MLOps の現場から
asei
6
630
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
UI State設計とテスト方針
rmakiyama
2
390
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
12
3.5k
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
540
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
420
C++26 エラー性動作
faithandbrave
2
690
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
160
AIのコンプラは何故しんどい?
shujisado
1
190
生成AIのガバナンスの全体像と現実解
fnifni
1
180
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
243
12k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Typedesign – Prime Four
hannesfritz
40
2.4k
Designing Experiences People Love
moore
138
23k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Rails Girls Zürich Keynote
gr2m
94
13k
Docker and Python
trallard
42
3.1k
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 ࢀߟαΠτ ͪΌΜͱӫཆΛͱΖ͏