I have followed the documentation from Bitly (which seems to be deprecated and lacking info in general about mobile deep links):
I've setup the mobile app in Bitly dashboard, as well as custom Домен. /> Нажимая ссылку Открывает приложение, мы получаем ссылку на назначение по глубокой ссылке, мы перенаправляем пользователя надлежащим образом < /li>
< /ul>
Фактическое поведение < /strong>: < /p>
Нажмите на ссылку. Пользователь надлежащим образом < /li>
< /ul>
Я упускаю какую -то часть конфигурации или что -то не так?import Foundation
import BitlySDK
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
Bitly.initialize("BITLY_APP_ID", supportedDomains:["CUSTOM_DOMAIN"], supportedSchemes: [""]) { response, error in
// response provides a BitlyResponse object which contains the full URL information
// response includes a status code
// error provides any errors in retrieving information about the URL
// Your custom logic goes here...
if let deepLink = response?.url {
print("
if let url = URL(string: deepLink) {
DeepLinkManager.shared.handle(url: url)
}
} else {
DispatchQueue.main.async {
DeepLinkManager.shared.page = "Response not called"
}
}
}
return true
}
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
return Bitly.handle(userActivity)
}
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return Bitly.handleOpen(url)
}
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... tlysdk-ios
Мобильная версия