watchkit

How to Customize the Apple Watch Vertical Scrollbar

不羁岁月 提交于 2021-02-19 05:47:06
问题 I was just thinking, it is not possible at this time to change the color of the Vertical scrollbar in Apple Watch. But I just saw the App on Apple site and here is the screen shot of the app I want to change the color of the scrollbar from default to my desired color as the above picture shows green scrollbar scroller. i found no way to access it, even in WKWindowsFeatures and not accessible in storyboard. Global tint color is just for the -The title string in the status bar -The app name in

iOS Watch app fails to install - WatchKit 1.0 apps are no longer installable on this watchOS version

你说的曾经没有我的故事 提交于 2021-02-11 06:05:54
问题 I have added Watch App target for existing iOS app but I have problem to install it on watch simulator. It always fails with this message This app could not be installed at this time. Domain: IXUserPresentableErrorDomain Code: 1 Failure Reason: Could not install at this time. Recovery Suggestion: WatchKit 1.0 apps are no longer installable on this watchOS version. -- WatchKit 1.0 apps are no longer installable on this watchOS version. Domain: MIInstallerErrorDomain Code: 133 User Info: {

Programatically Set UIImage Animation with WatchKit

前提是你 提交于 2021-02-08 05:25:11
问题 I can't seem to figure out how to programmatically set a new image, via the outlet, and make it start animating. Sequence zeroEntering0.png zeroEntering1.png zeroEntering2.png zeroEntering3.png zeroEntering4.png I imported the sequence of images into the Image.xcassets inside the WatchKit App I can set the image in the interface builder to "zeroEntering" and set animating to "Yes" and it works correctly. However, I want something more dynamic, I need a button press to choose a new animation

Check if user has AppleWatch connected without prompting the watch

眉间皱痕 提交于 2021-02-07 20:53:33
问题 We are using Google Analytics , and want to know how many of our users are in possession of an AppleWatch . I have searched Stack for answers, and the recurring answer is to use this: if WCSession.isSupported() { // check if the device support to handle an Apple Watch let session = WCSession.defaultSession() session.delegate = self session.activateSession() // activate the session if session.paired { // Check if the iPhone is paired with the Apple Watch // Do stuff } } The problem with this

Check if user has AppleWatch connected without prompting the watch

廉价感情. 提交于 2021-02-07 20:52:21
问题 We are using Google Analytics , and want to know how many of our users are in possession of an AppleWatch . I have searched Stack for answers, and the recurring answer is to use this: if WCSession.isSupported() { // check if the device support to handle an Apple Watch let session = WCSession.defaultSession() session.delegate = self session.activateSession() // activate the session if session.paired { // Check if the iPhone is paired with the Apple Watch // Do stuff } } The problem with this

Fullscreen view in watchOS with SwiftUI

对着背影说爱祢 提交于 2021-02-02 03:46:29
问题 I wan't to display a SwiftUI View as fullscreen in watchOS (without the Cancel/Back Button or Clock) I've tried adding a Sprite Kit Scene to the view and also setting the .edgesIgnoringSafeArea(.all) but I'm still able to hide them or put a view under the top bar. 回答1: Unless it's a game, it's not possible to strip out the space at the top, watchOS reserves it so that the time is always visible to the user. 回答2: Turns out it does "work", even with SwiftUI: Using Interface Builder: https:/

Fullscreen view in watchOS with SwiftUI

ε祈祈猫儿з 提交于 2021-02-02 03:44:44
问题 I wan't to display a SwiftUI View as fullscreen in watchOS (without the Cancel/Back Button or Clock) I've tried adding a Sprite Kit Scene to the view and also setting the .edgesIgnoringSafeArea(.all) but I'm still able to hide them or put a view under the top bar. 回答1: Unless it's a game, it's not possible to strip out the space at the top, watchOS reserves it so that the time is always visible to the user. 回答2: Turns out it does "work", even with SwiftUI: Using Interface Builder: https:/

Black screen page on apple watch apps with more that one page

孤者浪人 提交于 2021-01-29 09:51:07
问题 Hi I have created a Watch app which has two pages but when I run it on apple watch and do switch between pages after few seconds one page(sometimes page1 and sometimes page2)goes black and It doesn’t show my buttons, labels nothing. But when I run it on simulator there is no problem everything is fine and also before i add second page to the app It was ok on apple watch too 回答1: I had the same issue and it was due to calling crownSequencer.focus() without a corresponding crownSequencer

Issues implementing navigation from a main controller to page based controllers in WatchOS using SwiftUI

我只是一个虾纸丫 提交于 2021-01-27 20:08:50
问题 I'm trying to do do something like this using SwiftUI. So far I have the ability to go from one main view to a page based views but I cannot scroll between the page views. The storyboard looks like this: As you can see I do not have any segues or next page relationships in the storyboard. I'm implementing those in code in the WKHostingController of HC3 (the middle one of the three). HostingController of HC3 : class HC3: WKHostingController<CV> { override func awake(withContext context: Any?)

What's the equivalent of app delegate file for apple watch app?

余生长醉 提交于 2021-01-27 17:19:48
问题 I want to set the initial view controller for the watch app base on different type of notification received on the watch. But I don't know where's to set it. This is the answer for an iOS app Multiple entry points to a storyboard 回答1: watchOS 2 WKExtensionDelegate is the equivalent of the app delegate, where you can: respond to actionable notifications and manage Handoff transitions. You also use the delegate to respond to life-cycle events, such as the activation and deactivation of your app