Max Heimer
02/26/2025, 10:21 AM<other-app://test>
).
The deeplink opens the other app seamlessly in Android but on iOS opening the app fails without an error. When opening a webpage with the same mechanism, the browser opens, though. And when opening from a native iOS App, this works as well.
This is the file App.ios.kt
I am using to implement the native code:
@Composable
actual fun getContextProvider(): ContextProvider {
return object : ContextProvider {
override fun launchIntent(url: String) {
val nsUrl = NSURL.URLWithString(url)
if (nsUrl == null) {
println("invalid url: $url")
return
}
val canOpen = UIApplication.sharedApplication.canOpenURL(nsUrl)
if (canOpen) UIApplication.sharedApplication.openURL(nsUrl, options = emptyMap<Any?, Any>(), completionHandler = null)
else println("Can not open url")
}
}
}
The canOpen
check returns true
but still the app is not opened...
All hints welcome!
TLDR: App scheme deeplink does not open on CMP for iOSFrançois
02/26/2025, 1:38 PMMax Heimer
02/28/2025, 1:17 PMcanOpen
and just open it directly... 🎉