Using PTRACE_DENY_ATTACH for Anti-Debugging

Hello, Can we use ptrace() method to detect whether or not the debugger is attached to our app? Is using ptrace() prohibited in iOS, and the App store might reject the app using it? Can anyone suggest the best way to stop the debugger to attach to our app in release mode.

ptrace is not in the iOS SDK and thus is not public API on iOS. The App Store Review Guidelines are very clear that “Apps may only use public APIs”.

Having said that, PTRACE_DENY_ATTACH is pretty pointless on iOS IMO. See this post for more on this.

Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"