Home

Awesome

Icon

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:

Animation

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.

ModuleVideoLink
1: IntroductionIntroductionhttp://youtu.be/rpiVOiKdqog
2: ArchitectureArchitecturehttp://youtu.be/kSADWnL1HxU
3: Solution/Project SetupSolution/Project Setuphttp://youtu.be/GQT6L2WpfEc
4: ServicesOverviewhttp://youtu.be/OvbpqFHJRXc
Logger Servicehttp://youtu.be/0Kgp4GigOPE
Scheduler Servicehttp://youtu.be/5l5xXzYWsSI
State Servicehttp://youtu.be/6bEvIoE_rm8
Delay Servicehttp://youtu.be/Ex7ouQIgDWM
Exercise Document Servicehttp://youtu.be/AZ8uzF6at74
Audio Servicehttp://youtu.be/wT06GvzoGFs
Speech Servicehttp://youtu.be/WvW6ZbjWuOk
System Notifications Servicehttp://youtu.be/bvhujyDH0VE
5: ModelsOverviewhttp://youtu.be/gGPHYl1bFBY
Actionhttp://youtu.be/kypi98ur3ZE
Eventhttp://youtu.be/6Igd9v6Ae7c
Event Matcherhttp://youtu.be/4wSZkocu40o
Execution Contexthttp://youtu.be/oIEIcC_t-WA
Exercisehttp://youtu.be/T_dwGiBXuzU
Exercise Programhttp://youtu.be/WhQx7d0i2Tw
Exercise Programshttp://youtu.be/Z23m9V4RV78
Sequence Actionhttp://youtu.be/BZlbV4XxiCY
Parallel Actionhttp://youtu.be/bHuBNTho8FU
Wait Actionhttp://youtu.be/YFzeeR8PUKk
Say Actionhttp://youtu.be/lgYuwaa54SU
Audio Actionhttp://youtu.be/AQ_LRVwieB4
Metronome Actionhttp://youtu.be/QeO9k40c0hc
Break Actionhttp://youtu.be/TzZiCB9hLO4
Prepare Actionhttp://youtu.be/9-S3tyZ9kpc
Typed Event Matcherhttp://youtu.be/ysFaLQp2Ym0
Numbered Event Matcherhttp://youtu.be/UukmAbk-5Ic
Reviewhttp://youtu.be/qHNEc0BVRhc
Parsing Overviewhttp://youtu.be/Wx7FvPESEKs
String Literal Parserhttp://youtu.be/D8SuTLoRlU8
New Line Parserhttp://youtu.be/ugSu3bpEir8
TimeSpan Parserhttp://youtu.be/2pixgW18IpI
Wait Action Parserhttp://youtu.be/_q97aASrB1o
Say Action Parserhttp://youtu.be/RJ6jcyIE9lo
Break Action Parserhttp://youtu.be/5z7UbopQ1H0
Prepare Action Parserhttp://youtu.be/6sLKVYKxxxc
Metronome Action Parserhttp://youtu.be/4jZkNy5pc6s
Action Parserhttp://youtu.be/91PUhKLjuBY
Action List Parserhttp://youtu.be/tEN7jZq8LhA
Sequence Action Parserhttp://youtu.be/uNqMVS0SFjA
Parallel Action Parserhttp://youtu.be/WcNzHl4mVXM
Numerical Constraint Parserhttp://youtu.be/jhO1ePC2t-c
Exercise Parserhttp://youtu.be/7pE1uRhZL6g
Exercise Program Parserhttp://youtu.be/fKa16E5lUEY
Exercise Programs Parserhttp://youtu.be/kWpS-3ylYA0
Summary and Demohttp://youtu.be/GuuH-2yNrjk
6: View ModelsOverviewhttp://youtu.be/sla6K5J8PVs
Exercise Programs View Modelhttp://youtu.be/dTFyZ2HJqNE
Exercise Program View Modelhttp://youtu.be/2ON9iiCIhRk
Exercise View Modelhttp://youtu.be/IbGpR_LEUkc
Summaryhttp://youtu.be/Z-7_-hpaHE0
7: ViewsOverviewhttp://youtu.be/4VEZnYu6p1I
Infrastructurehttp://youtu.be/Oqa33R8ZIMs
Exercise Programs Viewhttp://youtu.be/I_jherfsRKk
Exercise Program Viewhttp://youtu.be/D6vbwfVF2Rc
Polishhttp://youtu.be/hHEjeu7I4is
8: ConclusionSummary and Demohttp://youtu.be/R8DZPFD-bso

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: