Reputation: 151
I need to create a super basic script package that will install like a regular iPhone app but only puts an icon on the user's desktop that links to a mobile website that I specify. I'm a PHP developer and am slightly familiar with Java but simply need a boost due to time constraints. Any help is much appreciated.
Thanks!
Upvotes: 0
Views: 387
Reputation: 2082
In your application delegate:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[application openURL:[NSURL URLWithString:@"http://yourwebsite.com"]];
}
That's all!
P.S.
Okay, I've made step-by-step instructions for you: 1) Open Xcode 2) Make a new project (file->new->new project -> Empty application) 3) Open AppDelegate.m (name may vary (depends on XCode version), so look for just ***Delegate.m ) 4) Replace
- (void)applicationDidFinishLaunching:(UIApplication *)application {
//...everything...
}
With what I've wrote above. (that is to say replace contents of the class method with another method which just opens URL)
Upvotes: 0
Reputation: 40951
You can just create a mobile friendly website and invite users to add it to their home screen. A nice way to do this is found here:
http://cubiq.org/add-to-home-screen
The iPhone will display a nice icon if your site has a tag like this:
<link rel="apple-touch-icon" href="path/myicon.png"/>
More info here:
http://woorkup.com/2010/08/06/how-t-custom-home-screen-and-web-clip-icons/
Upvotes: 2