Programmatically creating WatchOS Interfaces

Hi,

I am trying to create the User Interfaces for my app programatically i.e. without using the storyboards/xib's. I have been able to do the same for iOS application. However, not able to do it for WatchOS. Does WatchOS not allow creation of interfaces via code without using Storyboards?


Thanks in advance !

Replies

I don't know if you can do everything programmatically, but that's one of SwiftUI goals:

https://developer.apple.com/documentation/watchkit/building_watchos_app_interfaces_with_swiftui


May also watch this WWDC session:

https://developer.apple.com/videos/play/wwdc2019/219/


ANd tutorial

https://developer.apple.com/tutorials/swiftui/tutorials

Thanks Claude.


So, if i remove the Interface.Storyboard file, will things work as exepcted ?

I have not tested.


But you should try (make a copy of the project before removing).

Did you solve your issue ? If so, don't forget to close the thread.