12

I opened the wrong version of my project in Xcode 5 and now Xcode 4.6 crashes when trying to open that project. I only changed one xib file in Xcode 5 and using Xcode 5 have opened the xib in IB and under Interface Builder Document, changed Opens in from Xcode 5.0 to Xcode 4.6. Any ideas why 4.6 crashes when opening the project?

EDIT:

I made a copy of the project folder and now, even though all of the files are in the old project folder, none of them show in xcode 4.6 or 5 when I open the project. None of my images, class files, or anything are showing in xcode even though they are all still in the project folder.

raginggoat
  • 3,570
  • 10
  • 48
  • 108
  • do you have some saved snapshots, you could try opening in 5.0 again and going back a snapshot and see if that will open in 4.6, hope you get this sorted out that would drive me crazy. – rezand Jun 24 '13 at 17:17
  • Check my answer here: http://stackoverflow.com/questions/17047409/just-installed-xcode-5-and-have-missing-storyboards/17072652#17072652 – Idan Jun 24 '13 at 20:02

7 Answers7

22

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.
ecume des jours
  • 2,493
  • 1
  • 19
  • 15
7

Change the Interface Builder Documents > opens in to Xcode 4.6

enter image description here

thatzprem
  • 4,697
  • 1
  • 33
  • 41
4

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

pleonasmik
  • 779
  • 10
  • 16
3

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.

1

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.

Abdul Yasin
  • 3,480
  • 1
  • 28
  • 42
1

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.

Chris Alan
  • 1,426
  • 14
  • 14
1

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.