Rob
Rob

Reputation: 7216

Changing iphone code on the fly

I have no idea where to event start searching for this type of thing, so I decided to ask the experts =)

I'm trying to design an app that parses html from websites and interprets it, HOWEVER as we all know, websites are not permanent and a change in format could render the app useless (or at least until apple approves version 1.x weeks later).

The way I would solve this problem in windows is to create a dll which parses the data, and simply update that file when something goes awry (very quick fix). Is a similar solution possible on the iphone? And most importantly, can you guys think of a better solution? I can't do it server side because of login complications, etc.

Thank you!

Upvotes: 0

Views: 218

Answers (4)

hotpaw2
hotpaw2

Reputation: 70733

You can download and execute Javascript inside a UIWebView. That's the only mechanism that Apple allows for downloaded code of any kind, and it's explicitly allowed in the SDK agreement.

Added: And you can easily feed some Javascript functions (in a hidden web view) some text and regex expressions to do text modifications this way.

Upvotes: 1

David
David

Reputation: 9965

As many programming problems are solved, add the proverbial level of indirection. Implement this dll idea you have serverside. You could set up this server so it acts as a filter to organize the data the iphone will read. That way you have control over your "interface" on the data, and have fast turnaround in case something goes awry.

Upvotes: 1

wonder.mice
wonder.mice

Reputation: 7593

Try to use some sort of interpretation language (like JavaScript or something hand-made if your specific task is simple). You can also compile Lua (http://www.lua.org) for iOS.

When your app starts it checks your server for new script version. If it available, downloads and uses it.

So, it is possible, but will take some your time to implement.

Upvotes: 0

Dan Ray
Dan Ray

Reputation: 21903

Applications that download and execute code are absolutely forbidden by the Apple Store approval policies. If you think about it, it makes sense--how can they really test and approve something that could download entirely untested behavior some time later on?

They're also not big on apps that only exist to skin web sites, but that's not really what you're asking about.

Turn-around time for upgrades isn't that long these days. 90%+ of apps submitted for update are approved within 7 days.

Upvotes: -1

Related Questions