I need a set of code to run only when testing the app(UITesting) not when running the app. I have been trying to find whether running the app or it's a UITesting?.
This is new on xcode 8 and above.
Can some help me with this please.
I need a set of code to run only when testing the app(UITesting) not when running the app. I have been trying to find whether running the app or it's a UITesting?.
This is new on xcode 8 and above.
Can some help me with this please.
Now we can simply check this with one line of code for "UITesting".
[[[NSProcessInfo processInfo] arguments] containsObject:@"-ui_testing"]
-ui_testing would appear only when testing the app.