Opening an iOS app from another iOS app.
In this example, I am going to create a link from one iOS app, in this example, I am going to open the Cheeky News App with Cheeky Radio Pro.
First, open the Cheeky News app in Xcode:
Open the info.plist for the app:
Right click and add a new row and select URL types:
Over the Item 0, click on the + and select URL schemes:
In the third column, give the app a unique name, in this case CheekyNews.
Run the app.
In the app you are going to link from, the link you will use is CheekyNews//
In this example, Cheeky Radio Pro this goes in the PopUpMenuViewController.swift file:
The link in this example is called by:
@IBAction func NewsButton(_ sender: UIButton) {
if let url = URL(string: “CheekyNews://”) {
UIApplication.shared.open(url)
}
}
Run the app and make sure it works. Job done. Go and get a coffee, you deserve it.