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?
Is it possible to develop apps in iOS/Mac-OSx which needs hooking in iOS/Mac (similar
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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)