The document Main.storyboard requires Xcode 8.0 or later

隐身守侯 提交于 2019-11-27 17:55:30
Bhumit Mehta

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:

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.

Himanshu

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.

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

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.

Michael Tangs

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.

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.

<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

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

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!