Opening an iOS app from another iOS app

From Cheeky Factor

Status: Resolved
Publication date:
Last edited by: Garyf
Last updated: 2023 - 11 - 11

The problem

There may be occasions where you want to link to content in another app. You can open this by a few lines in Xcode.

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.

The resolution

Please note: cheekyfactor.com or the owners of this site cannot be held responsible if things go wrong. You perform these tasks at your own risk.


Device: iPhone
Operating system: iOS
Software: Xcode

Guidance for iPhone, iOS, Xcode

First, open the Cheeky News app in Xcode:

This show the Cheek News open in Xcode in the main information page for the deployment targets.
Cheeky News open in Xocde

Open the info.plist for the app:

This shows the Cheeky News info plist
Cheeky News info.plist

Right click and add a new row and select URL types:

Cheeky News URL select in the info.plist
Cheeky News URL select in the info.plist

Over the Item 0, click on the + and select URL schemes:

This shows the URL schemes that are under the URL identifier.
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:

This shows where I am going to link to the Cheeky News app from.
Cheeky Radio file to link to Cheeky News

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.