Are WatchOS storyboards forbidden now ?

I read in Xcode 14 release notes:

Fixed: WatchKit storyboards are deprecated in watchOS 7.0 and later. Please migrate to SwiftUI and the SwiftUI Lifecycle. (94058186)

And effectively, when adding a WatchOS target to an iOS app as a companion, it is now created as SwiftUI. In Xcode 13 we could still create as WatchKit (storyboard).

That raises a few questions:

  • what will happen to existing apps with companions ? Shall we have soon to redesign Watch part completely from storyboards to SwiftUI ?
  • What is the reason for such a deprecation ? That leads to have code with a part in storyboard the other in SwiftUI. Not ideal situation.
  • Is WatchKit deprecated completely ?

Personal opinion: with some present limitations of SwiftUI (such as in Lists), it will make it pretty hard to get the same flexibility in the designs that we had with WatchKit. I find it a regression not to leave both options possible.

i plan to keep using watchkit for my watchos app, until they force min release of 7 (maybe in a few years, apple really hasnt moved the min target of watchos that much) then i will probably just drop support. No sense of trying to rewrite everything that doesnt get used to justify it anyways. Kinda stinks, but apple calls the shots. I

noticed even before Beta 3, if you created a new watchkit app, there was no option for storyboard, only swiftui, so not too surprising here, now they have a deprecation warning to kinda go hand in hand with that. so to your points my opinion:

  1. Your app will continue to work just fine, even if you have a watchos target greater than 7.0. I dont see apple simply just removing watchkit support for watchos anytime soon, possibly never. Just new apps will have to be done in swiftui.
  2. thats a good question, probably their desire to promote swiftui as much as possible
  3. I dont believe so, i think deprecation is a strong word here, but going forward they want new apps (and maybe in some fantasy dreamland) existing apps to use swiftui.

I agree, if no more possible to use WatchKit, that will force to drop support of WatchOS.

I will file a bug report on this issue anyway.

UIKit is not public API on watchOS. :-)

What limitations (on List or otherwise) are you finding in SwiftUI that make WatchKit/storyboards a better choice for you?

@frameworks Engineer thanks for feedback. by limitations I think of the various messages on the forum to find a workaround. And being able to adjust very finely everything in the table. I will elaborate more if that’s useful.

For standalone WatchOS app, that may be acceptable. But having to develop in the same app, iOS part with UIKit storyboard and WatchOS part with SwiftUI, with completely different design logic, remain problematic.

We would love for you to try it yourself and then elaborate if you run into issues. Other developers' roadblocks may not be yours—and they might also be out of date.

@Claude31, I'm also curious what you've encountered. I have yet to convert my watch apps over to SwiftUI but plan on doing so due to some WatchKit defects that surfaced the last two years that are quite annoying--though I just checked watchOS 9 beta 2 and they appear to be fixed. In any case, if you post your feedbacks here with a quick description and they apply to my apps too, I'd be happy to write matching ones up on my side and reference yours as duplicate to help upvote what you found.

For other devs finding their way to this post, here are some defects that I've filed against watchOS 7 / 8:

FB9972047 - WatchKit: awakeWithContext not invoked on page 2 and 3 in multipage layout until after swiping [watchOS 8]

In short, three "page" layout in WatchKit, the second and third pages don't receive an init until the user swipes. Previously, in the init of the second interface controller, I was having it become the active page upon initialization. I can't do this anymore so programatic navigation is totally busted.

FB8965949 - WKInterfacePicker text baseline clips with y and g [watchOS 7.2/8]

In short, I added a picker that has "kayaking" and "canoeing" in my watch app. The letters are being clipped when using the WKInterfacePicker control, but when I rewrote in SwiftUI this was not the case.

But having to develop in the same app, iOS part with UIKit storyboard and WatchOS part with SwiftUI, with completely different design logic, remain problematic.

+1.

And plus Objective-C can't be used to make Watch apps anymore? That's just awful. They are jumping the shark.

@frameworks Engineer OK, I'll give it a real case try (but not try to port an existing large WatchOS app to SwiftUI) and tell.

@Macho Man R andy Savage I agree.

So, I started designing UI in SwiftUI for WatchOS.

I stumble on a first issue: what is the equivalent of WKInterfaceSeparator inside a WKInterfaceTable row ?

Just downloaded Xcode 14, and storyboards are gone for watchOS. What a setback. It was so easy to create a watch App. Why would Apple take away something that made it so easy to develop watch Apps? All the books, tutorials, etc are centered around using storyboards to create a watch user interface.

I too believe taking away storyboards is a step back. Storyboards are impressive IMHO. Without them it's like having to place debug statements in my embedded ESP chips; such a lower level. I've been trying to duplicate a watch app in another projects but it's not possible manually, and the app they create is in Swift. I also like Objective-C way more than Swift.

Deprecating WatchKit will destroy games because SpriteView is much more glitchy then presenting a scene from WKInterfaceController.

Are WatchOS storyboards forbidden now ?
 
 
Q