watch-os-2

Using firebase with WatchKit

妖精的绣舞 提交于 2019-12-01 20:50:30
I am attempting to use the firebase database in my watchKit app. I have developed this feature on my iPhone application but have found it difficult to do the same on my Watch app. When I attempted to import firebase into the VC class in watch app, it is creating an error no such module 'firebase' . Is it possible to use firebase inside a watch app? Sadly there is no Firebase support for watchOS2 and watchOS3 due to the fact that there's no support for CFNetwork in these versions of watchOS and Firebase is highly dependent on this framework. Source (thanks for the link @FrankvanPuffelen in

WatchOS2 WCSession How many delegates can the WCSession have in WatchKitExtension?

倾然丶 夕夏残阳落幕 提交于 2019-12-01 17:35:42
My iOS app sends timely information via the WatchConnectivity framework. The receiving side implements the delegate of WCSession. I have 2 interfaceControllers that need the information sent from the WCSession. One is the glanceInterfaceController and the other is my mainInterfaceController. Can both of them be assigned the delegate and both receive the userInfo or applicationContext sent from my iOS app at the same time? or can there only be one WCSession delegate assigned and my controllers need to get the data from the object that is assigned? Thanks! WCSession only supports a single

WatchOS2 WCSession How many delegates can the WCSession have in WatchKitExtension?

人走茶凉 提交于 2019-12-01 17:04:00
问题 My iOS app sends timely information via the WatchConnectivity framework. The receiving side implements the delegate of WCSession. I have 2 interfaceControllers that need the information sent from the WCSession. One is the glanceInterfaceController and the other is my mainInterfaceController. Can both of them be assigned the delegate and both receive the userInfo or applicationContext sent from my iOS app at the same time? or can there only be one WCSession delegate assigned and my controllers

Using firebase with WatchKit

风格不统一 提交于 2019-12-01 05:39:03
问题 I am attempting to use the firebase database in my watchKit app. I have developed this feature on my iPhone application but have found it difficult to do the same on my Watch app. When I attempted to import firebase into the VC class in watch app, it is creating an error no such module 'firebase' . Is it possible to use firebase inside a watch app? 回答1: Sadly there is no Firebase support for watchOS2 and watchOS3 due to the fact that there's no support for CFNetwork in these versions of

Getting server data for the Apple Watch

空扰寡人 提交于 2019-12-01 04:53:23
I am wondering how to go about designing a watchOS app that depends on getting the latest feed from a server. Would you need to use application context and just have the iPhone push it over in the background using the WatchConnectivity framework or would you use NSURLSession on the Apple Watch itself? Keep in mind this is for watchOS 2. You can use NSURLSession to handle your request. So your request would be native on your watchn. But note that your watch is there to show simple Content to the user. 来源: https://stackoverflow.com/questions/31465130/getting-server-data-for-the-apple-watch

How to stop Speech Recognition (Dictation) in Apple Watch when the user stops speaking?

十年热恋 提交于 2019-12-01 03:52:26
I have succesfully implemented native speech recognition (Dictation) in Apple Watch (WatchOS 2.1, iOS 9.2.1) basically I used this code, with an empty "menu options array": func launchDictation(){ self.presentTextInputControllerWithSuggestions([], allowedInputMode: WKTextInputMode.Plain, completion:{ (results) -> Void in let aResult = results?[0] as? String if(!(aResult == nil)){ print(aResult) print("SHORT ASR COMPLETED") dispatch_async(dispatch_get_main_queue()) { // Update UI } }//end if })//end show voice menu } As it is... the user taps a "Speak button", then a view pops up (showing the

Reading NSUserDefaults in watchOS 2 (I know App Groups doesn't work)

≯℡__Kan透↙ 提交于 2019-11-30 21:43:48
Apple documentation says "Also, iOS automatically forwards a read-only copy of your iOS app’s preferences to Apple Watch. Your WatchKit extension can read those preferences using an NSUserDefaults object..." . https://developer.apple.com/library/prerelease/watchos/documentation/General/Conceptual/WatchKitProgrammingGuide/SharingData.html#//apple_ref/doc/uid/TP40014969-CH29-SW1 But I can't read defaults in my WatchKit app that were saved in my iPhone app, am I doing something wrong? In the WatchKit app, can I even save to (a WatchKit only) defaults, or does that not even work? iPhone Data : let

WatchOS2 WCSession sendMessage doesn't wake iPhone on background

佐手、 提交于 2019-11-30 17:32:11
This is being tested on both Simulator and real physical device iphone5s. I tried to use WCSession sendMessage to communicate from WatchOS2 extension to iPhone iOS9 code. It works well when iphone app is running either in the foreground and background mode. But If I kill the iPhone app (not running app at all), then I always got errorHandler timeout. So Watch cannot communicate with iPhone anymore. "Error Domain=WCErrorDomain Code=7012 "Message reply took too long." UserInfo={NSLocalizedDescription=Message reply took too long., NSLocalizedFailureReason=Reply timeout occured.}". I think it

WatchOS 2: “Cannot Install Watch App” “Error Launching 'TestApp WatchKit App Extension'”

佐手、 提交于 2019-11-30 17:29:58
I am getting a AlertView popup error on iOS every time I try to install a watchOS 2 app in Xcode 7 beta 4: Cannot Install Watch App TestApp is installed on your iPhone, but the TestApp app for Apple Watch is currently unavailable. I've also tried installing the watchOS app through the Apple Watch iOS app, but I get the same error. And when I try to run the watchOS target, I get this: Error Launching 'TestApp WatchKit App Extension' Installation error. Check the iPhone console for more details." I checked the iPhone console and no additional details are there. I've reinstalled Xcode, deleted

WatchOS2 WCSession sendMessage doesn't wake iPhone on background

丶灬走出姿态 提交于 2019-11-30 16:45:59
问题 This is being tested on both Simulator and real physical device iphone5s. I tried to use WCSession sendMessage to communicate from WatchOS2 extension to iPhone iOS9 code. It works well when iphone app is running either in the foreground and background mode. But If I kill the iPhone app (not running app at all), then I always got errorHandler timeout. So Watch cannot communicate with iPhone anymore. "Error Domain=WCErrorDomain Code=7012 "Message reply took too long." UserInfo=