I want to make sure that certain functions designed to be caught by symbolic breakpoints, such as UIViewAlertForUnsatisfiableConstraints
, are not triggered during UI testing. However, I don't want to have the phone hooked up to the debugger and catching breakpoints. Instead, I want to crash the app somehow when these functions are run. How can I do this? Would dyld interposing help?
Asked
Active
Viewed 48 times
0

meisel
- 2,151
- 2
- 21
- 38
1 Answers
-1
Put a @try @catch around your call to UIApplicationMain. In the @catch block call:
kill( getpid(), SIGTRAP); //or SIGKILL

Mustang
- 363
- 2
- 9
-
The issue is that these functions generally don't throw exceptions – meisel Jul 30 '17 at 16:23