wcsession

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

How can watchOS 2.2 app determine if its paired iPhone has switched to another Apple Watch?

依然范特西╮ 提交于 2019-12-23 21:42:43
问题 I'm trying to support the new feature for pairing with multiple watches in my iOS 9.3/watchOS 2.2 app. It seems to be working well, except that I can't figure out how the watchOS app can determine if the paired iPhone has been switched to another Apple Watch. The docs say that the WCSession stays activated from the perspective of the WatchKit extension throughout the switching lifecycle, and from my testing in Xcode, it seems that the watch session reports that the iPhone is also reachable

When to call activateSession() on WCSession object

懵懂的女人 提交于 2019-12-12 11:35:49
问题 I wonder at what point one would call activateSession() on a WCSession object on the watch and on the iOS device. In the documentation it says: Always assign a delegate and activate your session before calling any session-related methods. The session must be configured and activated before sending messages or obtaining information about the state of the connection. At first thought I put my code to initialise the session: if (WCSession.isSupported()) { session = WCSession.defaultSession()

Send dictionary data to apple watch from ios applicaton

和自甴很熟 提交于 2019-12-11 05:47:02
问题 In my app, I have this page named "TicketDetailViewController" in which i have 3 labels and an imageView in which data is displayed from previous page. Now what i want is when i click on my "sendtowatch" button, i want to send the displayed data i.e 3 labels and an imageView to my apple watch where there also i have taken 3 labels and an imageView in its storyboard. The problem is i am using FMDB database for storing and retrieving data. Now on my button click from my IOS app, the displayed

WCErrorCodeDeliveryFailed: Payload could not be delivered

戏子无情 提交于 2019-12-08 14:56:06
问题 I'm working on an app that share data between iPhone and Apple Watch, using WCSession method sendMessage:replyHandler:errorHandler: After implementing that method I get the error like: WCSession _onqueue_notifyOfMessageError:withErrorHandler: errorHandler: YES with WCErrorCodeDeliveryFailed. Error = Payload could not be delivered. import Foundation import WatchKit import WatchConnectivity class ResultInterfaceController: WKInterfaceController, WCSessionDelegate { override func awake

Combining WatchConnectivity and Complications

戏子无情 提交于 2019-12-08 04:57:46
问题 I want my complication to get data from the iPhone via Watch Connectivity. I am using sendMessage Instant Messaging technology. I don't want my iPhone app to be open when I try to get data, so this needs to work in the background. In my ViewController on my iPhone: import UIKit import WatchConnectivity class ViewController: UIViewController, WCSessionDelegate { var session: WCSession! override func viewDidLoad() { super.viewDidLoad() if WCSession.isSupported() { self.session = WCSession

WCSession sendMessage:replyHandler error code 7014 (WCErrorCodeDeliveryFailed)

徘徊边缘 提交于 2019-12-04 09:00:28
问题 I have a Watch OS 2 application that communicates with the iOS app via WCSession method sendMessage:replyHandler:errorHandler: The iOS application reply correctly but time to time I get the error with code 7014 of domain WCErrorDomain : "Payload could not be delivered" It happens more often when the iOS application is not foreground. I do not find any solution of this problem, I hope one of you know a solution to this problem 回答1: For anyone having issues on iOS10 beta 6 and GM, and you are

WCSession sendMessage:replyHandler error code 7014 (WCErrorCodeDeliveryFailed)

大城市里の小女人 提交于 2019-12-03 01:41:48
I have a Watch OS 2 application that communicates with the iOS app via WCSession method sendMessage:replyHandler:errorHandler: The iOS application reply correctly but time to time I get the error with code 7014 of domain WCErrorDomain : "Payload could not be delivered" It happens more often when the iOS application is not foreground. I do not find any solution of this problem, I hope one of you know a solution to this problem For anyone having issues on iOS10 beta 6 and GM, and you are using Swift3, the solution is to change the delegate function header in the iOS app to the following: func

How big can the payload be when sending data via WatchConnectivity?

隐身守侯 提交于 2019-11-28 06:32:42
When sending data using the WatchConnectivity framework, either from the phone to the watch or vice-versa, how big can the payload be before the framework gives me the WCErrorCodePayloadTooLarge error? I couldn't find the answer on Apple's documentation, and there doesn't seem to be much information on this on the internet at this time (in fact, googling WCErrorCodePayloadTooLarge gives me just 4 results). Has anyone tested to try to find the answer to this? If this question doesn't get an answer, I will try to do it myself and post the results. So far, all the information I have is that it

How big can the payload be when sending data via WatchConnectivity?

依然范特西╮ 提交于 2019-11-27 05:40:55
问题 When sending data using the WatchConnectivity framework, either from the phone to the watch or vice-versa, how big can the payload be before the framework gives me the WCErrorCodePayloadTooLarge error? I couldn't find the answer on Apple's documentation, and there doesn't seem to be much information on this on the internet at this time (in fact, googling WCErrorCodePayloadTooLarge gives me just 4 results). Has anyone tested to try to find the answer to this? If this question doesn't get an