Starting Swift

To get started I decided to follow a video tutorial on Youtube that walks through setting up a workout app on an Apple Watch. For this, I am building a Watch App on XCode using Swift/SwiftUI. Apple provides WatchKit and HealthKit imports, which are framework imports specifically designed to develop content for Apple Watches.

The tutorial was really helpful for starting to create screens and learn some of the specifics of Swift (I think it might take me a minute to fully grasp the syntax of Swift), as well as learn some of the features of HealthKit and WatchKit. HeathKit in particular is interesting because it will provide access to user health data — through it you are able to request that data such as current BPM or calories burned are communicated with your watch application.

Inside of the WorkoutManager File we wrote a “request authorization” function to grab information from the healthStore

Here is where I ran into my first issue: needing a developer account in order to access HealthKit data. In order to continue testing this I’ll need to sign up for the Apple Developer Program.

Below is a live preview of what the “SummaryView” of a workout would look like. Each subsection you see is a SummaryMetricView containing a title (TextView) and some sort of value that will eventually reflect user data instead of default values.

Inside of SessionPagingView…when inside of an active workout, there are 3 active tabs:
ControlsView().tag(Tab.controls), MetricsView().tag(Tab.metrics), NowPlayingView().tag(Tab.nowPlaying) 

Leave a Reply

Your email address will not be published.

css.php