Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I launch one app from other app on iPhone

I want to create app which have to launch another app and run some features in last.

I mean my app A call app B and run in B some method.

Can I do this?

I know that I want to use URL scheme, but can I run some method in another app?

Thanks!

like image 230
Matrosov Oleksandr Avatar asked Apr 13 '12 22:04

Matrosov Oleksandr


People also ask

Is it possible to open an app from another app?

In android, we can lunch other applications using packing name. This example demonstrate about How to Launch an application from another application on Android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.

Can you run two of the same app on iPhone?

You can place multiple copies of the same app on your home screen with iOS 15. Here's a funny one: iOS 15 lets you place multiple copies of the same app on Springboard. This means you can have the same app duplicated across your home screens, as many times as you want.


1 Answers

Yes you can achieve this using custom URL Schemes. See Communicating with Other Apps.

App B will need to register a custom URL Scheme which App A uses to launch B and pass it commands.

The following code fragment illustrates how one app can request the services of another app. “todolist” in this example is a hypothetical custom scheme registered by App B.

NSURL *myURL = [NSURL URLWithString:@"todolist://www.acme.com?Quarterly%20Report#200806231300"];
[[UIApplication sharedApplication] openURL:myURL];
like image 130
TheCodeKing Avatar answered Sep 22 '22 17:09

TheCodeKing