Can't Open Project in Xcode 4.6 After Opening in 5.0

非 Y 不嫁゛ 提交于 2019-11-30 11:47:29

Its easier than that to recover your existing project. Open the project file on Xcode 5. Then:

  1. Open file inspector for each xib
  2. On "Interface Builder Documents" section change "Open with" to Xcode 4.6 (if it's 5.0). Adjust any other obviously incompatible parameters
  3. Save, Close the project and open with the old Xcode.

Change the Interface Builder Documents > opens in to Xcode 4.6

I found out that there is a way to change it without having Xcode5. Ff you open the Main.storyboard on a text editor like Sublime you will get something like

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
<dependencies>
    <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
</dependencies>
<scenes>
    <!--class Prefix:identifier View Controller-->
    <scene sceneID="ufC-wZ-h7g">
        <objects>
            <viewController id="vXZ-lx-hvc" customClass="TEViewController" sceneMemberID="viewController">
                <view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
                </view>
            </viewController>
            <placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
        </objects>
    </scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
    <simulatedStatusBarMetrics key="statusBar"/>
    <simulatedOrientationMetrics key="orientation"/>
    <simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>

on the document line you will get a tag version that shows 3.0 (version="3.0"). Manually you can change from 3.0 to 2.0 or 1.0. Save the document and you will be able to open the file and to run it on the emulator (I haven´t check it performance on a real device yet).

It's probably the case that opening the project in Xcode 5 caused it to upgrade the project to a new format automatically (even if you only manually changed one or two files). That upgrade is usually not-reversible. You can probably restore from a backup or from version control.

If you don't have a backup or version control, you should perhaps consider setting that sort of thing up before using beta / developer preview software on production projects that matter in the future.

In that case, you can probably re-create the Xcode 4 project and re-add all your files, et cetera.

Actually this has a very simple answer.

Open the Storyboard 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 why because when you open project in xcode 5,All library and xib contol change based on xcode 5 so preview of both xcode 4.6 and 5 will be different.

Very simple to get your current project. Open the project file on Xcode 5. Then:

a).Open file inspector for each xib b).On "Interface Builder Documents" section change "Open with" to Xcode 4.6 (if it's 5.0). c).Adjust any other obviously incompatible parameters Press cmd +S (Save project), Close the project and open with the old Xcode.

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