Sharing watchOS widgets in a watch face - watchos

With ClockKit, when sharing a complication to another Apple Watch, watchOS called handleSharedComplicationDescriptors(_:) on the CLKComplicationDataSource. Is there a similar method somewhere in WidgetKit?

Related

How do you incorporate WKInterfaceSKScene into a watchOS Starter Template App?

I'm trying to create a Apple Watch game using Xcode 14.2 and watchOS 9. Getting started creating a watchOS App seems pretty straight forward, and getting started creating a game project via the starter template seems easy enough. Trying to put these two together though doesn't seem to work (or is not straight foward). The documentation specifies limitations on what libraries can be used with watchOS noting WKInterfaceSKScene, but doesn't give any specific examples of how to start out a WatchOS project using this. Additionally nearly every online tutorial that I'm able to find uses Storyboards to create a watchOS game, which does not seem to be supported in the latest version of watchOS or Xcode. Can anyone provide example starter code using the watchOS App project starter that that loads with a small colored square on the screen that moves from left to right using the WKInterfaceSKScene library?
I've tried the Apple documentation, asking ChatGPT for a sample or reference links, and the below tutorials:
Make an Apple Watch Game
How to Setup a Sprite Kit based Watch OS 3 App
Animations on Apple Watch with SpriteKit
Build a Simon game for watchOS

tvOS notification when TV's source/input/HDMI changed

So I have a video app for tvOS and I would like to serve ads on it, but one of the requirements is to not serve them while the TV is not showing them.
All good, but if you change the source of your TV and the Apple TV is still running it will continue to run and not lock or turn off while watching the videos. I thought that the resign active notification or entered background will give me that information, but they do not.
Is there any way to check if tvOS is currently on screen?
I am using tvOS 12 and AVPlayer.

Camera live View in apple watch

On 3/9 apple demo.
They show how to use apple watch to see the camera live view and open the garage door.
I think they should integrate with HomeKit to control the garage door,
but how to get the camera live view??
Do these live view images come from iphone app?
then using bluetooth to pass the image data to watch?
The iOS parent app to the Watch app most likely integrates with HomeKit to control the garage door and the webcam.
In order to display the images from the webcam on the Watch, they are most likely writing those images into the Shared App Group between the iOS app and the Watch Extension using MMWormhole or a similar approach. They then read the images from the App Group and push them to the Watch over bluetooth and WiFi using the WKInterfaceDevice addCachedImage(_:name:) method. Once the image is uploaded to the Watch, it can then displayed on the Watch using a WKInterfaceImage or WKInterfaceGroup background image.

Can watch from watchkit run videos?

Is there any way to run videos on Apple watch using Watchkit within my app? I tried finding any video player, but there was nothing. Thanks!
No - there's currently no way to run video on Apple Watch using Watchkit.
Depending on your desired outcome, you may be interested in the Animation capabilities of WatchKit. By adding a series of images into your Watch App bundle, WatchKit allows you to cycle through them at up to 120 fps or slower when fetching images from iPhone.
You could accomplish some pretty amazing results by animating images, although bare in mind image resources need to be kept to a minimum.
I suggest this tutorial on WatchKit Animation
and this Swift framework for rendering UIViews as image sequences in WatchKit.

Local notifications won't show up on device?

I made an iphone app for my girlfriend and it works fine on my iphone.
On her's iphone too except the local notifications won't show up.
The app also won't show up in the notification center of the iphone settings itself.
I searched for differences in my iphone settings and her's but I can't find the problem.
I did not paste my notification code because I think the problem lays somewhere else..
Any help?
Is she using iOS 8? If so, make certain you call UIApplication's registerUserNotificationSettings: method so the app can display local notifications.
You can determine if it worked by adding a application:didRegisterUserNotificationSettings: method to your app delegate.