Example project with SwiftUI, Combine and Widgets, using Apple Fitness app UI as the base

Overview

Welcome! wave gif

ℹ️ What is this project?

This project will try to help you understand the basics behind SwiftUI and Combine (+ some Widgets and HealthKit!). It contains different branches that will incrementally add functionality, from the most basic state, to the addition of widgets and more configuration.

🧐 Why did I started this project?

I love Apple Fitness workout views but sadly (as today), those same views are not offered as widgets for the home screen. So I am replicating those ones, and adding the widget-capability myself. By open sourcing it, I thought It could be a great example for other developers to see how to deploy a basic structure of SwiftUI-Combine + Widgets and HealthKit with clear and concise code. Feel free to open PR or issues to improve it!

🏋️‍♀️ The workout widgets

More and more views will be included. As of today, workout views are implemented and a example widget is already done:

App demo

🧠 High level design

The main app struct Workout_CompanionApp, contains a WorkoutManager which is responsible of:

  • Gathering HealthKit authorization
  • Gathering HealthKit data
  • Providing that data through @Publishers into anyone observing

The main app inits this WorkoutManager as a @StateObject property that will be injected via environmentObject into the main view tree.

The main view will use specific publishers from the WorkoutManager to feed specific views/widgets down the UI tree. This publishers will emit specifc ViewModels for each view that needs to consume them.

Screenshot 2021-05-10 at 11 43 02

How to connect with me?

  • 🙌🏻 Say hi and add me on my LinkedIn
  • 👾 Dare to challenge me @ Fifa or Warzone!
  • 🐦 Connect on my Twitter

"It was a bright cold day in April, and the clocks were striking thirteen."


Owner
Mario Eguiluz
CTO / Senior Developer / Author
Mario Eguiluz
SwiftUI and Combine based GitHubSearch example.

GitHubSearchWithSwiftUI GitHubSearchWithSwiftUI is an example that using Combine and SwiftUI Receive Results Receive Error SafariViewController ricemi

Taiki Suzuki 189 Nov 6, 2021
SwiftUI & Combine app using MovieDB API. With a custom Flux (Redux) implementation.

MovieSwiftUI MovieSwiftUI is an application that uses the MovieDB API and is built with SwiftUI. It demos some SwiftUI (& Combine) concepts. The goal

Thomas Ricouard 5.8k Nov 24, 2021
An example to-do list app using SwiftUI which is introduced in WWDC19

SwiftUITodo SwiftUITodo is an example to-do list application using SwiftUI which is first introduced in WWDC19 keynote. Requirements Xcode 11 Beta Swi

Suyeol Jeon 664 Nov 23, 2021
SwiftUITodo is an example to-do list application using SwiftUI which is first introduced in WWDC19 keynote.

An example to-do list app using SwiftUI which is introduced in WWDC19

Suyeol Jeon 599 Apr 27, 2021
🖼 Gallery App for Harvest (Elm Architecture + Optics) + SwiftUI + Combine.

?? Harvest-SwiftUI-Gallery Gallery App for Harvest (Elm Architecture + Optics) + SwiftUI + Combine. Examples Todo List Stopwatch GitHub Search TimeTra

Yasuhiro Inami 154 Nov 8, 2021
Currency Converter project coded by SwiftUI and Swift5

SwiftUI-Currency-Converter Currency Converter project coded by SwiftUI and Swift5 Features Implemented with SwiftUI Supports darkmode for sure SwiftUI

Alex.Liu 51 Nov 14, 2021
Recipes app written in SwiftUI using Single State Container

swiftui-recipes-app Recipes app is written in SwiftUI using Single State Container This app implemented as an example of a Single State Container conc

Majid Jabrayilov 461 Nov 10, 2021
Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit.

BioViewer Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit. Feature wish list Open PDB, CIF and FASTA files.

Raúl Montón 6 Nov 15, 2021
📱 An app fully written in SwiftUI showcasing beautiful design and animations.

DesignCode DesignCode is an app fully built using Apple's latest SwiftUI and Combine framework. Beautifully written code that is well intended for eas

null 612 Nov 20, 2021
SwiftUI app to search and showcase SF Symbols 🔎

SF Symbols (SwiftUI 2.0 App) Experimenting with SwiftUI 2.0 whilst creating a practical app to browse the SF Symbols via an iOS/iPadOS app. ????‍⚖️ Di

An Trinh 67 Oct 22, 2021
SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina

SwiftUI MovieDB iOS 13 App SwiftUI MovieDB prototype app built with Xcode 11 Beta & macOS 10.15 Catalina Requirements macOS 10.15 Catalina Xcode 11 Be

Alfian Losari 275 Nov 17, 2021
Animal Crossing New Horizon companion app in SwiftUI

You can now download the app on the App Store! The best Animal Crossing New Horizons companion app! 最高の「あつまれ どうぶつの森」コンパニオンアプリ Animal Crossing New Hori

Thomas Ricouard 1.5k Nov 23, 2021
Simple SwiftUI + CoreData app

Footnote Hello! Before you interact with this repository, please check out our Code of Conduct and Contributing Guidelines. Footnote is a SwiftUI + Co

Cameron Bardell 31 Oct 2, 2021
🍅Pomosh is your next awesome Pomodoro Technique assistant on 📱iOS and ⌚️ WatchOS 🙌. It's native and lightweight. Uses SwiftUI. has a nice tomato icon and also ready for macOS too🔥

?? Pomosh • Pomodoro technique asistant for ?? iOS and ⌚️ WatchOS• Looking for macOS version repo? Pomosh-macOS About ?? Pomosh Is it the first time r

Steven J. Selcuk 45 Nov 13, 2021
A 2048 game writing with SwiftUI.

2048 Game (SwiftUI app) This is a simple game to demonstrate the new SwiftUI framework. Note that the game algorithm may have issues, and this is stil

Cyandev 578 Nov 21, 2021
A Fourier Series visualisation written in Swift/SwiftUI

Fourier Series Visualisation in SwiftUI This little app visualises different Fourier series using epicycles and a graph. The number of functions and t

Simon Stiefel 198 Nov 17, 2021
Craft that perfect SwiftUI button effect 👌🏼

buttoncraft (SwiftUI 2.0 App) Experimenting with SwiftUI 2.0 whilst creating a practical app to craft that perfect button style. ✈️ Testflight https:/

An Trinh 77 Oct 24, 2021
Learning SwiftUI by examples.

SwiftUI MindBlowing ?? Collections of mind-blowing SwiftUI snippets and projects. Why another awesome-swiftui? SwiftUI has come with a blast during an

An Tran 86 Nov 12, 2021
A cross-platform Reddit client built in SwiftUI

A cross-platform Reddit client created in SwiftUI. Get the Public Beta Note: This project is far from complete. It still lacks many features of your t

Carson Katri 1.1k Nov 12, 2021