LongSteve
LongSteve

Reputation: 343

Can I have configuration specific resources in XCode

I have an Xcode iPhone project with 3 configurations, debug, release and adhoc. What I need to do is include a resource file only for the debug builds, and not for the others. Can anyone tell me how to do this please?

I know I can have different project settings and preprocessor directives per configuration, and different resource files per target, but I need to only have one target.

Thanks,

Steve

Upvotes: 5

Views: 805

Answers (1)

Shaggy Frog
Shaggy Frog

Reputation: 27601

I don't think it's possible without creating a second (or third) target, and putting config-specific resources in its Copy Bundle Resources step.

Alternatively, you could copy all resources in your existing target, and then use a post-build step to selectively delete unrelated resources, but you'll incur some overhead, and it's not exactly an elegant solution.

Upvotes: 5

Related Questions