I'm setting configuration for a HKWorkout session as follows:
self.configuration = [[HKWorkoutConfiguration alloc] init];
self.configuration.activityType = HKWorkoutActivityTypeSwimming;
self.configuration.locationType = HKWorkoutSessionLocationTypeOutdoor;
self.configuration.swimmingLocationType = HKWorkoutSwimmingLocationTypeOpenWater;
HKWorkoutSession *session = [[HKWorkoutSession alloc] initWithConfiguration:self.configuration error:&error];
if (error)
{
NSLog(@"Error with Healthkit Session: %@", error);
}
if (session == nil)
{
NSLog(@"*** Unable to create the workout session: %@ ***", error.localizedDescription);
abort();
}
I'm using Xcode 8 but for that matter it also appears in the simulators for Xcode 8 beta 3 too. Using Apple Series 2 Watch Simulator of course.
And I get the following error. Is there something that I am doing horribly wrong here or is there another way to test swimming workout sessions?
* Unable to create the workout session: Swimming sessions are not supported on this device *
Swimming workouts cannot be tested on the Apple Watch simulator. You must use Series 2 hardware to test.