Of course you did a Clean Build Folder ?
Could yopu post the func where the error occurs ?
I have the same issue. I needed to rename a working Watchkit project in XCode 10.
Used the automatic name change for the project file and manually reset all the modules and checked all the targets. Also changed the plist names in Build settings
I get the same error from failure to instantiate the initial view controller
No clues found in a SO search
Same issue as well. I added a watch target back in Xcode 9 which was fine, but now under Xcode 10.1 it's not recognizing the main interface storyboard with a similar error as the original post above.
Fixed: I had to re-create the Interface.storyboard in the end. Nothing would fix it until I did this. The previous version of the storyboard had an older form of a notification controller that is different in Xcode 10.1.
I could fix the interface storyboard by open it in a text editor. Have a look for
That should contain the new names of your targets. Spaces in your names are replaced by "_".
That fixed the above errors for me.
For me it was the same.
I created the extension, choice swift and added it to a objective c project.
Xcode created the target with space in it (watch extension), which it couldn't handle I renamed it WatchExtension
Error when space is in name:
<unknown>:0: error: module name "Watch Extension" is not a valid identifier
Command CompileSwiftSources failed with a nonzero exit code
Remove space in nameget the runtime error:
Condition failed:"NO". Couldn't instantiate class _TtC32WatchKit_App_Extension19InterfaceController
To fix I had to go to the watch (ui) target.
Build Settings-> select all -> search for "default Module" and rename it to your watch extension name.
Also renamed folder to match extension name etc.