WatchKit / Apple Watch API: custom length vibrations?

I have a question in preparation for a potential iWatch application. With no experience with iOS apps, the API feels rather complicated and difficult to navigate.

The central part of this project involves sending out bursts of vibration to iWatch - is this even possible or limited to standard vibration “notifications”? And if so, is it known at what speed you can send notifications with vibrations?

I found a possible related topic here on StackO: Is there an API for custom vibrations in iOS? Is this approach applicable to iWatch applications?

Thanks in advance.

+7
ios watchkit
source share
3 answers

There are no existing WatchKit APIs to send vibration patterns to the watch or to trigger vibration other than the default notification. At the moment, your best option is to submit a request for improvement .

+9
source share

There is currently no API for custom tactical feedback. But with watchOS 2.0, you can trigger tactical feedback by providing the WKHapticType option.

 WKInterfaceDevice.currentDevice().playHaptic(WKHapticType.Success) 

Here are the WKHapticType options:

 enum WKHapticType : Int { case Notification case DirectionUp case DirectionDown case Success case Failure case Retry case Start case Stop case Click } 
+14
source share

It’s impossible right now to do what you want to do.
First of all, keep in mind that it’s really possible that you can do what you want to do at the end of this year (At the end of 2014 , Apple published press information stating: “Starting next year, developers will be able to create their own applications for Apple Watch ", http://www.apple.com/pr/library/2014/11/18Developers-Start-Designing-Apps-for-Apple-Watch.html ).

If this is not possible, this is because right now the Apple Watch applications do not actually work on the Apple Watch, but on the iPhone that is paired with it.
When a user touches the icon of your application on the Apple Watch screen, the Apple Watch tells your iPhone to launch the corresponding extension, this extension that will run your code, update the user interface and respond to events, for example, when the user touches a button.
So, to quickly figure it all out, that on the Apple Watch is just the user interface and some resources, and that the iPhone that runs the code you write.

When it’s possible to create completely own applications, Apple is likely to provide frameworks that will allow you to use the Taptic engine and other sensor clocks.

I suggest you check out the separate Apple Developer page for more information about WatchKit:
https://developer.apple.com/watchkit/

Here you will find a video to get started with WatchKit, a link to the Framework and development resources.

+2
source share

All Articles