I’m reaching out for help with a problem I’m encountering in my media app associated to executing common hyperlinks. My app is designed to deal with common hyperlinks to navigate customers on to particular content material inside third-party purposes like Apple TV+ and Netflix. Whereas the implementation works as anticipated with Apple TV+ hyperlinks, directing the consumer to the supposed content material web page, I’m dealing with difficulties with hyperlinks from different providers resembling Netflix. For these, the app solely opens the goal utility with out navigating to the particular present or content material web page as supposed.
The related portion of my code concerned in dealing with the common hyperlinks is as follows:
dataStore = Backendless.shared.information.ofTable("TestTable")
testObject = ["foo": "Hello World"]
dataStore?.save(entity: testObject!, responseHandler: { savedTestObject in
// Code to replace UI parts
if let deepLink = savedTestObject["foo"] as? String {
if let url = URL(string: deepLink) {
let choices: [UIApplication.OpenExternalURLOptionsKey: Any] = [.universalLinksOnly: true]
UIApplication.shared.open(url, choices: choices, completionHandler: { success in
if success {
print("Opened url efficiently")
} else {
print("Didn't open url")
}
})
}
}
}, errorHandler: { fault in
self.showErrorAlert(fault)
})
}
From the snippet above, I’m trying to execute common hyperlinks saved inside a backend database. The supposed conduct is to direct the consumer to a selected web page inside a third-party app primarily based on the URL offered. This works flawlessly with Apple TV+ hyperlinks, however when executing hyperlinks from Netflix or related providers, it falls brief by solely launching the app with out navigating to the required content material.
The Netflix URLs have tried are:
http://www.netflix.com/title/81731618
nflx://www.netflix.com/title/81731618
Please word that one other App works nice with the JustWatch App so I feel there are not any Limitations imposed by Apple.