Trey
11/08/2023, 9:01 PMTask :shared:compileKotlinIosSimulatorArm64 FAILED
/Users/builder/Projects/TestApp/shared/src/iosMain/kotlin/com/testapp/app/AppDelegate.kt:13:22: error: Overload resolution ambiguity:
public open fun application(application: UIApplication, didFinishLaunchingWithOptions: Map<Any?, *>?): Boolean defined in platform.UIKit.UIApplicationDelegateProtocol
public open fun application(application: UIApplication, willFinishLaunchingWithOptions: Map<Any?, *>?): Boolean defined in platform.UIKit.UIApplicationDelegateProtocol
error: Compilation finished with errors
Landry Norris
11/08/2023, 9:23 PMTrey
11/08/2023, 9:24 PMimport platform.UIKit.UIApplication
import platform.UIKit.UIApplicationDelegateProtocol
import platform.darwin.NSObject
class AppDelegate : NSObject(), UIApplicationDelegateProtocol {
override fun application(
application: UIApplication,
didFinishLaunchingWithOptions: Map<Any?, *>?
): Boolean {
return true
}
}
Vlad
07/16/2024, 2:42 PMclass AppDelegateKotlin : NSObject(), UIApplicationDelegateProtocol
in the iOS main and nowhere even using it - breaks the iOS buildVlad
07/16/2024, 2:49 PM@file:Suppress(
"CONFLICTING_OVERLOADS",
"PARAMETER_NAME_CHANGED_ON_OVERRIDE",
"RETURN_TYPE_MISMATCH_ON_OVERRIDE"
)
Still wonder if I should continue implementing iOS' AppDelegate in kotlin because of other possible pitfallsTrey
07/16/2024, 2:51 PM