WatchWidget does not define either an NSExtensionMainStoryboard or NSExtensionPrincipalClass

I've simply been following the documentation found here: Creating a Widget Extension. However, for some reason when I try to launch the extension I'm faced with the error:

WatchWidget does not define either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key with a string value in the NSExtension dictionary in its Info.plist

Which is indeed correct, however I'm uncertain what it's supposed to point to?

I currently just have the WidgetFile, assets and the info.plist :)

Exactly the same problem for me too - I started from an existing widget project and cloned if for a watch widget project. The existing project didn't have either of these defined, nor does a new project created in Xcode 14. Seems like it might be an Xcode 14 bug.

Same issue.

same issue...

Have you found the solution?

Adding entry NSExtensionMainStoryboard to the info.plist of the extension fixed this issue for me:

WatchWidget does not define either an NSExtensionMainStoryboard or NSExtensionPrincipalClass
 
 
Q