I've tried to open that app https://itunes.apple.com/us/app/cb-pay/id1333054033?mt=8
from my existing app. Problem is whenever I've tried to open, it always shows
-canOpenURL: failed for URL: "cb-pay://app" - error: "The operation couldn’t be completed.
even I've installed that app in my iPhone and already configured inside LSApplicationQueriesSchemes
.
Is that because of app name is included space or dash between two words? I've tried to open photos app inside my app, it's working.
if UIApplication.shared.canOpenURL(cpayURL!) {
if #available(iOS 10.0, *) {
UIApplication.shared.open(cpayURL!, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(cpayURL!)
}
} else if UIApplication.shared.canOpenURL(cpayInstallURL!) {
UIApplication.shared.openURL(cpayInstallURL!)
}