PDA

View Full Version : app out of app




exmerci
Feb 10, 2012, 11:54 AM
Hello,

i'm ab beginner in xcode.
I have make an app with a button to start an website.
My question. Is it possible to make a button in an app to start another app?



jonnymo5
Feb 10, 2012, 01:38 PM
If you just want a website you don't need another app. You could certainly tell the iPhone to open the url using mobile safari app but you could also just include a webview in your application.

Can you give some more detail on what you want to do and what kind of webpage you want to open?

xStep
Feb 10, 2012, 02:07 PM
As jonnymo5 said, more detail of your needs would be helplful.

The following code will open up the URL into Safari. I connect a button to it, in Interface Builder in my case. This will push your app in the background of course.

- (IBAction) appWebSite:(id)sender
{
NSString * urlString = [NSString stringWithString: @"http://www.morphedthought.com"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: urlString]];
}

dejo
Feb 10, 2012, 02:16 PM
Is it possible to make a button in an app to start another app?
Yes, if you know the Custom URL scheme of the other app.

exmerci
Feb 10, 2012, 03:04 PM
Yes, if you know the Custom URL scheme of the other app.

Okay, and how ist the code?

I want to start apples remote out from my app.

dejo
Feb 10, 2012, 03:37 PM
Okay, and how ist the code?
I feel I've given you enough info that you should be able to find this out on your own. I normally don't just give coded solutions out.

I want to start apples remote out from my app.
Do you know the Custom URL Scheme for Apple's Remote app?