watchconnectivity

Is it safe to use updateApplicationContext to send keychain value

左心房为你撑大大i 提交于 2019-12-08 15:05:13
问题 In watchOS 2, there are no more shared keychains. If I want to send a keychain value from the iOS app to the Watch app, is it safe to send it via WCSession updateApplicationContext? 回答1: As per the Apple Security guideline:- Keychain Data Protection Many apps need to handle passwords and other short but sensitive bits of data, such as keys and login tokens. The iOS keychain provides a secure way to store these items. The keychain is implemented as a SQLite database stored on the file system.

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

How to populate table rows, using a [String] array sent from iPhone by Watch Connectivity?

元气小坏坏 提交于 2019-12-08 11:22:23
问题 Basically, it's passing the array fine. It's just when trying to use the enumerated array as the tablerows, it says nil found. PHONE import UIKit import WatchConnectivity class ViewController: UIViewController, WCSessionDelegate { @IBOutlet weak var sendButton: UIButton! var watchSession: WCSession? var arrayCustom = ["thing1", "thing2"] override func viewDidLoad() { super.viewDidLoad() if(WCSession.isSupported()) { watchSession = WCSession.defaultSession() watchSession?.delegate = self

Data transfering from iPhone to iWatch with Watch connectivity framework [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-08 07:07:04
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I want to ask a question about watch connectivity. 1) Is it possible to read data from iPhone when the iWatch app opened. I not want to wait to open iPhone app for transfering data to iWatch. 2) Is it possible to create login screen(to get user input from text fields) on iWatch 3)

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

“Message reply took too long.” - Watch Connectivity Issues with Watch OS 3

我的未来我决定 提交于 2019-12-04 08:13:31
问题 In my project, I use Watch Connectivity to send messages to and from the Watch and iPhone. I can send a message to the phone and receive an array of strings when launching the app, however when using actions I get the following error; Error Domain=WCErrorDomain Code=7012 "Message reply took too long." Here's how things are set up; First, the watch sends a message to the phone and then the phone sends an array of strings to display in a WKInterfaceTable . This sometimes works when loading the

How can I share information between my iOS and Watch apps using WatchConnectivity?

五迷三道 提交于 2019-12-03 13:46:43
问题 [Disclaimer: this question is intended to be a wiki question to answer the frequent questions about sending data between the iOS and watch apps under the watchkit and watch-os tags.] I am developing an Apple Watch app and would like to send data between the iOS app and its WatchKit extension . I have looked at the WatchConnectivity framework, but don't really understand the difference between all of its methods. Which function should I use if I want to be able to send data even when my apps

How to share data using Watch Connectivity when working with Core Data

馋奶兔 提交于 2019-12-03 06:02:34
In my iOS application I use Core Data to store data and a fetch request to create an array of NSManagedObject s to display in a UITableView . On the Watch OS I check if WCSession is supported and active a session, then send the iOS application a message from the watchOS extension. When the iOS application receives the message from the watchOS it should send the array of Objects to the watchOS extension to display the data in the WKInterfaceTable , but I am unsure how to do this. Ultimately what I am trying to achieve is; How to share the array of Objects with the watchOS extension? If the user

“Message reply took too long.” - Watch Connectivity Issues with Watch OS 3

做~自己de王妃 提交于 2019-12-02 21:44:19
In my project, I use Watch Connectivity to send messages to and from the Watch and iPhone. I can send a message to the phone and receive an array of strings when launching the app, however when using actions I get the following error; Error Domain=WCErrorDomain Code=7012 "Message reply took too long." Here's how things are set up; First, the watch sends a message to the phone and then the phone sends an array of strings to display in a WKInterfaceTable . This sometimes works when loading the app. ( I fetch all NSManagedObjects called Items and use their title string properties to store in an

How To Share Data with Watch OS 2 to display in WKInterfaceTable when working with CoreData

核能气质少年 提交于 2019-11-30 16:24:40
I am using WatchConnectivity to try to send data of type NSManagedObject called arrayOfOjects to the Watch. Each object has a string property called title . The InterfaceController on the Watch loads and displays and empty table - as intended because the array is empty, then when the user requests the data it is sent using the didReceiveMessage method on the phone. I am unsure how to add the dictionary array to the objectsArray to display in the WKInterfaceTable . Does anyone know how I can send the data to the watch to display in the table to make changes and sync them back with the phone ?