0

I've successfully added a StartWorkoutIntent to my watch app for when the action button is pressed, however I need to be notified when the app was opened via the intent. Apple's docs say to implement this handle function below which I have in my Extension Delegate, however when you press the action button it is never called?

  func handle(startWorkout intent: INStartWorkoutIntent,
           completion: @escaping (INStartWorkoutIntentResponse) -> Void) {
        print("WE are called!")
        // Let the app start the workout.
        let response = INStartWorkoutIntentResponse(code: .continueInApp,
                 userActivity: nil)
        completion(response)
    }

This never gets called either:

 func handle(_ userActivity: NSUserActivity) {
        
         if userActivity.activityType == "Start Workout" {
             print("Handle Start Workout called")
         }
    }
GarySabo
  • 5,806
  • 5
  • 49
  • 124

0 Answers0