0

I have one file which reference I have added in xcode main project target and test case both.

This file reference needs to be added to main project only when test cases are running.

I don't want to include it when I create main project build since this file is for testing purpose only.

What is the best way to remove reference from main project when test cases are not running?

srus2017
  • 394
  • 2
  • 14
  • Instead of repeating your question with different words, please choose which one you want to keep and close the other – Jon Reid Aug 18 '18 at 18:27

1 Answers1

1

I have resolved my issue by using Exclude files setting from xcode's build setting.

I have added mock file reference to both app and test target.

Then for release and AppStore build configuration I have excluded mock file so that it doesn't any extra size in app store build.

Since test cases run only in debug mode. This is safe solution.

srus2017
  • 394
  • 2
  • 14