apple-watch

Running Apple Watch in iOS simulator issue

不羁的心 提交于 2019-12-29 05:53:12
问题 I'm trying to run the Apple WatchKit Catalog example code in iOS simulator. But i have always Apple Watch simulator disabled. What i have to do? 回答1: Apple Watch is only supported with iPhone 5 and newer phones. Make sure you are running a simulated device that supports pairing with an Apple Watch. 回答2: Go here and click on your app name, in my case it is "watch kit test" Then click on edit scheme and then this view should show up. Make sure to go to executable and click on "yourappname.app

Running Apple Watch in iOS simulator issue

馋奶兔 提交于 2019-12-29 05:53:09
问题 I'm trying to run the Apple WatchKit Catalog example code in iOS simulator. But i have always Apple Watch simulator disabled. What i have to do? 回答1: Apple Watch is only supported with iPhone 5 and newer phones. Make sure you are running a simulated device that supports pairing with an Apple Watch. 回答2: Go here and click on your app name, in my case it is "watch kit test" Then click on edit scheme and then this view should show up. Make sure to go to executable and click on "yourappname.app

Apple watch simulator issue

我只是一个虾纸丫 提交于 2019-12-29 05:45:10
问题 I am trying to debug and run the app on apple watch simulator. I have tried by using different target for notification, Glance and Watch app but apple simulator don't shows any thing.. It stuck in waiting for attach process of extension. I just see a black screen for the Apple Watch Simulator. What did I do wrong? How to overcome this issue ? 回答1: I had the same issue. The only thing that helped was to delete and recreate the target scheme. 回答2: This post from the dev forums solved my issue.

Apple Watch notification issue: WatchKit error - unable to find interface controller class to instantiate

坚强是说给别人听的谎言 提交于 2019-12-29 02:08:05
问题 I am getting the following error when I am trying to push my notification controller dynamically. 2015-03-30 13:18:53.324 MyApp WatchKit Extension[79826:1951724] Took too long to show custom notification. Falling back to static. 2015-03-30 13:26:13.831 MyApp WatchKit Extension[79826:1957863] WatchKit error - unable to find interface controller class '_TtC26MyApp_WatchKit_Extension19InterfaceController' to instantiate I heard there might be a glitch, but as far as I am concern it is only

Page Based “reloadRootControllersWithNames:” on launch loop?

 ̄綄美尐妖づ 提交于 2019-12-28 15:28:27
问题 - (void)awakeWithContext:(id)context { [super awakeWithContext:context]; [WKInterfaceController reloadRootControllersWithNames:@[@"pageOne", @"pageTwo"] contexts:nil]; } Following Apple's guidelines Call this method to reload the pages in your app’s page-based interface. At launch time, you use this method to customize the set of pages you want displayed. at launch time, only results in a loop. With each reload calling awakeWithContext or will Activate or init again and again. Is there a

Pass text from iOS label to WatchOS label - swift-

倾然丶 夕夏残阳落幕 提交于 2019-12-25 16:44:27
问题 I've a problem, with my app.. I try to follow some guide like Passing data to Apple Watch app , but I'm not sure it will fit for my case. I've some label with text on my iOS app, then I want to show this text on my watchOS app label, and I don't know which is the best way to pass this text and keep it synchronized with the iOS app.. Thanks a lot for your help! 回答1: Since watchOS2, you don't have any built in function for communicating between the iOS and watchOS app than the WatchConnectivity

Retrieve user defaults information from an Apple Watch

久未见 提交于 2019-12-25 09:28:59
问题 I have an iPhone and an Apple Watch paired together, and there are some values stored in the user defaults of the phone. I want my Apple Watch to be able to retrieve that stored information somehow and bring it back to the Watch. What is the best method of achieving this with Swift? 回答1: Since watchOS2 , you don't have any built in function for communicating between the iOS and watchOS app other than the WatchConnectivity framework. Due to the fact that Watch apps are no longer considered App

Apple Watch Device crashing with SandboxViolation deny(1) network-outbound

我只是一个虾纸丫 提交于 2019-12-25 08:00:05
问题 Im having an issue on the Apple Watch when making network calls. It works fine on the simulator but when deployed to the device I see this in the device logs: MyAppleWatch kernel(Sandbox)[0] : SandboxViolation: MyWatchApp(203) deny(1) network-outbound /private/var/run/mDNSResponder The code for making the call is done using refit and works on the simulator so I would imagine it is not the cause but I will post it if necessary. I have set these values in the Info.plist of the WatchExtensionApp

HKSampleQuery will only return values from past 7 days?

谁说胖子不能爱 提交于 2019-12-25 01:54:07
问题 This is a WatchOS App. Through testing, it appears as though this code will only return any bodyweight values that I manually add to the health app that are less than 1 week old. Is this intended? Ways around? func getUserBodyMass(completion: @escaping (HKQuantitySample) -> Void) { guard let weightSampleType = HKSampleType.quantityType(forIdentifier: .bodyMass) else { print("Body Mass Sample Type is no longer available in HealthKit") return } //1. Use HKQuery to load the most recent samples.

Read Heart Rate in Apple Watch Series 3 without creating an app on the Watch

£可爱£侵袭症+ 提交于 2019-12-24 19:36:53
问题 Is it possible to read/sync the Heart Rate data from Apple watch series 3 without creating a watch app? I want my iPhone app to read data directly from the Apple Watch without having to create an app for the watch too. 回答1: Apple Watch syncs all of its recorded heart rate data (automatically sampled every five minutes while wearing, and more frequently during workout sessions) to the HealthKit store on the companion iPhone. So you can create an iOS app that (with the user's permission) reads