bayCoder
bayCoder

Reputation: 1355

Is hooking in iOS/Mac possible?

Is it possible to develop apps in iOS/Mac-OSx which needs hooking in iOS/Mac (similar to what we have in windows)? and how complex is it?

Upvotes: 3

Views: 1925

Answers (1)

AliSoftware
AliSoftware

Reputation: 32681

  • If you want to hook a third-party app in MacOSX, it is possible thru InputManager. See the SIMBL plugin that helps doing this by managing the InputManagers for you, or ApplicationEnhencer. More info here

  • If you want to intercept a call inside your own app, e.g. when a call to a method (possibly a system method), you can do class posing (obsolete) or method swizzling using objc_exchangeImplementations. This also works on iOS apps. More info here. Be careful anyway with this, this can potentially be dangerous, you have to know what you are doing (avoid infinite call loops, etc)

  • On MacOSX, you can also do C interception like on any UNIX system, to intercept system calls. But it is a bit more tricky and low-level (and system-wide)

Upvotes: 1

Related Questions