NSInvalidUnarchiveOperationException: 'Could not instantiate class named _UITableViewCellSeparatorView' - ios

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!

Related

XCode no valid compiled storyboard at path

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.

Swift: Thread 1 signal SIGABRT

After upgrading Xcode from 5 to 6 beta, almost every project gives me an unexpected error after running the application. There are some other posts with this title but the error is different.
In AppDelegate.swift, sometimes the simulator goes completely black, without the error, sometimes it gives me the error on this line:
class AppDelegate: UIResponder, UIApplicationDelegate {
In Xcode 5 I didn't had this error before, with Deployment Target set to 7.0 or 7.1.
Thanks in advance.
This error is caused when you have 2 or more of the same IBOutlets or IBActions in your main.storyboard inspector (right arrow key at the very end of your options). Find out where there is double, and delete the one you don't need! It should work perfectly fine after that.
Seems like there was a bug with iOS 7.1 as target.
Running tests on devices with iOS 7.1 installed now works. (17028705)
Try it again with the beta 2 update
I found this issue happened when I linked #IBOutlet/#IBAction and the linkage broke (renaming for instance). In the main.storyboard inspector, right click (control click) on the elements and delete any bad linkages. Should fix the error if that's the issue.
(Xcode 7)
fix my problem:
Go to deployment info and in "Main interface" select your correct storyboard...
Rerun app.
My issues with this started after I installed the legacy simulators (iOS7.1) under 'More Simulators' under the simulator build target. Xcode 6 and its native simulator had been running fine until then. What fixed it for me was to close Xcode, delete Derived Data, and under iOS Simulator in the simulator application choose "Reset Content and Settings" then restart the system.
I'm new to the coding world but resolved the painstacking problem. I was getting the same error by doing something and even though i deleted everything around that i couldn't resolve it. It was still giving me the same error, which meant that it is not deleting in some file it stores. Took me a while to figure out which file, finally when i opened the Mainstoryboard as source file, and did search on the error key word which i knew i changed, it gave me the lines it was sitting in. After deleting those lines error got fixed. I know basic HTML so i knew which lines to delete.
I cannot start my project all over again everytime i have this error so i had to find the solution and there was no solution i could find. So i had to do it myself with common sense, as i said i have no knowledge of coding.
Hope it helps.
I know there's already plenty of answers but just to note what happened in my case:
I created the ViewController on the storyboard first and then I created the class, I don't know why this was an error because both class names where identical, but by rewriting the class name on the storyboard helped to "link" correctly the view controller and its file. First create file then ViewController on storyboard to prevent this error.

Xcode: xcode crashes when trying to open project settings

This is a bug that's really getting on my nerves...
Whenever I try to open the project settings for one of my projects, xcode crashes with this report:
Application Specific Information: ProductBuildVersion: 4H512 UNCAUGHT
EXCEPTION (NSUnknownKeyException): [<__NSCFConstantString
0x7fff783e0fa0> valueForUndefinedKey:]: this class is not key value
coding-compliant for the key CFBundleTypeName. UserInfo: {
NSTargetObjectUserInfoKey = "";
NSUnknownUserInfoKey = CFBundleTypeName; } Hints: 0: Replacement view is installing:
I created an entire new project and c/p the files from my bugged project into it. It happened again. I have Xcode 5 installed on my computer so I accidentally run my project in Xcode 5, setting certain Xcode 5 specific settings and breaking compatability with my Xcode 4.6.1.
Please help...
if you have open your project in xcode5 and then try to open the project in xcode4, all the nibs files get updated according new xcode and it will lead to crash as it is incompatible with older xcode4.
Same problem happened with me also,
What I have done to solve mine problem.
1. Remove references of all nibs from the project. or even move to trash by taking backup somewhere.2. Now, in xcode4 create new empty nib file and open the corresponding nib in xcode5, copy the view and paste in xcode4.3. do this for all the nibs and try to build again
hope it helps

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 4.2 MainStoryBoard Not Found

When I make changes to the MainStoryboard.storyboard none of these changes make it to my iOS device even though it builds. I tried deleting all data for the application from the device and restarting everything but now when I build and run the code on the iPhone I get the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard' in bundle NSBundle </var/mobile/Applications/BE0CBEE9-1E95-443A-97CF-53CCD66A2D0C/WalkBack.app> (loaded)'
From what I can tell, my plist file has the appropriate information for the name of the storyboard.
Any ideas what is wrong, or how can I fix it? Right when this problem happened the .xcodeproj file started opening in XCode 3. Did this mess up some settings? I'm terribly lost.
I've seen this happen a handful of times with the files with my students, and today I had it happen to me as well. What seems to fix it for me:
Right-click on your MainStoryboard.storyboard in the Project Navigator.
Select Delete and click Remove References Only.
Right click on InfoPlist.strings and select "Show In Finder". (This is just my lazy way to open the folder containing the storyboard in finder.)
Drag the MainStoryboard.storyboard from Finder back into the project.
My suspicion is that there is a bug somewhere triggered by adding files to the project or certain edits to the storyboard. It causes the localized files to not be copied into the bundle (I think). Removing the storyboard and re-adding it to the project seems to fix the hiccup.
I have universal app, so with one storyboard for iPhone and another one for iPad, iPad simulator works, but when i try to lunch iPhone simulator i obtain this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard' in bundle NSBundle </var/mobile/Applications/BE0CBEE9-1E95-443A-97CF-53CCD66A2D0C/WalkBack.app> (loaded)'
I tried all your solutions but anyone didn't work. I always had same error.
I solved removing localization parameter on iPhone storyboard and setting for both storyboard the same localization.
I hope that helps you!
There is another way!
Go to your project, select your target and click on Build Phases.
Then unfold "Copy Bundle Resources" and add the MainStoryboard.storyboard to the resources.
You can do this by clicking on the little '+' sign on the bottom of the unfolded list.
You don't have to delete the file from your project just re-add it to the resources.
You could always also reset the simulator.
Actually, to be even more precise, you will find that you are unable to add MainStoryboard.storyboard [it does not show up in the file browser] to the "Copy Bundle Resources" section of the Build Phase setting. I found that I actually had to add it the "Compile Sources" section of the Build Phase setting. It then adds it to both sections. I am not sure whether this is the intended behaviour or a bug in Xcode 4.6.3.

Resources