1

I stuck a little bit at an easy seeming task...

<THE PLAN>

Developing a cycript-based application that retrieves the information which app has to be installed on the device. The cy-script navigates to the downloadpage (Apple AppStore) of the app and executes the installation-process.

</THE PLAN>

I'm already at the point where the downloadpage is open. So it's not the problem to hook up at the SpringBoard- or AppStore-process and play around, I just can't figure out how to execute the INSTALL button or the installation-process.

Than I found a private framework that definitely could solve my problem. By being hooked up at the AppStored-process and executing

cy# [SSDownloadManager _triggerDownloads]
(StoreServices.framework) the alertview for the authentication pops out, but if I fill in the user-pw nothing happens... of course not, because there's is no information relating to the app bound to the SSDownloadManager... I just don't know how to use that private frameworks... (and of course there's no documentation)

I think somehow it has to be possible with:

cy# [SSPurchase purchaseWithBuyParameters:x]

but don't know how to find out what the buy parameters are...

I would appreciative it, if someone could help me out of this. Hope the explanation wasn't to confusing ^^

eppej
  • 119
  • 17

1 Answers1

1

Did you consider just simulating a click on "Install" button? If you can hook up AppStore, you can do something like that

Community
  • 1
  • 1
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
  • Yes, I've considered this. The problem is that the AppStore-App isn't an usual iOS-App. It's a webview, so the button isn't a UIButton. Here's the tag:
    . But thx
    – eppej Feb 11 '13 at 08:52
  • Take a look at following method. It allows to execute javascript in UIWebView. So, you can write a javascript to click a button (using id="buy")http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html – Victor Ronin Feb 11 '13 at 15:14
  • Hi Victor, I already tried this one and it works very fine with the most stuff I want to do in javascript but I can't simulate a click on that button (I kinda believe this button is cursed). My steps: 1. get the webview-address from the viewhierarchy: cy# UIApp.keyWindow.recursiveDescription 2. create a new instance of the webview by using its address: cy# var webview = new Instance(0x1dd02970); 3. try to simulate a click on that button: cy# [webview stringByEvaluatingJavaScriptFromString:@"document.getElementsByClassName('buy')[0].click()"] or dispatchEvent()... nothing happens. – eppej Feb 12 '13 at 07:42
  • @eppej: You are welcome. I am a little bit out of depth here. I would recommend to try do it step by step: try to do getElementsByClassName, check that array size is 1, get 0 element, show alert, check something else, show alert, try to click, show alert (just to make sure that it goes through all the steps). Also, try to load in WebView some very simple html with a button and try to click on it using a code (just to check that code works). – Victor Ronin Feb 12 '13 at 15:45