I have a project that builds and runs with no issues when using Xcode 13.0. However, if I close 13.0, and try to then build and run the project using Xcode 13.3, the app will build, but then crash immediately on launch with the following error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle
I'm making no changes in the project at all - the only change being the version of Xcode used to build the app. When comparing the build output between the two versions of Xcode, I have noticed that 13.3 is skipping the "Link Storyboards" step.
A few things that I've tried include:
- Removing the storyboard file from the .xcodeproj, and re-adding it.
- Removing all localization from the project, thinking it may be related to that. I then tried re-enabling localization.
- Creating a brand-new storyboard using the File > New> File… menu. Even the new
.storyboard
files are not linked or added to the project. - Removing and then re-adding the
.storyboard
files to the Copy Bundle Resources build phase. - Bumped the minimum deployment target from iOS 13.0 to 14.0
- Cloned my source code from Git to a new location and built from there.
- Product > Clean Build Folder and manually deleted the derived data folder locations more times than I can count. I'm using the default Derived Data location.
(~/Library/Developer/Xcode/DerivedData)
I've been able to verify that the storyboard files are not being included in the finished app by inspecting the .app bundle after the build succeeds. All other resources I've been copying to the app are there, but the storyboards are not.
Has anyone else seen this issue, and if so, resolved it? I've been stumped for a few days now, and so far, the only thing that's worked has been rolling back to Xcode 13.0.