apple-watch

How to Handle Action Buttons in Push Notifications

让人想犯罪 __ 提交于 2019-11-28 06:01:36
Working on Apple Watch Notifications:- so if i add button in Notification Interface (from object Lib) then the error is : Buttons are not Supported in Notification Interface PushNotificationPayload.apns has the WatchKit Simulator Actions Like This : "WatchKit Simulator Actions": [ { "title": "View", "identifier": "firstButtonAction" } ], and the Simulator Shows this to me Now my Question is, How can I Handle this View Button when send a PushNotification from server, If the aps file contain the action button is the only option for Apple Watch, How to send it from server in Notification

What is the flow for updating complication data for Apple Watch?

大憨熊 提交于 2019-11-28 04:11:46
I've been following a lot of tutorials on the internet to learn how to set up the complication. I have no problem getting the complication set up as expected. Until the initial timeline entries expire. After 12 hours, I do not know how to update it to keep the complication live. I'll share everything I have below and hopefully somebody can help fill me in. Here, I create the variables for my data that I want to display on the complication. struct data = { var name: String var startString: String var startDate: NSDate } The following array is a container for this data. var dataArray = [data]

Apple Watch: dynamic Long Look not shown, when push opened from Notification Center

半城伤御伤魂 提交于 2019-11-28 03:43:38
问题 I implemented a custom dynamic Long Look for push notifications on the Apple Watch. This dynamic long look is shown correctly, when I immediately raise my arm after receiving a push notification. However, if I respond later, and tap on the push notification from within Notification Center on the Watch, only the static long look is shown. Is this normal behavior or am I doing something wrong? How are your dynamic long looks behaving? For clarity here are the steps to reproduce . This will

Notify WatchKit app of an update without the watch app requesting it

心不动则不痛 提交于 2019-11-28 03:36:25
I'm aware of the capabilities of WKInterfaceController openParentApplication and handleWatchKitExtensionRequest methods for the watch app to open the parent app and send/receive data. But how about this... In the instance where the user is using the parent app and performs an action in the parent app (ie changes the color of the background), how would I notify the watch app immediately and perform the relevant action on the watch also? I believe MMWormhole would suffice in this example, is this is the best approach I should take or is there an alternative? Background First off all let's sum up

WatchKit Extension bundle identifiers

前提是你 提交于 2019-11-28 03:15:21
I am trying to build my app but it failed. I am shown the message below. error: WatchKit Extension doesn't contain any WatchKit apps whose bundle identifiers match "com.domain.appname.watchkitapp". Verify that the value of WKAppBundleIdentifier in your WatchKit Extension's Info.plist matches the value of CFBundleIdentifier in your WatchKit App's Info.plist. I have recently changed "com.domain.appname.watchkitapp" to "com.domain.differentappname.watchkitapp" . I cannot find where to change this. Dejan Skledar You have to be careful when changing the bundle identifiers, here's how they should be

Apple Watch - only getting data if app on phone is active

自闭症网瘾萝莉.ら 提交于 2019-11-27 21:43:07
I have developed and deployed our Apple Watch Extension App using the simulator. It's been approved and is available right now on the app store, so Apple are happy! Today I was able to get my hands on a physical watch and have discovered a real problem - I can only interact watch-phone, if the app on my phone is not just open, but also active...thus defeating the object. I am implementing the below method in the appDelegate of the phone app as a proxy to get my live data and return it to the watch. I basically pass in a request to the appDelegate - I check the userInfo for which data should be

WatchKit API for Force Touch / Digital Crown?

ⅰ亾dé卋堺 提交于 2019-11-27 21:33:38
问题 I'm very excited about the new user interaction possibilities introduced by the Apple Watch, among them, Force Touch and Digital Crown. However, I couldn't find mentions of them in the WatchKit API. Are there any ways to receive events from Force Touch / Digital Crown? Is it possible to have custom handlers for the events? 回答1: watchOS 3 adds WKCrownSequencer and WKCrownDelegate to report the state of the digital crown (such as rotational speed), as well as to receive notifications when the

How to check whether iPhone and apple watch are connected

混江龙づ霸主 提交于 2019-11-27 21:13:08
Is there any way to notify user in Apple Watch that the iPhone is now out of range and when it comes back in range. How can we do it in watch extension. Thanks in advance. So on WatchOS 2 that is possible ! You have to do on iPhone side : First : import WatchConnectivity Then : if WCSession.isSupported() { // check if the device support to handle an Apple Watch let session = WCSession.defaultSession() session.delegate = self session.activateSession() // activate the session if session.paired { // Check if the iPhone is paired with the Apple Watch // Do stuff } } I hope It would help you :)

WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3)?

二次信任 提交于 2019-11-27 19:34:19
I just downloaded Xcode 6.3 beta 4, and my WatchKit app now fails to build with an error: Embedded Binary Validation Utility Error error: WatchKit apps must have a deployment target equal to iOS 8.2 (was 8.3) The iOS app and the project actually have a deployment target of 7.1 and always have, but we've been working with the iOS 8.3 SDK for our WatchKit component (using Swift 1.2) without issue using Xcode 6.3 beta 1, 2 and 3. This error only arose with Xcode 6.3 beta 4. Anyone else have this error, and know how to fix it? Select your project settings and go to "TARGETS". Click on your Watch

Watch os 2.0 beta: access heart beat rate

*爱你&永不变心* 提交于 2019-11-27 17:44:25
With Watch OS 2.0 developers are supposed to be allowed to access heart beat sensors.... I would love to play a bit with it and build a simple prototype for an idea I have, but I can't find anywhere info or documentation about this feature. Can anyone point me on how to approach this task? Any link or info would be appreciated Apple isn't technically giving developers access to the heart rate sensors in watchOS 2.0. What they are doing is providing direct access to heart rate data recorded by the sensor in HealthKit. To do this and get data in near-real time, there are two main things you need