apple-watch

HKWorkoutSession: Not getting Heart Rate when screen is turned off in watchOS 2

会有一股神秘感。 提交于 2019-12-18 04:23:25
问题 I am using iOS 9 beta 4 and watchOS 2 beta 4. I can't seem to get any heart rate data when the watch screen turns black (locks). I will get a call to applicationWillResignActive and then the heart rate data just stops. It seems that the sensor is deactivating after some time as well (not green anymore), when the screen locks. Anyone else seeing this behavior? I can post my code for initing the WorkoutSession if anyone else getting heart rate data when the screen on the watch is locked. 回答1:

Apple Watch: Status bar not visible after presenting a modal screen from page based navigation

前提是你 提交于 2019-12-18 02:42:58
问题 When i present a modal screen from a page in page based navigation, the whole screen shifts up and the status bar is no longer visible. Here is a gif of the issue: I am using xCode 6.2 version. This was not happening in xCode 6.2 Beta 4.. I am not sure if this is a simulator issue or this will actually happen on a real device too. Does anyone have the same issue? Is there a workaround? I reported a bug to apple (20109240) and it was marked as a duplicate of (19862945), and that one is still

How to get the current location in watchOS 2?

流过昼夜 提交于 2019-12-18 02:00:33
问题 I need to fetch the user current location for the WatchKit App in watchOS 2. How do I do this? 回答1: The other answers are incorrect. You can request location directly on the watch for watch OS2. The available method is called requestLocation . It allows you to request a single location update. E.g. #import <CoreLocation/CoreLocation.h> @interface className : WKInterfaceController<CLLocationManagerDelegate> Then where you want to request location: self.locationManager = [CLLocationManager new]

Open WatchKit application from iOS

眉间皱痕 提交于 2019-12-17 21:13:52
问题 I would like to open WatchKit application to the foreground (or Glance if it is possible) directly from my iPhone. I've been playing with it, but have no success. Maybe someone have found some workarounds? 回答1: So answer is No, you can't open Watchkit App from iPhone . The WatchKit extension can only request the system to launch the parent iPhone app, which it will run in the background. There is currently no support for this to work the other way around. 回答2: Nope, Its not possible as of now

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

别来无恙 提交于 2019-12-17 17:32:12
问题 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:

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

纵然是瞬间 提交于 2019-12-17 17:29:24
问题 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

Passing data back from a modal view in WatchKit

淺唱寂寞╮ 提交于 2019-12-17 11:23:21
问题 When modally presenting, or pushing, an interface controller we can specify the context parameter to pass some data to the new controller as follows. // Push [self pushControllerWithName:@"MyController" context:[NSDictionary dictionaryWithObjectsAndKeys:someObject, @"someKey", ..., nil]]; // Modal [self presentControllerWithName:@"MyController" context:[NSDictionary dictionaryWithObjectsAndKeys:someObject, @"someKey", ..., nil]]; My question is, how can we do the reverse? Say we present a

Debug on real Apple Watch: Application Verification Failed

大兔子大兔子 提交于 2019-12-17 08:55:19
问题 I tried to debug my WatchKit app on a real Apple Watch today. After hitting the Debug button in Xcode, the main iPhone app was installed properly, but the Apple Watch only displayed the message Failed to install xxx, error: Application Verification Failed . The WatchKit app doesn't install. I was aware of this: WatchKit App Rejected for "Failing to Install" , but it didn't help because my Xcode project file is alright. How to make debug work on a real Apple Watch? 回答1: It turns out you also

Debug on real Apple Watch: Application Verification Failed

落花浮王杯 提交于 2019-12-17 08:55:15
问题 I tried to debug my WatchKit app on a real Apple Watch today. After hitting the Debug button in Xcode, the main iPhone app was installed properly, but the Apple Watch only displayed the message Failed to install xxx, error: Application Verification Failed . The WatchKit app doesn't install. I was aware of this: WatchKit App Rejected for "Failing to Install" , but it didn't help because my Xcode project file is alright. How to make debug work on a real Apple Watch? 回答1: It turns out you also

Watchkit , openParentApplication with WatchKit Extension

孤街浪徒 提交于 2019-12-17 06:57:50
问题 First times doesn't work "Null" ( before open App in iPhone ) and some times doesn't work but i want one loop or timer for repeat this request for get result : here is my code - (void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *))reply { // Temporary fix, I hope. // -------------------- __block UIBackgroundTaskIdentifier bogusWorkaroundTask; bogusWorkaroundTask = [[UIApplication sharedApplication]