XCode no valid compiled storyboard at path - ios

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?

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.

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.

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.

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:
Go to Project Target -> Info and then delete KeyValue object for key Main storyboard file base name and Main storyboard file base name (iPad).
To ensure that it's completely removed, go to Info.plist file and verify the KeyValue objects aren't exist there. If they are, then also delete from there.
Remove references to Storyboards from Xcode project.
Add Storyboards back to the project by right-click on the project in Xcode -> Add files to project_name, tick the Copy items if needed, Create groups and project target options.
Set Storyboards names both for iPhone and iPad in Project Target –> Info, by adding previously removed KeyValue objects.
From now Storyboards work as previously!

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;

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.

I had this problem due to changes in the Storyboard color of Status Bar Style and not changed in project settings

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.

Had the same issue. Solved it buy adding libc++.tbd in Link Bindary with Libraries.

Related

Xcode 13.3 Not Linking Storyboards

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.
Fixed it. Turns out that a few years ago, a User-Defined build setting for CONFIGURATION_TEMP_DIR had been defined in our project. Removing this setting, and falling back to the default value got our project running again with no issues. I'm not sure why this setting had been defined originally, but apparently Xcode 13.3 just doesn't like it anymore.
This line also affected another project of ours, that doesn't use storyboards, but does have an Apple Watch app. In that case, the crash was similar, with the error stating that an Interface.plist file could not be found.
Apple's (archived) doc on the setting.

Xcode 6 Interface Builder "cannot open compiled nibs" error, FiksuSDK

I have an app that runs great in Xcode 5, using CocoaPods.
When I open the app on Xcode 6 and hit build and run, I get four errors from the FiksuSDK about compiled nib files.
On the side, it states that I do not have permission to view it, but tapping on it shows the error: "The document "FMVerifyViewController.nib" could not be opened. Interface Builder cannot open compiled nibs." I don't directly call any of these nib files, however it's possible that the Facebook API does.
Screenshots attached.
I've tried removing the Pods directory, deleting derived data, updating pods and restarting Xcode. Nothing.
Any help would be really appreciated.
Screenshots:
Go to the "Build Settings" of your Project and set "Strip NIB Files" in "Interface Builder NIB Postprocessor - Options" to NO - worked quite well for me :)
This isn't a very good answer, but I had this same problem and in order to keep developing (until this gets figured out), I just removed those 4 nibs from the project. Just go to the project file, select the target you're building against, go to the "Build Phases" tab, and delete those 4 nibs from the "Copy Bundle Resources" section. Your project should build and run fine for the time being (I haven't encountered any negative effects to not having these nibs). By the way I think they're from the Fiksu SDK, not the Facebook SDK.
The error messages unfortunately are misleading because it's not a permissions problem and the nibs are valid. It appears that because they are provided as symlinks to the resource files, Xcode complains.
Fiksu just released a new version of their SDK where this issue is fixed. (look for version 4.3.1)"
Disclosure: I am a Fiksu Employee

NSInvalidUnarchiveOperationException: 'Could not instantiate class named _UITableViewCellSeparatorView'

After Xcode Update (5.1) my app crashes when i try to run in iOS 6.x.
I have an app where I have a custom cell and constraints.
Auto layout is unchecked for the xib file. The error I get is:
*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate
class named _UITableViewCellSeparatorView'
I only found one thread about this issue in another forum, but without a solution, just a test that I've done too and got the same error.
I was getting the same error after updating to Xcode 5.1.
I was able to get rid of the error by editing the xib for my custom cell.
Under Interface Builder Document in the file inspector, I switched "View as" to "iOS 6.1 and Earlier". I also have "Builds for" set to "iOS 6.0 and Later".
I got same issue and "View as" and "Builds For" didn't help me. I changed "Opens in" - "Xcode 5.0" and it helped.
PS Don't forget to remove app from device/simulator, clean project and restart xcode (not sure which way was right, I did all of them)
After installing of Xcode 6.0.1 beta 2, I too was encountered with this problem.
My project has iOS Deployment Target is 6.0
Using answer of #AlexZd, I did next actions:
I found all xibs, which will created / displayed at this moment
Before my actions this xibs had next standard settings:
So, for every of xibs, selected by me, this settings was changed on next settings:
Now, check work of it. If this does not works, then do control actions
4.
1) Clean your Xcode project by CMD + SHIFT + K,
2) Clean ~/Library/Developer/Xcode/DerivedData folder by hands
3) Remove app from device and then run it via Xcode on this device
This solution was checked by me on 3 iPads with IOS6, IOS7 within IOS8 too. This works perfectly on any of them!

How do I fix a project opened in xcode5 dp3 by accident?

At some point I opened a project in xcode5 that was created in xcode4. Now I can build/run because of a storyboard error. XCode4 simply wont run it, it says:
The document Storyboard.storyboard could not be opened, could not read
archive. Please use a newer version of XCode. Consider changing the
documents development target to preserve compatibility.
So I go to XCode5 I get this:
2013-07-19 10:38:11.340 ibtoold[756:707] [MT] DVTAssertions: ASSERTION
FAILURE in
/SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-3697.3/IBPlugin/Utilities/IBObjectMarshalling.m:673
Details: Failed to compute auto layout status IBLayoutConstraint,
IBUILabel, IBUITableViewCell, and IBUITableViewCellContentView.
Interface Builder encountered an error communicating with the iOS
Simulator. If you choose to file a crash report or radar for this
issue, please check Console.app for crash reports for "Interface
Builder Cocoa Touch Tool" and include their content in your crash
report.
and when I try to open the storyboard, XCode5 crashes.
Any ideas?
Open the Storyboard/Xib file on Xcode 5, And then: 1. Open file inspector 2. On "Interface Builder Documents" section change "Open with" to Xcode 4.6 (if it's 5.x). 3. Save, Close the project and open that with old Xcode.
It should work now.
This is same method like on earlier releases so I assume that's ok for NDA case (you can do the same thing on Xcode 4.6 to work with older version).
Or read my answer here: Just installed xcode 5 and have missing storyboards
Open the storyboard in Xcode 5. In the file inspector on the right, you should see something that says "Document Versioning". There you should set the deployment level to iOS 6.1 and set it to open the file with Xcode 4.6.2. After you do this, you should be able to open and build the storyboard in Xcode 4 again.
I had a similar problem but could not even open the storyboard - Xcode 5.0.1 and 5.0.2 kept crashing with
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-3697.3/IBPlugin/Utilities/IBObjectMarshalling.m:673 Details: Failed to compute auto layout status IBLayoutConstraint, IBUILabel, IBUITableViewCell, and IBUITableViewCellContentView.
The solution in my case was to open project and storyboard with Xcode 5.0 (the last version the storyboard opened in) and to search for a table problem.
After some time searching, I found a second table that must have been inserted in error behind the real table. It had no height or width so was only spotted in the inspector on theleft hand side (see picture). I deleted this rogue table and then loaded in 5.0.2 and life was good!
I ended up opening the XML and removing the Boolean for AL and then re-adding it.

Xcode is loading in OS X objects instead of iOS objects

I have an iOS window application, which was working fine with Xcode up until today.
When I open the project in the object library it seems to load in all of the OS X development objects, and I can no longer see any of the cocoa touch items like UITextViews, etc.
I didn't manually change any of the settings so I am not sure why this is happening.
Not sure if its the exact same problem, but I found that opening a .xib file switches the Object Library from OS X to iOS objects...
I downloaded Xcode 4.3.3 last night and had the same problem on my first launch of Xcode after the upgrade.
It certainly looks like a bug. My workaround: in the Build Settings, I changed the "iOS Deployment Target" pulldown to a different SDK, then changed it back. After that, I got the iOS objects back.
You can fix it by going File - New - File - Choose "Cocoa Touch" in iOS - choose "Objective-C class - Next - Choose options for your new file: select checkbox "With XIB for user interface"
Changing the deployment target to a different sdk didn't fix it for me.
However, opening up a storyboard brings back the IOS specific objects.
You probably added the Storyboard from the "macOS" tab. Was the icon blue-tinted or yellow-tinted?
yellow-tint -> iOS, watchOS, tvOS
blue-tint -> macOS

Resources