Awesome Open Source
Awesome Open Source


What is it?

Workout Wotch is a mobile application (iOS and Android, with the vast majority of the code platform-agnostic) that allows users to have their exercise programs dictated to them. It alleviates them of the need to count sets and reps, and can provide them with timing information for exercises that require a certain tempo.

Workout Wotch provides two screens. The first allows users to select an exercise program, and the second allows the user to control the playback of an exercise program:


No ability to edit exercise programs is provided within the app. Instead, changes can be made outside the app by editing a text file. Once saved, the app will automatically refresh with the changes made. See below for details.

How do I use it?

First, you will need to clone and build the code. Once built, you have a choice to make: whether to run with, or without, cloud integration.

Running without Cloud Integration

Running without cloud integration can save you some setup hassle for iOS, but does not give you the ability to dynamically modify your exercise documents. Instead, the exercise documents available in the application will come from a "hard-coded" file.

To run without cloud integration, enable the CannedExerciseDocumentService by opening the AndroidCompositionRoot.cs or iOSCompositionRoot.cs file depending on your platform. Ensure the indicated line is uncommented.

If you want to make changes to the exercise document, you'll need to modify the DefaultExerciseDocument.mkd file in the WorkoutWotch.Services project. See writing exercise programs for details on the syntax of the document.

Running with Google Drive Integration

  1. Set up API credentials as described here
  2. Make sure the package name in WorkoutWotch.UI.Android matches that in the credentials
  3. Edit the AndroidCompositionRoot.cs file and follow the comments

If it doesn't exist already, Workout Wotch will create a file named Workout Wotch Exercise Programs.mkd in the root of your Google Drive. See writing exercise programs for details on the syntax of the document.

Running with iCloud Integration

If you decide you want the "full Workout Wotch experience" with iOS, you'll need to follow these steps to appease the Apple gods. If you prefer, you can follow the instructions in my video instead.

  1. Log onto the apple developer portal and click on Certificates (or any of the other links down the left hand side).
  2. Click on iCloud Containers and create a new container called WorkoutWotch
  3. Click on App IDs and create a new App ID called WorkoutWotch. Be sure to enable iCloud support (no need for compatibility with Xcode 5) and click Edit to associate the App ID with the WorkoutWotch iCloud container created above
  4. Under Provisioning Profiles, click Development and create a new profile called WorkoutWotch Development. Associate the profile with the WorkoutWotch App ID, with your development certificate, and with your preferred devices. Optionally, you can also create an adhoc distribution profile if you want to deploy the adhoc build to your device
  5. Start Xcode, open Preferences/Accounts and add (or refresh) your Apple ID. Click View Details... and ensure the provisioning profiles you created above are listed within
  6. In Xamarin Studio, open the Entitlements.plist file in the WorkoutWotch.UI.iOS project. Ensure Enable iCloud is checked and add the ID of your iCloud container to the Containers list
  7. Open the settings for the WorkoutWotch.UI.iOS project. Under iOS Application, make sure you have the correct Bundle Identifier. Under iOS Bundle Signing, you should see the new provisioning profile you added in the Provisioning Profile drop-down list. You can leave the selection as Automatic - just as long as the profile is present in the list

Once you've successfully done all that, you should now be able to run the app on your chosen device. The first time it runs it will notice you have no exercise programs document, so it'll create one with a couple of sample exercise programs in there for you.

To edit the exercise programs, open Finder on your Mac and search for a file named Workout Wotch Exercise Programs.mkd under your home directory. If you can't find it, it may be because iCloud has not yet synchronised.

See writing exercise programs for details on the syntax of the document.

Where are the Videos?

The vast majority of the application was built as part of a video series I produced called Building an iOS app with C#. Below is a full list of the videos, grouped by their module. If you prefer, you can also use the YouTube playlist.

Module Video Link
1: Introduction Introduction
2: Architecture Architecture
3: Solution/Project Setup Solution/Project Setup
4: Services Overview
Logger Service
Scheduler Service
State Service
Delay Service
Exercise Document Service
Audio Service
Speech Service
System Notifications Service
5: Models Overview
Event Matcher
Execution Context
Exercise Program
Exercise Programs
Sequence Action
Parallel Action
Wait Action
Say Action
Audio Action
Metronome Action
Break Action
Prepare Action
Typed Event Matcher
Numbered Event Matcher
Parsing Overview
String Literal Parser
New Line Parser
TimeSpan Parser
Wait Action Parser
Say Action Parser
Break Action Parser
Prepare Action Parser
Metronome Action Parser
Action Parser
Action List Parser
Sequence Action Parser
Parallel Action Parser
Numerical Constraint Parser
Exercise Parser
Exercise Program Parser
Exercise Programs Parser
Summary and Demo
6: View Models Overview
Exercise Programs View Model
Exercise Program View Model
Exercise View Model
7: Views Overview
Exercise Programs View
Exercise Program View
8: Conclusion Summary and Demo

What's the Technology Stack?

The app was written on a Mac using C# and the Xamarin tool chain. It is highly reactive - and often functional - in nature. Almost all code is covered by a comprehensive suite of unit tests.

Some of the libraries used are:

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Sharp (278,668
Android (41,045
Ios (19,278
Dotnet (7,758
Application (2,092
Sample (1,913
Xamarin (1,774
Xamarin Android (470
Xamarin Ios (330
Related Projects