gpt4 book ai didi

ios - Deeplink 仅打开应用程序但不打印快速操作所需的组件

转载 作者:行者123 更新时间:2023-11-28 07:22:27 25 4
gpt4 key购买 nike

我将通用链接添加到我的项目中,并完成了将关联文件上传到我的服务器的整个过程。已测试,可用。现在我正在尝试打印一个特定的值,但是每当我单击该应用程序时,它只会打开应用程序。我尝试在控制台上打印一些值,但它们从未打印出来 下面是我的代码

extension AppDelegate {

func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {

guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
let url = userActivity.webpageURL,
let components = URLComponents(url: url, resolvingAgainstBaseURL: true) else {
return false
}
log("DEEP :LINK 1 \(components)", .fuck)
log("DEEP :LINK 2 \(components.url)", .fuck)
log("DEEP :LINK 3 \(Int(components.url?.lastPathComponent ?? "0"))", .fuck)
// presentDetailViewController(Int(components.url?.lastPathComponent ?? "0") ?? 0)
NotificationEvent.id.accept(Int(components.url?.lastPathComponent ?? "0") ?? 0)
NotificationEvent.isFromNotification.accept(true)
if let webpageUrl = URL(string: "https://example.com") {
log("DEEP :LINK 1 weby \(webpageUrl)", .fuck)
application.open(webpageUrl)
return false
}

return true
}
}

最佳答案

你试试看

print("something")

代替

log("something")

?

关于ios - Deeplink 仅打开应用程序但不打印快速操作所需的组件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57673827/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com