apple-watch

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 }

Developer use of “Taptic Engine” on Apple Watch

吃可爱长大的小学妹 提交于 2019-12-19 05:23:09
问题 According to Apple's press info about the release of iOS 8.2 and Xcode 6.2 found here, they mention developers being able to use the new technologies presented with the Apple Watch: With the iOS 8.2 beta SDK, developers can now start using WatchKit to create breakthrough new apps, Glances and actionable notifications designed for the innovative Apple Watch interface and work with new technologies such as Force Touch, Digital Crown and Taptic Engine . After combing through the WatchKit

Not able to set custom fonts in WatchKit

大憨熊 提交于 2019-12-19 04:14:07
问题 I am trying to set Roboto font and have added as target for watch kit extension, but it is still coming as nil. Can we set custom fonts in watch kit. 回答1: Yes, you can use custom fonts in WatchKit https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/TextandLabels.html 回答2: Its worked for me.. Using following Codes. Add the custom Font to both WatchKit Extension and WatchKit App target Info.plist Now you write the code following way,

How can I change the label “Cancel” from modal segue in Apple Watch

时光怂恿深爱的人放手 提交于 2019-12-18 18:53:58
问题 How to change the label appearing at the top left corner that says "Cancel" when I open a modal view... I would like it to be a button with an image. 回答1: The label Cancel is the default 'title' of a modally presented WKInterfaceController, which appears on the Apple Watch status bar. Replacing the title with an image It is not possible to hide the status bar, nor is it possible to display an image in the status bar, neither as part of this link nor to replace this link. Options to set modal

WatchKit App won't compile: “error: WatchKit Extension doesn't contain any WatchKit apps”

谁说胖子不能爱 提交于 2019-12-18 12:24:02
问题 There are several posts on this issue but none of the proposed solutions work in my case. I am trying to integrate the WatchKit into a simple, sample app (I've tried a couple now) by following the instructions provided by Apple. When I compile I get the following error message: "error: WatchKit Extension doesn't contain any WatchKit apps. Verify that the value of WKWatchKitApp in your WatchKit App's Info.plist is set to YES." I have successfully compiled and run the Apple Watch "Catalog"

Aggregated CMPedometerData (iPhone + Watch total count)

只谈情不闲聊 提交于 2019-12-18 09:47:27
问题 My app collects CMPedometerData both on the iPhone and the Watch . iPhone's steps number (both in real time and historical data) are significantly lower than those recorded by the Watch (witch makes sense, since "on device" steps are actually lower when you always wear the Watch while sometimes leaving the phone on the desk). The fact is, the Watch seems to have the aggregated data, or at least since it's the higher step count the most significant data, so I'd like to have those aggregated /

Aggregated CMPedometerData (iPhone + Watch total count)

对着背影说爱祢 提交于 2019-12-18 09:47:11
问题 My app collects CMPedometerData both on the iPhone and the Watch . iPhone's steps number (both in real time and historical data) are significantly lower than those recorded by the Watch (witch makes sense, since "on device" steps are actually lower when you always wear the Watch while sometimes leaving the phone on the desk). The fact is, the Watch seems to have the aggregated data, or at least since it's the higher step count the most significant data, so I'd like to have those aggregated /

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

How to get Apple Watch Unique id or UDID?

这一生的挚爱 提交于 2019-12-18 05:29:10
问题 I want to get Apple Watch unique id. Is there anything available like UDID or unique identifier for developers? 回答1: There should be a way with Xcode 8...but I can't find it. My solution for now: launch "Accessibility Inspector", click "Start inspection follow point" button (the one in the middle, kind of cross-hairs), click in Xcode on top of the UDID value and then copy the UDID from the inspector shown values. 回答2: It turns out you also have to add the UDID of the Apple Watch to the Apple

Apple Watch Images not showing on simulator

霸气de小男生 提交于 2019-12-18 04:52:45
问题 I am working with the apple watch and I would like to just simply set an image in the storyboard. It is a png file and I set it in the storyboard, but it doesn't show up in the simulator. I have tried all of the aspect and fitting options. I believe the view is called a wkinterfaceimage. I have also tried adding programmatically and that does not show up either. Hidden is not checked. Any ideas of what I might be missing? 回答1: If you have your image included as a file in your app's bundle