Search code examples
swiftuistoryboardwatchkit

Multiple Storyboards in WatchKit App


Is there any way to use multiple storyboards inside a WatchKit app? From what I can tell, you can only use a single one which makes it difficult when working in a large team. The APIs available on UIStoryboard are as follows:

func instantiateInitialViewController() -> AnyObject
func instantiateViewControllerWithIdentifier(_ identifier: String) -> AnyObject!

Neither of which support WatchKit objects. Additionally, the WKInterfaceController class method for reloading different interface controllers only takes an array of identifiers.

class func reloadRootControllersWithNames(_ names: [AnyObject],
                             contexts contexts: [AnyObject]?)

Based on all this information, I'm pretty positive that it's not possible. I wanted to ask the experts out there if you could confirm my suspicions.


Solution

  • No WatchKit does not currently support multiple Storyboard files.

    I believe this limitation is due to the early stages of the current complexities associated with running code remotely on iPhone and Storyboards on Apple Watch.

    WatchKit automatically generates and configures the required Storyboard for you when adding a Watch target to a project. This storyboard includes your WKGlanceController and WKUserNotificationInterfaceController of which you only need one.

    Perhaps submit a feature request.