Paul Wisner
09/30/2024, 8:44 PM[Application] BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).
Also got the same result from LocalUrlHandler.current.openUri(url)
.
I tried what's written in the error message, but that function doesn't seem to be defined. Or I don't know how to write it - I come from an Android compose background..
I also tried directly adding the 1.7.2 version of androidx.compose.ui but gradle sync barfed - looks like a version conflict..Paul Wisner
09/30/2024, 8:56 PMUIApplication.sharedApplication.openURL(NSURL(string = url), options = mapOf<Any?, Any?>()) {
if (!it) {
println("Failed to open URL: $url")
}
}
Paul Wisner
09/30/2024, 9:13 PMmarkturnip
10/01/2024, 6:45 AMUIApplication.shared.open(url, options: [:], completionHandler: nil)
rather than openURL
?Michael Paus
10/01/2024, 7:55 AMMarcos Paulo Farias
10/01/2024, 12:18 PMPaul Wisner
10/01/2024, 2:13 PMLocalUrlHandler.current.openUri(url).
is calling the deprecated signature of openURL. But the bug linked as a duplicate is that the deprecated version no longer works.- which is not even a bug.Paul Wisner
10/01/2024, 2:15 PMUIApplication.shared.open
doesn't exist in compose multiplatform. (Or I don't know how to make the reference resolve.)Michael Paus
10/02/2024, 6:56 AM