Reputation: 2071
I've got a universal XCode Project (ObjC) for iPad and iPhone with a subproject that contains a storyboard. The subproject is a static library that has been added to the main project. Included in this subproject is a bundle containing bespoken storyboard.
Whenenver I tap a certain button the application, the storyboard needs to be loaded;
[UIStoryboard storyboardWithName:@"UIControls.bundle/Config" bundle:nil];
That works perfectly fine for the iPhone (devices and simulators), but whenever I try to run the project an an iPad (device or simulator), I'm getting the following error;
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'There doesn't seem to be a valid compiled storyboard at path...
What's the about? The project is a universal project, so why can't the iPad find the storyboard?
Upvotes: 9
Views: 6919
Reputation: 11
I encountered this problem when running an old project on xcode 16, iOS 18. The solution is setting the Targeted Device Families
in build settings to iPhone.
Target Device Families selection
Upvotes: 1
Reputation: 397
Had the same issue. Solved it buy adding libc++.tbd
in Link Bindary with Libraries
.
Upvotes: -1
Reputation: 359
For me solution is:
I used this code to load a new view controller - [UIStoryboard storyboardWithName:@"UIViewController" bundle:nil];
First I tried - [UIStoryboard storyboardWithName:@"UIViewController" bundle:[NSBundle mainBandle]];
But no lucky, finally I changed this code to:
[self performSegueWithIdentifier:@"Segue" sender:self];
And it helped, maybe it can help somebody too.
Upvotes: 0
Reputation: 19
I had this problem due to changes in the Storyboard color of Status Bar Style and not changed in project settings
Upvotes: 0
Reputation: 4096
In our case, we were running a shell script that executed one of XCode's commandline tools, ibtool
,
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target 6.0 --output-format human-readable-text --compile ./Build/Release-iphonesimulator/TestApp.app/TestStoryboard.storyboardc ./Resources/TestStoryboard.storyboard --sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk
and while it seemed to run without errors, it actually produced an empty storyboardc
directory. Upgrading the minimum deployment target to 8.0 produced a properly constructed storyboardc
, with an Info.plist
file inside. When IBTool fails / produces an empty directory, I definitely think it should actually fail, and cease compilation, because otherwise everything looks like it's properly set up and correct, it actually isn't.
So yeah, solution for us was upgrading the minimum deployment target of our app.
Upvotes: 0
Reputation: 2298
I was using a Storyboard from a custom Cocoapod and it kept crashing with
There doesn't seem to be a "valid compiled storyboard" at path ...
In the affected storyboard, under Interface Builder Document I switched the "Builds for" value from "iOS 7.0 or later" to "Project Deployment Target" (which was 9.0), this did the trick for me.
Upvotes: 2
Reputation: 1843
Just ran into this, after switching a project from a Universal target to iPad only, and the deployment target from iOS 9.0 to iOS 7.1.
The solution was to disable 'Use Size Classes' on the storyboard, and only keep the sizes for iPad.
To get to this checkbox, open the storyboard in the project navigator, then select then show the File Inspector (first icon) and scroll down to Interface Builder Document heading.
Upvotes: 3
Reputation: 489
I was trying to fix this problem for 2 days with no hope till i found that it also did not open the sqlite DB file also and after that everything is corrupted after this DB failure. that was my case. And all of that was a memory issue even if ARC set arrays or dictionaries after finishing to nil;
Upvotes: 0
Reputation: 2071
To answer my own question;
This error appears when the bundle target isn't universal. So make sure the Targeted Device Family in the bundle's build settings is set to iPhone AND iPad.
Upvotes: 16
Reputation: 1147
I'm sorry for my previous comments.
I don't know why it didn't work, but currently I fixed that problem with following steps:
From now Storyboards work as previously!
Upvotes: 0