I am using KIF for testing the functionality of an app. However, this app has two versions, one is for iPad, and the other one is for iPhone. Is there a global variable or something that indicates if I am running my test in iPad or iPhone? I'd like to use it (e.g. in a conditional) to take advantage and just make a few modifications in the iPhone tests that I have already finished.
Asked
Active
Viewed 102 times
0
-
I think KIF is irrelevant here - you can test the same way you normally would. – Aaron Brager Feb 10 '15 at 16:31
-
Yes, it is. I noticed it a few minutes ago. The reason is I am new using xcode. Thank you Aaron. – lmiguelvargasf Feb 10 '15 at 17:16
1 Answers
1
You can define macro
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone)
That's how we used it.

ppolak
- 641
- 5
- 8
-
1You might want to future-proof with `== UIUserInterfaceIdiomPad`. `UIUserInterfaceIdiomWatch` and `UIUserInterfaceIdiomCar` could be just around the corner… – Aaron Brager Feb 10 '15 at 17:50
-