watchos-2

Why sending file to watchOS2 simulator from iPhone simulator won't work?

混江龙づ霸主 提交于 2019-12-21 19:47:26
问题 I am trying to copy database from iOS 9 iPhone to watchOS 2 Apple Watch (Both simulators) and, nothing. File/files is/are no where to found. (searched everywhere) I want to transfer database when entering in the application from iPhone to Apple Watch even if only application on iPhone is on(app on watchOS2 is off). What am i doing wrong? +(BOOL)initDatabase{ BOOL ok = NO; NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *err; NSArray *paths =

Can one open a watchOS app from an iOS app?

橙三吉。 提交于 2019-12-20 06:48:19
问题 I know that an apple watch app can launch its parent application in the background to pass data back and forth but can it work the other way around? Can my iOS app launch the related watchOS app? For a bit more insight, I'm trying to accomplish this so that I can monitor data periodically for the sake of notifications. The 70 seconds apple gives me to keep an app active and pulling data from healthKit isn't conducive to an app that provides alerts to users based on changes in behavior. I

Getting server data for the Apple Watch

亡梦爱人 提交于 2019-12-19 07:41:28
问题 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. 回答1: 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

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

为君一笑 提交于 2019-12-19 05:58:09
问题 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 }

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

。_饼干妹妹 提交于 2019-12-19 03:20:11
问题 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 Complication: get Complication data from extension delegate

耗尽温柔 提交于 2019-12-18 12:05:36
问题 I have all the data I need in my WatchKit Extension (passed from the iOS app). I used the data in the WatchKit InterfaceController to fill in a table, which works perfectly. I'm trying to figure out the best way to get that same data in my WatchKit ComplicationController . Currently, in the InterfaceController , the data gets passed in using didReceiveUserInfo : func session(session: WCSession, didReceiveUserInfo userInfo: [String : AnyObject]) { if let beachValue = userInfo["Surf"] as?

MinimumOSVersion error while submitting Apple Watch app [duplicate]

醉酒当歌 提交于 2019-12-18 09:36:35
问题 This question already has answers here : WatchKit app submission failure; MinimumOSVersion (2 answers) Closed 3 years ago . I am trying to submit my app, but am seeing this error message: ERROR ITMS-90455 "Invalid WatchKit App Bundle. The value '2.1' for the MinimumOSVersion key in info.plist in bundle {redacted}.watchkitapp is not supported" I have updated Xcode but it still doesn't work. UPDATE: I have always the same error message with your settings. 回答1: Try to set your minimum os version

How to programmatically open Apple Watch companion app from iOS app

家住魔仙堡 提交于 2019-12-18 07:05:32
问题 I would like to give a hint to the user, that my iOS app supports the Apple Watch. So I would like to link/open the Apple Watch companion app from within my iOS app, very much similar to opening the Settings App using ( [[UIApplication sharedApplication] openURL: [NSURL URLWithString:UIApplicationOpenSettingsURLString]]; ) This shall enable the user to directly navigate to the Watch companion app to setup my app for the watch. I could not find any URL which would open the companion app in

WCSession.sendMessage works 50/50

狂风中的少年 提交于 2019-12-18 05:45:49
问题 Lately, I am working on a project is related to Watch/iPhone communication again. But my code works sometimes and doesn’t work sometimes which is kind of weird to me because I think the code should either work or not. It cannot be 50/50. Therefore, I have no idea what goes wrong. setup WCSession on iPhone: class WatchCommunicationController: NSObject, WCSessionDelegate { var session : WCSession? override init(){ // super class init super.init() // if WCSession is supported if WCSession

HKWorkoutSession: Not getting Heart Rate when screen is turned off in watchOS 2

会有一股神秘感。 提交于 2019-12-18 04:23:25
问题 I am using iOS 9 beta 4 and watchOS 2 beta 4. I can't seem to get any heart rate data when the watch screen turns black (locks). I will get a call to applicationWillResignActive and then the heart rate data just stops. It seems that the sensor is deactivating after some time as well (not green anymore), when the screen locks. Anyone else seeing this behavior? I can post my code for initing the WorkoutSession if anyone else getting heart rate data when the screen on the watch is locked. 回答1: