apple-watch

should existing watchOS apps be updated?

青春壹個敷衍的年華 提交于 2019-12-11 13:14:53
问题 https://developer.apple.com/news/?id=04222016a The above blog post says "all new watchOS apps submitted". In reference to this blog post. Should I updated my existing watchOS 1 app? Can I update my main app with, leaving the watchOS1 app as it is? 回答1: Just confirmed with apple that, its only for new submissions and existing apps can still update it without supporting watchOS2. 来源: https://stackoverflow.com/questions/36852533/should-existing-watchos-apps-be-updated

What is the best practice to call URL in apple watch?

∥☆過路亽.° 提交于 2019-12-11 12:59:00
问题 What is the best practice to call API from Apple watch use sendMessage "watchConnectivity" from Apple watch to iPhone to call the API or use NSURLSession to call the API from the watch itself ? 回答1: Using the NSURLSession API, the device that performs the request is abstracted from the developer. If the phone is available, it will perform the request on the phone and return it to your watch app as if the watch itself performed the request. If the phone is not available, the watch can perform

Know When Cancel Button is Clicked in Apple Watch Modal Interface Controller

自闭症网瘾萝莉.ら 提交于 2019-12-11 12:57:33
问题 Is there a way to know if the cancel button is pressed by the user if the interface controller was displayed modally? Let's say you want to do something before the interface controller is dismissed. 回答1: The only method available is -didDeactivate . This will get called when the screen will disappear or when the app will close. Unfortunately, there is no direct way to know when the cancel button is pressed. 回答2: If you need to do some things when the controller will be dismissed you can also

Passing UIImage from iPhone to Apple Watch results in nil response in watch

独自空忆成欢 提交于 2019-12-11 12:19:16
问题 My watch needs to request an image from the containing app. In the watch's controller, I have: - (void)getOrgLogo { NSString *host = mfaInfo[@"host"]; NSDictionary *getOrgLogoRequest = @{@"request":@"getOrgLogo", @"host":host}; [MyInterfaceController openParentApplication:getOrgLogoRequest reply:^(NSDictionary *replyInfo, NSError *error) { if (error) { ... } else if (replyInfo == nil) { // I am always getting into this block!!! } else { UIImage *orgLogo = replyInfo[@"orgLogo"]; if (orgLogo !=

apple watch CMDeviceMotion is not giving me good readings

我与影子孤独终老i 提交于 2019-12-11 10:04:53
问题 Currently, I am just recording a bunch of motion data and saving it to a file. However, when I plot the data, I am having a hard time believing I am getting the right readings. Here is my watch code: - (IBAction)startStopRecording { if (!recording){ NSLog(@"starting to record"); recording = YES; data = [[NSMutableArray alloc] init]; [self.startRecording setTitle:@"Stop Recording"]; if (self.motionManager.deviceMotionAvailable) { [self.motionManager startDeviceMotionUpdatesToQueue:

ClockKit CLKComplicationDataSource missing backward events

爷,独闯天下 提交于 2019-12-11 06:42:27
问题 I write a test app with complications support For some reason clock faces presenting only 1-2 backward events, but I can see in logs 10-15 events before current date. And when I return an empty array for forward events all my backward events start showing in clock face. Here is my function func getTimelineEntriesForComplication(complication: CLKComplication, beforeDate date: NSDate, limit: Int, withHandler handler: (([CLKComplicationTimelineEntry]?) -> Void)) { var entries:

Using multiple hosting controllers in SwiftUI on WatchOS

回眸只為那壹抹淺笑 提交于 2019-12-11 05:25:33
问题 I'm trying to use multiple WKHostingController in a SwiftUI WatchOS project. I want to be able to go from one Controller to 3 controllers. The user will press a button in the first ContentView(1) (That is paired with HostingController(1) ) that will then navigate them to the middle controller in the 3-grouped set HC3 (or HostingController3 , with Identifier HC3 ) The Code is as follows: struct ContentView: View { var body: some View { VStack{ NavigationLink(destinationName: "HC3"){ Text("Go

How to pop back to root view from a 2nd view?

可紊 提交于 2019-12-11 03:04:17
问题 I have connected 3 views (root, 1st, 2nd) together using 2 modal segues in apple watch storyboard. 1) In root view: Once the "save" button is pressed, 1st modal view will be displayed 2) In 1st modal view: Once the "500" button is pressed, 2nd modal view will be displayed. (I can press cancel button to pop back to root view) 3) In 2nd modal view: Once the "saved" button is pressed, I want to go back to root view. How to do this? --> I don't want to press cancel button twice to go back to the

How to put one WKInterfaceLabel below WKInterfaceLabel?

本小妞迷上赌 提交于 2019-12-11 02:35:00
问题 hello all i have new in watchkit development and i have special requirement in which i arrange one WKInterfaceLabel below another WKInterfaceLabel, i try with lots off option like edit postions but WKInterfaceLabel is not set properly can you please help me in this. 1)Position of the first WKInterfaceLabel 2) Position of the second WKInterfaceLabel 3) Actual Design 4)Display in Interface file 回答1: I don't know clearly about your question, but if you want to arrange the label as you want, you

Apple Watch page based interface overflowing on initial controller

匆匆过客 提交于 2019-12-11 02:21:12
问题 While creating an Apple Watch app I noticed something strange. My Initial Controller is always vertically overflowing when using a page based interface. If I remove the 'next-page segue' everything works fine. The strange thing is that even empty controllers will overflow and all the following controllers won't. It seems to appear on the initial controller only. Is there someway to stop this vertical overflow? 回答1: I just verified @Ashraf's findings...this appears to be a regression with the