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
HealthKitをSwift4でいじってみた
Search
studioshin
April 21, 2018
Programming
0
540
HealthKitをSwift4でいじってみた
第77回Cocoa勉強会関西
studioshin
April 21, 2018
Tweet
Share
More Decks by studioshin
See All by studioshin
アドフリくんSDKをSwift4で組み込む
studioshin
0
310
8年前にObjective-Cで書いたアプリをゼロからSwift3で書き直した話
studioshin
0
370
Other Decks in Programming
See All in Programming
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
440
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
270
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
210
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
540
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
580
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
510
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
180
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
12k
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
470
RailsのPull requestsのレビューの時に私が考えていること
yahonda
5
2.8k
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
We Have a Design System, Now What?
morganepeng
50
7.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Code Review Best Practice
trishagee
64
17k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Adopting Sorbet at Scale
ufuk
73
9.1k
Building Your Own Lightsaber
phodgson
102
6.1k
Writing Fast Ruby
sferik
627
61k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
RailsConf 2023
tenderlove
29
890
Transcript
HealthKitΛ Swift4Ͱ͍ͬͯ͡Έͨ ୈ77ճ Cocoaษڧձؔ 20184݄14 @studioshin
ࣗݾհ ϑϦʔͰiOS/MacΞϓϦ։ൃͬͯ·͢ ଜ ਅೋ STUDIO SHIN @studioshin Twitter: Cocoaษڧձؔɹද
͜ΜͳຊΛॻ͍ͯ·͢ɻ
)FBMUI,JUͱʁ J04͔ΒՃ͞Εͨɺ݈߁ؔ࿈ͷσʔλΛ औΓѻ͏ϑϨʔϜϫʔΫɻ ʰϔϧεέΞʱΞϓϦΛத৺ʹɺϢʔβʔͷ ɺମॏɺาɺΞΫςϏςΟɺফඅΧϩ ϦʔͳͲΛऔΓ·ͱΊΔσʔλϕʔεɻ σʔλʹαʔυύʔςΟΞϓϦ͔ΒΞΫ ηεՄೳɻʢରԠΞϓϦʹϓϥΠόγʔϙ Ϧγʔͷද͕͚ࣔٛΒΕΔʣ
)FBMUI,JUͬͯΈΑ͏ͱࢥͬͨཧ༝ ࣄͰ)FBMUI,JUରԠΞϓϦΛ࡞Δ͜ͱʹͳͬͨɻ ࣌ؒͳ͔ͬͨͷͰɺӳޠͷυΩϡϝϯτಡΈ ࠐ·ͳ͍ͰຊޠهࣄΛάάͬͯΈͨɻ ৽نΞϓϦͳͷͰɺવJ04 9DPEF 4XJGUͰ࡞Δɻ ৽͍͠Ϋϥεܕ͕ΊͬͪΌଟ͍ͧʂʁ ?@? ղઆهࣄJ04ͱ͔4XJGU͕ଟ͍ʂ
IUUQTEFWDMBTTNFUIPEKQSFGFSFODFTJPTIFBMUILJUBQQ ओʹࢀߟʹ͍ͤͯͨ͞هࣄͪ͜Βɻ
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU )FBMUI,JUͷσʔλ͕ཉ͍͠ʂ
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ),)FBMUI4UPSF )FBMUI,JU͞·ʹɺ Θ͠Λ௨ͯ͠Λ͢Δͷ͡Όʂ ྑ͖ʹ͔Β͑
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ),)FBMUI4UPSF ॻ͖ࠐΈ ಡΈࠐΈ σʔλΛ ಡΈࠐΈ͍ͨʂ ॻ͖ࠐΈ͍ͨʂ
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ),)FBMUI4UPSF ॻ͖ࠐΈ ಡΈࠐΈ Ϣʔβʔ༷ɺ ͍͔͕͍ͨ͠·͔͢ʁ Ϣʔβʔ
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ),)FBMUI4UPSF ॻ͖ࠐΈ ಡΈࠐΈ Ϣʔβʔ ڐՄ ! ͍͍Αʂ
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ॻ͖ࠐΈ ಡΈࠐΈ ),)FBMUI4UPSF
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ॻ͖ࠐΈ ಡΈࠐΈ ),)FBMUI4UPSF ),2VFSZ ),4BNQMF
)FBMUI,JUͷ֓ཁ "QQ )FBMUI,JU ॻ͖ࠐΈ ಡΈࠐΈ ),)FBMUI4UPSF ),0CKFDU ),0CKFDU ඇಉظ
)FBMUI,JUͰѻ͑Δओͳσʔλ ˙Ϣʔβʔͷମσʔλ )FBMUI,JUͷ֓ཁ ˙ଌఆσʔλ ˙ΧςΰϦʔσʔλ ݂ӷܕɺੜ݄ɺੑผɺഽɺंҜࢠ༻ ɺମॏɺาɺ݂ѹɺͳͲʜ ਭɺελϯυ࣌ؒɺੑߦҝɹͳͲʜ
),)FBMUI4UPSF )FBMUI,JUͷอޢྖҬͷΞΫηεΛհ͢ ΔΫϥεɻ σʔλΞΫηεͷڐՄɺಡΈॻ͖͜ͷ ΫϥεΛ௨ͯ͡ߦ͏ɻ )FBMUI,JUͷ֓ཁ
),0CKFDU )FBMUI,JUͱσʔλΛΓऔΓ͢ΔͨΊͷΫ ϥεɻ ಡΈॻ͖ʹԠ͍͔ͯͭ͘͡ͷαϒΫϥε͕ ͋ΓɺͦͷαϒΫϥεΛ௨ͯ͡)FBMUI,JUͱ σʔλΛΓऔΓ͢Δɻ )FBMUI,JUͷ֓ཁ
),0CKFDUͷαϒΫϥε )FBMUI,JU͔ΒσʔλΛಡΈࠐΉࡍʹ༻͢ ΔΫϥεɻσʔλͷछྨʹԠ͍͔ͯͭ͘͡ ͷαϒΫϥε͕͋Δɻ )FBMUI,JUͷ֓ཁ ),2VFSZ
),0CKFDUͷαϒΫϥε ),)FBMUI4UPSFʹσʔλΛ͍߹ΘͤΔΫϥεɻ )FBMUI,JUͷ֓ཁ ),2VFSZͷओͳαϒΫϥε ),4BNQMF2VFSZ ),4UBUJTUJDT2VFSZ ౷ܭσʔλΛऔಘ͢ΔͨΊͷΫϥεɻ ),4UBUJTUJDT$PMMFDUJPO2VFSZ ࿈ଓͨ͠౷ܭσʔλΛऔಘ͢ΔͨΊͷΫϥεɻ
),0CKFDUͷαϒΫϥε )FBMUI,JUʹσʔλΛॻ͖ࠐΉࡍʹ࡞͢Δ ΫϥεɻσʔλͷछྨʹԠ͍͔ͯͭ͘͡ͷ αϒΫϥε͕͋Δɻ )FBMUI,JUͷ֓ཁ ),4BNQMF
),0CKFDUͷαϒΫϥε ྔͰද͞ΕΔσʔλΛѻ͏ɻ )FBMUI,JUͷ֓ཁ ),4BNQMFͷओͳαϒΫϥε ),2VBOUJUZ4BNQMF ),$BUFHPSZ4BNQMF ΧςΰϦʔͰද͞ΕΔσʔλΛѻ͏ɻ
),6OJU ୯ҐΛද͢Ϋϥεɻ ηϯνϝʔτϧɺάϥϜɺΧϩϦʔɹͳͲʜ )FBMUI,JUͷ֓ཁ ),0CKFDU5ZQF σʔλͷछྨΛද͢Ϋϥεɻ ɺମॏɺڑɺาɹͳͲʜ ͜ΕΒͷΫϥεɺαϒΫϥεͰѻ͏σʔλΛ ಛఆ͢Δɻ
)FBMUI,JUରԠΞϓϦͷ࡞Γํ "QQ*%༗ޮαʔϏεͰ)FBMUI,JUʹνΣοΫΛೖΕΔɻ
)FBMUI,JUରԠΞϓϦͷ࡞Γํ $BQBCJMJUJFTͰ)FBMUI,JUΛ0/ʹ͢Δɻ શͯʹνΣοΫ͕͘ ͷΛ֬ೝʂ
)FBMUI,JUରԠΞϓϦͷ࡞Γํ ιʔείʔυʹ)FBMUI,JUΛΠϯϙʔτ͢Δɻ import UIKit import HealthKit class ViewController: UIViewController {
override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
)FBMUI,JUରԠΞϓϦͷ࡞Γํ *OGPQMJTUʹ)FBMUI,JUͷΩʔΛه͢Δɻ LFZ/4)FBMUI4IBSF6TBHF%FTDSJQUJPOLFZTUSJOH6TF)FBMUI,JUTUSJOH LFZ/4)FBMUI6QEBUF6TBHF%FTDSJQUJPOLFZTUSJOH6TF)FBMUI,JUTUSJOH
͜ΕͰجຊతͳ ४උྃʂ