0

I want to check if a device has TikTok installed. Currently I am trying with:

func canOpenTiktok() -> Bool {
    if let url = URL(string: "tiktok://app") {
        if UIApplication.shared.canOpenURL(url) {
            return true
        }
    }
    return false
}

but that always returns false, regardless of whether or not Tiktok is installed.

Is there a way to check?

Bob Gilmore
  • 12,608
  • 13
  • 46
  • 53
Jkrist
  • 748
  • 1
  • 6
  • 24

1 Answers1

1

Update the info.plist adding LSApplicationQueriesSchemes and under LSApplicationQueriesSchemes add TikTok