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.
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 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 should be a straightforward affair. Simply 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.
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.
- Log onto the apple developer portal and click on Certificates (or any of the other links down the left hand side).
- Click on iCloud Containers and create a new container called WorkoutWotch
- 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
- 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
- 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
- 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
- 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.
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.
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: