Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
727 views
in Technique[技术] by (71.8m points)

xcode4 - Xcode 4 project: utility to clean up pbxproj file?

I have an Xcode 4 project with 2 targets, one for iPhone and one for iPad. If I click on the iPad target and try to go to Build Settings Xcode 4 crashes:

Encountered multiple assertions. First assertion was: ASSERTION FAILURE in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-269/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/FileTypes/../PBXFileType.m:594 Details: filename should be a non-empty string, but it is nil

Obviously the pbxproj file has a bad reference in there somewhere -- likely caused by the many manual merges I've been forced to do by git. Is there some way to clean up the pbxproj file so it works correctly again or to tell which line is causing the problem?? I'd really really prefer not to have to recreate the project from scratch.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I tried gorbster's method with no success (though it has solved similar problems for me in the past).

I went into my project.pbxproj file (inside the .xcodeproj package for the project) and found two lines that looked a little suspicious, both of the form:

53A45F8F138FE6F40077017F /* (null) in Resources */ = {isa = PBXBuildFile; };

I deleted the lines, and voilà: I can access my build settings for this target again.

No idea how they got in there in the first place. I would guess something to do with a faulty merge under SVN.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...