watchkit

Detect WatchKit extension presence in app

此生再无相见时 提交于 2019-12-25 05:27:08
问题 I have an app that I want to behave a bit differently when it comes to updates and caching if a WatchKit extension is installed on your paired Apple Watch than if it is not. If the watchkit extension has any chance of launching (you have paired a watch and the app is installed) then I want to do more heavy caching. Is there any way I can detect whether an Apple WatchKit Extension is installed on the Apple Watch from my iOS app? Other than setting a flag first time it is launched and hope it

'String' is not identical to 'AnyObject' error

对着背影说爱祢 提交于 2019-12-25 03:07:43
问题 I'm having issues when trying to pass data to my Apple Watch app through NSUserDefaults from my app. Whenever I try to retrieve the array that is stored, I am getting the error 'String' is not identical to 'AnyObject' . I've been trying to figure out a solution but I can't work out what the issue is since I am using the same method elsewhere in my app and it works without issue. Here is what I have in the Apple Watch part: var defaults = NSUserDefaults(suiteName: "group.AffordIt") tempNames =

'String' is not identical to 'AnyObject' error

六眼飞鱼酱① 提交于 2019-12-25 03:07:05
问题 I'm having issues when trying to pass data to my Apple Watch app through NSUserDefaults from my app. Whenever I try to retrieve the array that is stored, I am getting the error 'String' is not identical to 'AnyObject' . I've been trying to figure out a solution but I can't work out what the issue is since I am using the same method elsewhere in my app and it works without issue. Here is what I have in the Apple Watch part: var defaults = NSUserDefaults(suiteName: "group.AffordIt") tempNames =

reloadRootPageControllers and deep press

你。 提交于 2019-12-25 01:35:40
问题 I'm using reloadRootPageControllers() to remove the top left back button. override func awake(withContext context: Any?) { super.awake(withContext: context) // Configure interface objects here. WKInterfaceController.reloadRootPageControllers(withNames: ["MainController"], contexts: [], orientation: .horizontal, pageIndex: 0) } That works, but when I use a deep press (to show 3 choices) I have the following error: _puic_setViewControllers:animated: called on while an existing transition or

How to detect which sequence is in page segue for WatchKit?

╄→尐↘猪︶ㄣ 提交于 2019-12-24 18:13:50
问题 I'm trying to implement a page-based navigation app using the "Next Page Relationship Segue" described in this tutorial. In the app, both calendar views show the same type of content. The first one contains today's activities, and swiping presents the second one which contains tomorrow's activities. I'd like to re-use the same code (i.e., same class) for both interface controllers. Then, when each loads, I need to know which one it is, in order to display the activities for today or tomorrow.

How to show notification in watch kit , where iPhone app is already showing the notifications

折月煮酒 提交于 2019-12-24 17:29:55
问题 I have an app which shows notification in iPhone. Now I am trying to show the same notification in WatchKit or in iWatch. So do I need to recopy all the functionalities I already did in ViewController and AppDelegate of iPhone app in Watchkit Extension or is there some common interface to notify the watch to show the notification, only UI I need to provide. 回答1: iOS will decide to send notification to apple watch or to iPhone. If your iPhone is active then notification will come to iPhone. If

is it possible to open apple watch app from iphone [duplicate]

蓝咒 提交于 2019-12-24 17:25:21
问题 This question already has answers here : Open WatchKit application from iOS (5 answers) Closed 3 years ago . I was just wondering if there's is any way to start an apple watch application from iphone app.i.e, suppose if i had developed an i-phone app which displays calories burned, by clicking on startworkout and had a button "Send to watch" which starts the same workout app on the apple watch without user interacting with the watch. I should be able to see the same data getting displayed on

Objective C-Is it possible to connect to BLE devices from iWatch?

旧城冷巷雨未停 提交于 2019-12-24 17:24:32
问题 Is it possible to get the BLE devices and connect to it using Watch Kit extension.In iPhone CoreBluetooth framework is used,what is the framework for iWatch I am new to Watckit.Please help me with some solutions.. 回答1: Core Bluetooth is not currently available on watchOS 2. I'm not sure if this would work for your application, but you could "daisy chain" your connection. You would use core bluetooth to connect your device to your iPhone, and then you could interact with your iPhone using

WCSession error domain code 7005: Device is not Paired

家住魔仙堡 提交于 2019-12-24 14:51:06
问题 By making use of WCSession sendMessage, I am getting ErrorDomainCode 7005 constantly within one of my Projects. I get this error when testing with all simulators and also on real iPhone and paired Apple Watch. Devices are definitely paired. The exact same code works fine for other (newer) projects that I created from scratch together with a Watch Extension. I do have this problem only in an older Project where I have added a watch extension recently. The watch app simply does not communicate

Is the deployment target must be 8.2 when I develop with the WatchKit?

微笑、不失礼 提交于 2019-12-24 14:09:15
问题 Now, the Xcode 6.2 and SDK 8.2 are released. I want to develop the Watch App based on iOS App that the deployment target is 7.0, Must I set the deployment target to 8.2 if I want to develop my Watch App? 回答1: The Base SDK must be 8.2. The Deployment Target can be anything you wish to support. But anyone using your app on a device with iOS 8.1 or earlier won't be able to use it with an Apple Watch. That requires a device running iOS 8.2. If your app only makes sense when used with a watch,