user3569109
user3569109

Reputation: 191

WatchOS 2: haptic

I have a question for making Apple Watch App. (using watchOS 2) I'd like to make a Fitness App that is like Apple's "Workout" Watch App.

I tested follow a haptic API in WKInterfaceDevice class.

- (void)playHaptic:(WKHapticType)type;

It was worked in Apple Watch active state. (Apple Watch's screen is On.) But I don't receive any haptic feedback in Apple Watch inactive state. (Apple Watch's screen is Off.)

Q1. I want to receive haptic feedback in background like Workout app.

Q2. And I want to send haptic feedback from iPhone's App to Watch's App in background(using WatchConnectivity).

Could you tell me how to use "playHaptic:"method in background(inactive) state?

Please help!

Upvotes: 2

Views: 297

Answers (1)

Drewf
Drewf

Reputation: 414

Watch apps do not run in the background. Once the user stops interacting with the app and the watch goes blank, the app is suspended. It cannot be invoked by the iOS app. The Workout watch app is a special case.

https://developer.apple.com/library/watchos/documentation/General/Conceptual/WatchKitProgrammingGuide/iOSSupport.html

There is some limited control from the iOS side with notifications. When a notification is sent to the satch, the user can easily open the associated watch app by tapping on the notification.

https://developer.apple.com/library/watchos/documentation/General/Conceptual/WatchKitProgrammingGuide/BasicSupport.html

Upvotes: 0

Related Questions