Exclude code in UISpec

196 views Asked by At

I am integrating FlurryAPI with my app, and I don't want it to start a link when I'm running my tests. However, since it's in the AppDelegate, I suppose it runs whenever I start the application for Acceptance Testing. I'm using UISpec, and I was wondering:

Is there any way to exclude code from running in UISpec, but still running in normal target?

1

There are 1 answers

0
Filipe Pina On BEST ANSWER

I'm not familiar with UISpec but if you have 2 different targets and you want to include code in one but not the other, that is easy to do.

#ifndef UISPEC
(code to run in any target except UISpec target)
#endif

Then just add -DUISPEC to Other C Flags in UISpec target build settings.