Storyboard 文档需要 Xcode 8.0或更高版本

我下载了 Xcode beta 并打开了我现有的项目,看看它是如何使用 Xcode 8 beta 的(我从 Xcode 8打开 Storyboard 文件)。

现在,当我从 Xcode 7.3打开我的项目时,我不能打开故事板文件,它给了我以下错误

此版本不支持以 Xcode 8格式保存的文档。 使用 Xcode 8.0或更高版本打开此文档。

Xcode 7 error 我应该做什么来恢复,因为我想继续在 Xcode 7上工作。

在 Xcode 8中,我被提示选择设备,并且我选择了 iPhone 6S,我认为这个部分在某种程度上导致了故事板文件在 Xcode 7中没有打开

37119 次浏览

I have figured it out:

Open your Storyboard in Xcode 8.

Click on the File Inspector.

In Interface Builder Document section, select Opens In "Xcode 7.x" instead of "Latest Xcode (8.0)", as in following screenshot:

enter image description here

On doing this, you will get an alert saying "Saving for Xcode 7.x will close your document and data for Xcode 8.0 features will be removed."

Click Save and Close and you will be able to open storyboard in Xode 7.x.

I met this question too. I followed this method to change it: because I couldn't click the menu to choose 7.0 or later, I opened the main.storyboard and launchscreen.storyboard with source code, than I changed it's version manually and this solved the issue.

I have a solution:

  1. Open storyboard as "source Code" (right click on storyboard -> open as -> source code).
  2. Delete this row:

<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  1. Delete this for all storyboards which you are using.
  2. Run app.
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>

Replace your dependencies to this dependencies

Since XCode 8 constantly keeps converting storyboard files to XCode 8 format every time I open it (it's an old project, and everything gets messed up), I ended up downloading XCode 7 and using it just to edit storyboard files (and close it before i switch back to XCode 8). If I accidentally open storyboard file in 8, I just reset that file to the last commit, since the project is on GIT.

Stupid, I know, but it works.

Open storyboard as Source Code and search for minToolsVersion key. Set that value as 7.0 and open that storyboard in Xcode 7.x

It's work for me

Right,click on main.stoaryboard.Go to open as -> source code and change dependencies

change

 <capability name="documents saved in the Xcode 8 format"
minToolsVersion="8.0"/>  to


<capability name="documents saved in the Xcode 7 format"
minToolsVersion="7.0"/>

Follow the same step on launchscreen.stoaryboard

As @Bhumit_Metha given straight forward solution. Unfortunately, in my case I don't have MAC with latest Xcode (8.0+) version make those changes to support new 'xib' files in my old xcode (7.x).

So I ended up with a working solution with simple steps as follows :

[1] Create a empty xib file in your xcode 7.x.

[2] Right click on the empty xib to view source and copy all of that.

[3] Now open new xib (one with version error) in source viewer. Paste previous code on top.

[4] Replace all the lines of old with new inside tag : <objects> ...... </objects>

And that's all. Will work with compatible to xcode 7.x!

Tip : While opening next time in new xcode, make sure to select compatibility mode.

Same issue occurred after shifting from Xcode 9 to Xcode 8. I opened the storyboard in source code and changed

"<capability name="Safe area layout guides" minToolsVersion="9.0"/>"
to <capability name="Safe area layout guides" minToolsVersion="8.0"/>

After this change when you will open storyboard in Interface builder this line will be removed.