Durdu
Durdu

Reputation: 4859

Universal Links for iOS apps

Is there any way of opening a default iOS app from a universal link (for example the camera app).

If so, where can I find these public universal links?

Upvotes: 1

Views: 367

Answers (1)

Eridana
Eridana

Reputation: 2408

Do you mean this functionality?

func open(_ scheme: String) {
    guard let url = URL(string: scheme) else {
        return
    }
    if UIApplication.shared.canOpenURL(url) {
        if #available(iOS 10.0, *) {
            UIApplication.shared.open(url)
        } else {
            UIApplication.shared.open(url as URL, options: [:], completionHandler: nil)
        }
    }
}

// usage:
open("App-Prefs:root")

Apple documentation about URL Schemes

Gist for iOS Settings

Upvotes: 3

Related Questions