Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
tytyty
4,974 PointsPossible to call external methods directly in WatchKit?
Setup:
I have a custom WorkoutSessionManager class that does all the heavy lifting. It does not subclass WKInterfaceController. It only subclasses NSObject and its own WorkoutSessionManagerDelegate. I have a Dashboard class which subclasses WKInterfaceController.
Goal:
My Dashboard class uses a WatchKit force touch menuItem which calls a local saveSession() function. That saveSession() function needs to call an external saveWorkout() function located in WorkoutSessionManager.
Attempts: I have tried various init methods to no avail.
Is it even possible to call external functions from WatchKit extensions?