source-1: http://www.coredump.gr/articles/ios-anti-debugging-protections-part-1/
source-2: http://www.coredump.gr/articles/ios-anti-debugging-protections-part-2/
Many iOS applications use anti-debugging techniques to prevent malicious users from using a debugger to analyze or modify their behavior. In this first part of the iOS anti-debugging series I will describe one of the most commonly used anti-debugging techniques in iOS nowadays and provide ways to bypass it.
Using ptrace with PT_DENY_ATTACH
Ptrace is a system call that is primarily used to trace and debug applications. The ptrace call is defined as:
int ptrace(int request, pid_t pid, caddr_t addr, int data);