Bad_Developer
Bad_Developer

Reputation: 537

Some questions about Apple Watch

I'm started to working with Apple Watch today.
I'm searched on internet about Apple Watch & watchOS 2, but have some stuck while understand all of them (please for give me for bad English, thanks):

1. Can Apple Watch detect shake motion of user when they're shaking their hand? (I mean like shake to change song when play music, shake to change picture?). In iOS I'm using the function motionBegan, motionEnd to detect it. But don't know how to detect this event on apple watch, seem like Apple doesn't mention it on their document. Can you show me how to detect shake event of user?

2. In example, I have an application running on iOS version. How can I create one more version for Apple Watch that can communicate with my iPhone app?

3. Apple say from watchOS 2, the app can run natively without the iphone. But when I'm created a demo app, I'm still need iphone to build & run. Is there anyway to build & run my app in my watch without the phone?

4. I was created an demo app on watchOS 2, which have an button. Now I want whenever I'm pressed on this button the Siri will appear to recognize my voice. Is Apple let me to access Siri from my own app? If yes, how can I do it in my code?

Upvotes: 0

Views: 441

Answers (1)

Philip
Philip

Reputation: 2285

1. You can access a subset of the CoreMotion API on the AppleWatch. But the use of this API is limited to when the AppleWatch app is active. So if the user has your app active on their wrist they could shake and you could get CoreMotion data to detect what you need. Check out the available APIs on CoreMotion here.

2. Don't really understand the question try to clarify a bit. If you are looking for how to send messages between the iOS and watchOS app check out my post here Send messages between iOS and WatchOS with WatchConnectivity in watchOS2

3. Yes AppleWatch apps in WatchOS2 runs natively. But you still need an iOS app to get the AppleWatch app installed. Apple watch is mainly developed to act as a companion to your phone. So when you install an iOS app you get the choice to install the (if it exists) companion AppleWatch app.

4. Oficially, no. You can´t access the Siri API for now.

Upvotes: 2

Related Questions