watchos-2

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

WatchOS 2 App fails to launch on device with dyld_fatal_error for my Framework Library not loaded: Image not found

核能气质少年 提交于 2019-12-24 05:18:07
问题 I've just followed the apple transition guide to upgrade my ObjectiveC app to WatchOS 2 https://developer.apple.com/library/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/ConfiguretheXcodeProject.html With the section "Sharing Code Between an iOS App and a watchOS App" describing how to duplicate an existing iOS framework into a WatchOS framework target for use by WatchOS as follows. "If you already have a watchOS 1 app that shares a framework with your iOS app, duplicate

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

Close/Deactivate WCSession

谁都会走 提交于 2019-12-23 17:12:01
问题 I am developing an iPhone app (iOS 9 beta) with watch extension (watchOS 2), and to pass the data from watch to phone I am using WCSession. I have 2 different view controllers using WCSessions, so for each of the controller I am instantiating new WCSession object. For the first view controller it works fine, but when I want to receive messages in second view controller, few initial messages are still being sent to first controller. Is there any way I can deactivate / disable session of first

Phone call with Watch OS2

老子叫甜甜 提交于 2019-12-23 16:34:22
问题 Is it possible to start a call from the watch using Watch OS 2? I have a button in my watch os2 app and I need a way to start a call to a precompiled number from the watch or at least to start the call in the iPhone. Thanks 回答1: Yes it is possible on WatchOS 2: Apps can initiate telephone calls or SMS messages using the openSystemURL: method of the shared WKExtension object. When you open a URL that uses the tel or sms scheme, Apple Watch redirects that URL to the appropriate system app for

Is it safe to share access tokens with Watch Connectivity's updateApplicationContext?

自作多情 提交于 2019-12-23 10:48:12
问题 Is the applicationContext encrypted? Or is it simply stored as an unencrypted plist file? Because if it's the latter, I shouldn't be transferring access tokens using that. 回答1: The communication between the devices is encrypted, as documented in the iOS Security Guide. I haven't seen any documentation on whether the applicationContext storage location is encrypted, but to be safe you could encrypt the token yourself before queueing it to be sent and decrypt when the other device has received

Watchkit new session does not work

ε祈祈猫儿з 提交于 2019-12-23 09:38:30
问题 I have two view controllers in my watch extension.Whenever I call [[WCSession defaultSession] sendMessage:applicationData replyHandler:^(NSDictionary *reply) {} I get response only for the first view controller, and error in my second viewcontroller Error Domain=WCErrorDomain Code=7011 "Message reply failed." UserInfo={NSUnderlyingError=0x79f1f100 {Error Domain=WCErrorDomain Code=7010 "Payload contains unsupported type." UserInfo={NSLocalizedRecoverySuggestion=Only pass valid types.,

How to prevent the Apple Watch from going to sleep?

自作多情 提交于 2019-12-23 07:08:13
问题 We are working on an Apple Watch project, but the watch goes to sleep if uninterrupted with. Is there any way to prevent it from going to sleep? 回答1: As of my knowledge and other searches on this topic, at the moment is no api available to enable or even disable sleep mode for Apple Watch programmatically. 回答2: No-Sleep API Currently, there is no API to disable Apple Watch from going to sleep. You may wait until watchOS 3. Changing Sleep Time By User Any user can go to this path: Settings ->

Passing Dictionary to Watch

一曲冷凌霜 提交于 2019-12-23 04:31:59
问题 I'm trying to pass data from iPhone -> Watch via Watch Connectivity using background transfer via Application Context method. iPhone TableViewController private func configureWCSession() { session?.delegate = self; session?.activateSession() print("Configured WC Session") } func getParsePassData () { let gmtTime = NSDate() // Query Parse let query = PFQuery(className: "data") query.whereKey("dateGame", greaterThanOrEqualTo: gmtTime) query.findObjectsInBackgroundWithBlock { (objects:[AnyObject

WCSession - PayloadTooLarge

 ̄綄美尐妖づ 提交于 2019-12-23 03:06:29
问题 Apple Documentation shows: PayloadTooLarge - An error indicating that the item being sent exceeds the maximum size limit. This type of error can occur for both data dictionaries and files. Available in watchOS 2.0 and later. Does anyone know what the max size limits are for both these methods are for transferring data from the watch to the phone?: func transferUserInfo(_ userInfo: [String : AnyObject]) -> WCSessionUserInfoTransfer and func transferFile(_ file: NSURL, metadata metadata: