-2

I have an old post Re-Installing IPhone App From Inside The App

That old post was not so successful in getting what I wanted but now then I though more deeply and came to a conclusion to ask another question. I need to first describe my idea then you tell me if it's possible or not.

Say I have an IPhone app which downloads XCode compiled project from the internet in the phone memory. The compiled binary (not sure if it's really binary) can be opened and if I can read objects and members from the file via reflection, can I show UIView in my app? I mean UIViews is stored in the compiled file and can I extract those views with their functionality as objects to show them in my app as instance of them?

Sounds unrealistic? please do think again as it took me more than 20 hours to find this against my old post.

2
  • the one who answered or not could do that without downgrading my points :)
    – Umair A.
    Feb 11, 2011 at 18:51
  • I think so too, this is an interesting question to me. May 9, 2011 at 20:40

5 Answers 5

9

This would never be allowed to happen.

4
  • 3
    It's not allowed by the apple approval guides. Feb 11, 2011 at 18:31
  • Such an app would never be approved for App Store sale, you mean. If it were technically possible (and I'm not saying it is) and the developer were willing to distribute it in alternative ways, that's another issue.
    – Dan Ray
    Feb 11, 2011 at 18:40
  • can you post portion of Apple guidelines which made you answer like that?
    – Umair A.
    Feb 11, 2011 at 18:50
  • 7
    2.7 Apps that download code in any way or form will be rejected and 2.8 Apps that install or launch other executable code will be rejected Feb 11, 2011 at 19:00
4

See this document.

Specifically:

The creation and use of loadable bundles is not supported in iOS.

That includes dynamically loading code of any kind.

0

There is absolutely no way to do this, as was indicated in the answers to your last question. As well, it's unnecessary, your other question has many alternatives that would work perfectly.

If you want to show data, simply download it from the server as text or images, then implement a templating system to present it how you want

0

I've seen people attempting to do this in order to be able to install cracked versions of commercial apps... but... most apps cost CENTS. Do you reaaaally need to pirate them? If you bought the phone then you can surely buy a couple bucks worth of apps! (ok, I'm not saying the OP is in this situation but the post does sound fishy)

1
  • this is really not the intention.
    – Umair A.
    Feb 11, 2011 at 18:55
0

Stock iOS sandboxes executable code. There is no way to call or jump into any code that is downloaded. You can't directly use any downloaded member functions at all. The sandbox will kill an app if it even tries to do this.

Even if you could decompile methods and functions inside an unencrypted iOS executable, an app would not be allowed to interpret those decompiled results (unless maybe perhaps you could figure out how to decompile some ARM binary function completely into Javascript suitable for running in a UIWebView, and do all that conversion offline).

However, you could use the data from a downloaded app (extracted images, sounds, plists, perhaps even object data extracted from xibs), to modify the current running app. Apple has a WWDC 2010 video on data driven apps that explains some of how to do this.

2
  • when you say "...to modify the current running app." do you mean my app can start some other app from inside it?
    – Umair A.
    Feb 11, 2011 at 19:49
  • @Umair - No, not unless that 2nd app was already installed and had registered an appropriate URL scheme. What the current running app could to is show a new png contained in some download.
    – hotpaw2
    Feb 11, 2011 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.