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

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.

Related

ERROR: "This document requires at least Xcode 12.0"

Opened a project in Xcode 12.0 that I started on Xcode 11.x the other day. Without thinking, I made some edits in the interface builder and when I opened the project back up in Xcode 11.6 I got the This document requires at least Xcode 12.0. error. I can't build the project or open the main storyboard file.
Any thoughts on what I can remove to open/build this project in Xcode 11.6?
The recovery suggestion is Recovery Suggestion: This version does not support image references. Open this document with at least Xcode 12.0., but I'm not sure what that means or where to look.
I had the same issue while loading another author's project. The solution that worked for me was to open Main.storyboard in a text editor such as Sublime and change the line:
<capability name="Image references" minToolsVersion="12.0"/>
to
<capability name="Image references" minToolsVersion="11.0"/>
I was able to build successfully after this and there was no error.
Thanks for the two suggestions! Turns out the issue didn't originate from the storyboard, although that's where the error was being thrown. Instead it was caused by a navigationItem image that I was setting programmatically in one of the project's ViewController files. The icon ended up being exclusive to iOS 14+, which was why the project wouldn't build in Xcode 11.6.
I switched the icon and everything built without issue.
To run your project with previous Xcode versions, try the following:
Open the affected .storyboard file with an external editor (i.e. TextEdit, TextWrangler or any other..)
Search in the xml document for all keys "minToolsVersion"
If you find some key with value minToolsVersion="12.0"downgrade it manually to be compilant with your XCode version.
Save the file and come back to XCode
Now the error should be disappeared.
Select your storyboard > Right Click > Open As > Source code > Search for this key "minToolsVersion" from there you need to decrease your version as per your xcode.

Main storyboard error in xcode 8 beta

I try to build my project in Xcode8 beta, but I get this storyboard error. Also, I cannot open the storyboard. Xcode shows The document "Main.storyboard" could not be opened. Could not verify document content . The error prompts when I try to open.
Main.storyboard: Exception while running ibtool: *** -colorSpace not valid for the NSColor NSPatternColorSpace
I just had this issue on Xcode 8 GM and I resolved it by doing the following:
Create a new storyboard.
Open your old storyboard as source code (via right clicking).
Select all and copy (cmd+A, cmd+C)
Right click on your new storyboard and open as source code.
Paste (cmd+V)
Right click on your new storyboard and open as Interface Builder - Storyboard
No idea why this works. It's the exact same file content. My guess is there's something cached in the workspace or project that's messing with Xcode's interpretation of the file.
Ok I think I got it.
I got an error like this when updating an Xcode 7 project to Xcode 8. Make sure that you let Xcode update everything in your project to current Xcode 8 standards.
To do this:
Open up your project
Go to Edit -> Convert -> To Current Swift Syntax.
Accept all changes it suggests.
Clean Project ( Product -> Clean)
Please tell me if this does not work so I can try to help further.
I filed a bug report. Now the issue fixed in Xcode 8 final version.

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.

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!

Resources