How to integrate two application in one application in iOS.I need to open different application on click tab of my main application.
Asked
Active
Viewed 85 times
-3
-
2Possible duplicate of [Swift: How to open a new app when uibutton is tapped](https://stackoverflow.com/questions/33932303/swift-how-to-open-a-new-app-when-uibutton-is-tapped) – Tamás Sengel Feb 05 '18 at 11:31
-
You have to show more than just one line of text. Check if the4kman's comment is correct. If its useful remove question. If not, be specific by showing why in yourself edited question. – ZF007 Feb 05 '18 at 11:50
1 Answers
0
On click of UIButton, you take the other App URL and can open it using:
var newApp = "yourApp://"
var newAppUrl = NSURL(string: newApp)
if UIApplication.sharedApplication().canOpenURL(newAppUrl!)
{
UIApplication.sharedApplication().openURL(newAppUrl!)
}

Abhishek Jain
- 826
- 8
- 20
-
Thanks Abhishek, But this is not suitable answer for me. Because I am not Having URL of secondary app. I've 2 different projects on Xcode and i wants to open secondary app from a particular View controller ( on click tabBar button). – Ruchi Feb 05 '18 at 11:57
-
-
-
Then just use the name of the second app right. The URL just becomes the name of your second app appended with '://'. – Abhishek Jain Feb 05 '18 at 12:09
-
And if you don't even know the app name then how can you open it. Your app needs to what it's gonna do. – Abhishek Jain Feb 05 '18 at 12:11
-
actually i am having two different projects my clients wants to integrate secondary project in my application by adding option in tabBar, onclick tabBarBtn home screen of the secondary project should be opened. – Ruchi Feb 05 '18 at 13:22
-
-
It depends how the two apps will differ. If the GUI will be very similar then different targets would do. But if you want flexibility to change the GUI of each app by big amounts then you could create separate projects but put common model functionality into a library which is linked to by the different projects. – Abhishek Jain Feb 06 '18 at 05:07
-
Thanks Abhishek. I ll do the same. If i'll be stuck in code then it ll be grateful for me to if u'll help me in this code. Thanks – Ruchi Feb 06 '18 at 05:12
-
-
Why haven't you accepted Sweeper answer here in this question? https://stackoverflow.com/questions/47151682/timedifference-between-minimum-date-and-maximum-date – Abhishek Jain Feb 06 '18 at 05:22
-
-
-
-
Thank you so much. I didn't mean to force, it's just a way of showing love to the community. :) – Abhishek Jain Feb 06 '18 at 05:40
-
Actually i was not known of this, and i am thankful of urs to aware me of this. – Ruchi Feb 06 '18 at 05:47