Upgraded Xcode 4 constantly crashes when opening XIB file

Question: I have some “old” iPhone projects. Since I upgraded from Xcode 3.2 to Xcode 4 it constantly crashes when I open an XIB file. The same project builds without errors in Xcode 3. The error log message is: “Encountered multiple assertions. First assertion was: ASSERTION FAILURE…” and a long list of stack info. Answer: Your project.xcodeproj package is probably corrupted. Try out some of or all of these steps: 1. Open your project.pbxproj file with TextEdit. It’s in the project.xcodeproj package. See #3 for instructions below. Search for null strings like this:
/* (null) in Resources */ = {isa = PBXBuildFile; };
Remove it. 2. Search for explicitFileType = file.xib; in the project.pbxproj file. If found replace it with lastKnownFileType to have a valid settings like this:
65A1D75E12CEB12A005BE04D /* SettingsAddressViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SettingsAddressViewController.xib; sourceTree = "<group>"; };
3. Remove inherited settings from your project.xcodeproj package: – Close Xcode 4 – Open Finder and navigate to your project folder. – In the context menu of project.xcodeproj file select Show Package Contents. How? Context menu => right click on the file. – A new Finder window will pop up. From the package delete the project.xcworkspace file. Don’t worry. It’s another package. – Go into the xcuserdata folder and delete your own .xcuserdatad folder. – Close Finder and open Xcode. Clean and rebuild your app.