Shizam
Shizam

Reputation: 9672

Include files in bundle only for simulator

I have a couple test files I'd like be included in the bundle but ONLY when the project is compiled to be run in the simulator.

Is there a flag/target/setting somewhere in Xcode to indicate certain files shouldn't be included in the bundle for different schemes?

Upvotes: 1

Views: 170

Answers (1)

David Hoerl
David Hoerl

Reputation: 41682

What you need to do is not include the files in the standard build phase "Copy Files" block, but write a custom build script that examines the current platform (EFFECTIVE_PLATFORM_NAME -iphonesimulator), and copies the files only in that case. Create a custom Run Script and the variables get printed out to the build log - you can examine all your options there.

Upvotes: 1

Related Questions