Skip to content

Instantly share code, notes, and snippets.

@tsheaff
Created August 2, 2016 20:52
Show Gist options
  • Save tsheaff/5de71c1cf53aecb9c85dc7339fc682e2 to your computer and use it in GitHub Desktop.
Save tsheaff/5de71c1cf53aecb9c85dc7339fc682e2 to your computer and use it in GitHub Desktop.
import Foundation
import Intents
//
// INStartWorkoutIntentResponse.h
// Intents
//
// Copyright © 2016 Apple Inc. All rights reserved.
//
@available(iOS 10.0, *)
public enum INStartWorkoutIntentResponseCode : Int {
case unspecified
case ready
case continueInApp
case failure
case failureRequiringAppLaunch
case failureOngoingWorkout
case failureNoMatchingWorkout
}
@available(iOS 10.0, *)
public class INStartWorkoutIntentResponse : INIntentResponse {
// The app extension has the option of capturing its private state as an NSUserActivity and returning it as the 'currentActivity'.
// If the the app is launched, an NSUserActivity will be passed in with the private state. The NSUserActivity may also be used to query the app's UI extension (if provided) for a view controller representing the current intent handling state.
// In the case of app launch, the NSUserActivity will have its activityType set to the name of the intent. This intent object will also be available in the NSUserActivity.interaction property.
public init(code: INStartWorkoutIntentResponseCode, userActivity: NSUserActivity?)
public var code: INStartWorkoutIntentResponseCode { get }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment