GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

Building a multidevice workout app

Forums > watchOS

Hi

I'm trying to run the multidevice workout app, presented in WWDC23.

https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/building_a_multidevice_workout_app

There seems to be an error in following function of the workoutManager:

func sendData(_ data: Data) async {
        do {
            // try await session?.sendData(toRemoteWorkoutSession: data) // original line
            try await session?.sendToRemoteWorkoutSession(data: data)
        } catch {
            Logger.shared.log("Failed to send data: \(error)")
        }
    }

session?.sendData(..)seems to be non-existing. does anyone has a clue to solve this? sendToRemoteWorkoutSession doesn't seem to work neither.

Love this new feature!

Cheers

3      

Are you on Xcode 15?

4      

Yes

Xcode: Version 15.0 beta 5 (15A5209g)

iOS 17.0

watchOS 10.0

3      

Hacking with Swift is sponsored by Alex.

SPONSORED Alex is the iOS & Mac developer’s ultimate AI assistant. It integrates with Xcode, offering a best-in-class Swift coding agent. Generate modern SwiftUI from images. Fast-apply suggestions from Claude 3.5 Sonnet, o3-mini, and DeepSeek R1. Autofix Swift 6 errors and warnings. And so much more. Start your 7-day free trial today!

Try for free!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.