Call method from another app (Jailbreak iOS) -
on jailbroken ios device, possible 1 app call method app (an instance method, not static one)? way of phrasing this: how can instance of app (assuming app running) can call 1 of methods?
background: trying call function in music player app hooked method in ipodui
private framework (see this post more details).
this question has been asked android, didn't find jailbreak ios. if that's because i'm asking wrong question , there's different approach take, i'm open that.
an easy , alternative way achieve cycript , system() call, please beware of dangers of using system() before using potentially insecure (which is, opinion, not important on jailbroken ios pretty unsafe)
let's have method [[someclass sharedinstance] methodtobecalledexternally]
want call other process
you can save call text file in /tmp/something.cy
then inject code externally running:
cycript -p music /tmp/something.cy
but if need programatically, , of course if environment isn't sandboxed (i assume isn't), can do:
system("cycript -p music /tmp/something.cy")
this way can execute arbitrary objc code in process (in case, music app), code.
finally, don't forget remove file /tmp/something.cy
no longer need it
Comments
Post a Comment