开发者

Forcing Xcode 4 to compile XIB into NIB

I upgraded an Xcode 3 project having three targets to Xcode 4. My targets' bundles no longer have any开发者_JS百科 NIB files -- only XIB files. A new Xcode 4 project has both (at least in the simulator). I don't see any difference between the old and the new Xcode projects' settings to account for this difference.

How do I get Xcode 4 to compile the XIB files and put NIBs in my bundle?


Solution: Select all of the XIB files, change the file type to something outlandish ("Objective-C Preprocessed Source" is handy), and then set the file type BACK to the Default type (IB CocoaTouch XIB). De-select all of the files (Xcode might spin on that for a while), clean the project, delete the prior version(s) from the simulator(s), and now the build should contain only NIBs, no XIBs.

Man Always Wins In The End. (With help from BaldEagle.)


I found another solution:

Go into the 'Build Settings' or your project target, look for 'Other Interface Builder Compiler Flags' and add the flag '-all'.

That's it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜