SiriKit, How to display response for start Workout Intent?

↘锁芯ラ 提交于 2019-12-01 06:28:32

Although Apple says here:

You can provide an Intents UI extension if you are supporting intents in the following domains:
Messaging
Payments
Ride booking
Workouts

I think it is quite impossible, because response responsible for open UI is not prepared for this:

Please look at INSendMessageIntentResponseCode for INSentMessageIntentHandling:

public enum INSendMessageIntentResponseCode : Int {


    case unspecified

    case ready

    case inProgress

    case success

    case failure

    case failureRequiringAppLaunch

    case failureMessageServiceNotAvailable
}

and INStartWorkoutIntentResponse for INStartWorkoutIntentHandling:

public enum INStartWorkoutIntentResponseCode : Int {


    case unspecified

    case ready

    case continueInApp

    case failure

    case failureRequiringAppLaunch

    case failureOngoingWorkout

    case failureNoMatchingWorkout
}

For the second one, there is only .continueInApp, and this is exactly what happens here, opposite to the first one where exists: .success and .inProgress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!