ERROR: "This document requires at least Xcode 12.0" - ios

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.

Related

Xcode 13 - The project at '/Users/test.xcodeproj' cannot be opened because it is in a future Xcode project file format

When opening in Xcode 12.5 a project created with Xcode13, I get this error message:
"The project at '/Users/[...].xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode."
how am I supposed to adjust the project?
It is easy to change the project format in the Xcode file inspector:
But this is not the whole picture.
Another issue is the missing plist file in Xcode13 created projects.
To make the new project compatible in Xcode 12 you need to add a plist file. The best and quicker solution is to make a new project in Xcode 12 and copy and drop the plist file in the new Xcode13 project. Then make add the necessary changes for your project.
You will need to stop Xcode 13 to generate new plist files when you make changes. So return to the project in Xcode13 and set generate plist file to no under packaging in Build Settings:
I found very helpful information about this in a very good article on useyourloaf.com
I solved it selecting the target in the project settings, opening the identity and type window and changing to Xcode 12.0. Then open the project workspace again and done!
Check also the command line tools you are using in Xcode preferences --> locations

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 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

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.

iPhone project has "My Mac 64-bit"

I'm working on an iPhone project and somehow the schema has "My Mac 64-bit" and "My Mac 32-bit" in addition to the normal "Simulator 4.3" and "IOS Device".
Is there anyway to remove the "My Mac..." options? It always wants to switch to these when I switch git branches and I end up building without realizing it and get an error. More of an annoyance than anything.
Could possibly be something with your xcuserdata folder.
Right-click on the xcodeproj file and select "show package contents."
Make a backup copy of the xcuserdata folder.
Now delete everything inside the xcuserdata folder, and restart xcode.
If causes a problem, then put backup folder back in.
This happens to me every time files get modified outside of Xcode, and Xcode needs to reload the project file. Closing the project and re-opening it always fixes the issue for me.
If you are porting your Xcode project from one mac to other then this issue happens most often. You can Try These two resolutions: First one only worked for me:
Resolution:1
Open Your project folder > Right Click on Xcode and Select “Show Package Content” Inside there we will get one folder “XcuserData”.> Open the Xcuserdata folder and delete all its content. >Now Launch the Xcode project again, the problem should be fixed now.
if the above resolution is not working then try this one:
Resolution:2
open Xcode > clicked on Manage Schemes and then Autocreate Schemes Now > Then select the new scheme in Xcode.
Hope either resolution should work for you.
This is a bug in the beta builds for Xcode 4.2, with regards to their handling of Git repos (confirmed at WWDC with Xcode devs). According to a friend of mine it's been fixed in Xcode 4.2 beta 5, but there are a bunch of issues with that build and you might want to hold off until beta 6.
Step 1: Right Click on Xcode project > Show Package contents > xcuserdata > Delete All content
Step 2: Open project > select target > (Project name)Tests > Host Application > select application > allow testing application APIs
Resolved :) Enjoy your Code
I always open my projects from within Finder to get around this problem. Browse to your project directory, eg /apps/iOS/iPhone/SingleViewApp. Double clicking the .xcodeproj file launches the project within Xcode. I see "Checking DDI Symbols" msg and soon after iPhone device name appears.

Resources