Sofiane Abbar
09/23/2024, 3:04 PMUIApplication.sharedApplication().open(_:options:completionHandler:)
instead of UIApplication.sharedApplication().openURL(nsUrl)
Does anyone encounter that issue? Not sure to understand how Platform is updated… Quite a blocking pointDmitry Stakhov
09/23/2024, 5:47 PMSofiane Abbar
09/24/2024, 1:03 AMUIApplication.sharedApplication().openURL(nsUrl)
in a kotlin file, but it is not compatible with ios 18.
You know for the bridge with actual/expect.
internal actual fun navigateToDeviceFeatures() {
val nsUrl = NSURL.URLWithString(UIApplicationOpenSettingsURLString)
val success = UIApplication.sharedApplication().openURL(nsUrl)
if (!success) {
println("Failed to open URL: $nsUrl")
}
}
This is related to compose, my question is who is responsible of that import Platform.UIApplication
UIApplication.sharedApplication().open(_optionscompletionHandler:) can’t be foundDmitry Stakhov
09/24/2024, 1:19 AMUIApplication
is a native component and a part of UIKitSofiane Abbar
09/24/2024, 5:36 AMPlatform.UIApplication
is a “binding` from Kotlin right?
.open() is missing while openUrl() is availableDmitry Stakhov
09/24/2024, 6:26 AMPlatform.UIApplication
is a “binding` from Kotlin right
No, It's built from ObjectiveC using Cinterop tool that supports calling ObjectiveC code from Kotlin.
So basically Kotlin just provides you the API that Apple has added to their iOS SDKSofiane Abbar
09/24/2024, 9:26 AMDmitry Stakhov
09/24/2024, 1:01 PMxcodeVersion
Gradle task from your KMP project to check Kotlin has detected to Xcode build tools with the right version.
If everything is ok run commonizeNativeDistribution
Gradle task to regenerate Kotlin functions to call iOS SDK.
Also for similar questions please reach to the #C3PQML5NU or #C3SGXARS6 channelSofiane Abbar
09/24/2024, 2:01 PMcommonizeNativeDistribution
that i dont really have in Gradle.
Thanks for the adviceshafiz
09/25/2024, 1:27 AMVaizin Nikita
09/25/2024, 8:14 AMSofiane Abbar
09/25/2024, 9:37 AMSofiane Abbar
09/25/2024, 11:34 AM