[solved] Unable to add a xib file to any OSX projects created by Project Generator

Hi forum,

does anybody ever try to add a xib/nib file to your xcode project generated by the projectGenerator on OSX? (iOS works fine) I am unable to add a xib file to the xcode project. I’ve tried with the example project (ex. soundPlayerExample) and my own project, and the xib file can never be added to the target membership (the Target Membership check box is disabled), see the follow example image:

I wonder if it’s because of certain configuration from the Project Generator that causes this constraint, as I can add a xib file to an xcode project created by myself. Does anyone know how to work around it?

I’ve also posted on stackoverflow with more details:

Someone answered in stackoverflow: “Xibs must be added to Copy Bundle Resources, not Copy Files”. Is that the solution?

Yes, the XCode projects generated using Project Generator doesn’t have “Copy Bundle Resources” by default. So if I add a xib file it won’t be added to the target bundle. But you can add this option manually under Build Phases.