apple-watch

Passing data to Apple Watch app

血红的双手。 提交于 2019-11-27 01:02:50
I am trying to pass data from my app into my Apple Watch app. Basically, I am using the same method as I used for creating the today widget and so I am passing data through NSUserDefaults. The problem is, that when I run my app, the data does not update the labels in the Watch app as I would expect it to. Here is what I have... override init(context: AnyObject?) { // Initialize variables here. super.init(context: context) // Configure interface objects here. NSLog("%@ init", self) var defaults = NSUserDefaults(suiteName: "group.AffordIt") var totalBudgetCalculation = "" if (defaults!

WatchKit Extension bundle identifiers

心不动则不痛 提交于 2019-11-27 00:01:34
问题 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

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

二次信任 提交于 2019-11-26 23:05:55
问题 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

How to check whether iPhone and apple watch are connected

天涯浪子 提交于 2019-11-26 23:01:23
问题 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. 回答1: 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

Watch os 2.0 beta: access heart beat rate

拥有回忆 提交于 2019-11-26 22:36:10
问题 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 回答1: 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

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

家住魔仙堡 提交于 2019-11-26 19:58:18
问题 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

Xcode attach to process doesn't display NSLog

醉酒当歌 提交于 2019-11-26 18:15:28
问题 I'm just getting started with Apple Watch. I found instructions from "Five Minute Watchkit", on getting the iOS app and the watch kit app both running in the simulator and both processes attached to the LLDB debugger. What I do is launch and quit the iOS app to install a current version in the sim. Then I switch to the watchKit scheme and launch that, which displays my watch app UI on the watch simulator. I then launch the corresponding iOS app in the simulator, then user "attach to process"

Invalid Device State - Xcode/iOS Simulator error

假装没事ソ 提交于 2019-11-26 16:38:45
问题 Problem: I cannot simulate an Apple watch interface. Whenever I try and test my Apple watch app on the iPhone 6 simulator, Xcode successfully finishes and builds the app, attempts at opening simulator and fails with an error message which reads 'Invalid Device State'. I believe simulator has a watch simulator that opens along with the compatible iPhone simulator models that can communicate with Apple watch (example: iPhone 6) Although I have yet to see it work. I have built a universal

Passing data to Apple Watch app

删除回忆录丶 提交于 2019-11-26 12:25:40
问题 I am trying to pass data from my app into my Apple Watch app. Basically, I am using the same method as I used for creating the today widget and so I am passing data through NSUserDefaults. The problem is, that when I run my app, the data does not update the labels in the Watch app as I would expect it to. Here is what I have... override init(context: AnyObject?) { // Initialize variables here. super.init(context: context) // Configure interface objects here. NSLog(\"%@ init\", self) var

Is transferCurrentComplicationUserInfo more suitable for complication update?

白昼怎懂夜的黑 提交于 2019-11-26 11:26:06
问题 What is the difference between transferCurrentComplicationUserInfo and transferUserInfo ? I want to send data from my AppDelegate to a clock kit complication. transferCurrentComplicationUserInfo seems to do exactly the same thing as transferCurrentUserInfo . Am I missing something? 回答1: The distinction between these two WCSession methods involve when the data is sent, and whether the watchkit extension is woken up or not. transferCurrentComplicationUserInfo: is specifically designed for