Guilherme Delgado
12/16/2025, 4:04 PMembedAndSignAppleFrameworkForXcode?Artem Olkov
12/16/2025, 4:06 PMGuilherme Delgado
12/16/2025, 4:07 PMopen class KotlinLong : KotlinNumber {
public init(value: Int64)
public convenience init(longLong value: Int64)
}
open class KotlinBoolean : KotlinNumber {
public init(value: Bool)
public convenience init(bool value: Bool)
}
public class GradientScreenUIViewController : KotlinBase {
public convenience init()
open class var shared: GradientScreenUIViewController { get }
open func make(randomize: @escaping (KotlinLong) -> Void) -> UIViewController
open func update(state: ScreenState)
}
public class TestScreenUIViewController : KotlinBase {
public convenience init()
open class var shared: TestScreenUIViewController { get }
open func make(value: Bool) -> UIViewController
}Guilherme Delgado
12/16/2025, 4:07 PMGradientScreenUIViewController uses KotlinLong but TestScreenUIViewController uses BoolGuilherme Delgado
12/16/2025, 4:07 PMKotlinBooleanGuilherme Delgado
12/16/2025, 4:11 PMpublic struct TestScreenRepresentable: UIViewControllerRepresentable {
let value: KotlinBoolean
public func makeUIViewController(context: Context) -> UIViewController {
TestScreenUIViewController().make(value: value)
}
public func updateUIViewController(_ uiViewController: UIViewController, context: Context) {
//unused
}
}
will fail because the exported framework asks for Bool instead of KotlinBoolean in .make(value: value)Artem Olkov
12/16/2025, 4:13 PMKotlin*. It is used each time the type should(may) be boxed. In your example it was used because it is a parameter inside an escaping closure (btw, probably may be used w/o boxing, probably can be reported as a bug)
I would say that this doc (and neighbouring articles) covers this quite well.Guilherme Delgado
12/16/2025, 4:16 PMBoolean? -> KotlinBoolean?Guilherme Delgado
12/16/2025, 4:16 PMGuilherme Delgado
12/16/2025, 4:16 PMArtem Olkov
12/16/2025, 4:17 PMArtem Olkov
12/16/2025, 4:17 PMand this (for swift exportBut your project doesn't use swift export?
Guilherme Delgado
12/16/2025, 4:19 PMembedAndSignAppleFrameworkForXcode. And if I use it inside a closure:
public class TestScreenUIViewController : KotlinBase {
public convenience init()
open class var shared: TestScreenUIViewController { get }
open func make(value: Bool, otherValue: @escaping (KotlinBoolean) -> Void) -> UIViewController
}
the type is expected.Artem Olkov
12/16/2025, 4:19 PMGuilherme Delgado
12/16/2025, 4:20 PMGuilherme Delgado
12/16/2025, 4:21 PMGuilherme Delgado
12/16/2025, 4:21 PMGuilherme Delgado
12/16/2025, 4:21 PMGuilherme Delgado
12/16/2025, 4:22 PMArtem Olkov
12/16/2025, 4:22 PMI’ll investigateThanks! If it was working on 2.2.21 as you expect - please file a ticket for that, as is it definitely a problem
Guilherme Delgado
12/16/2025, 4:45 PMpublic class SampleData : KotlinBase {
public init(v1: Bool)
open func doCopy(v1: Bool) -> SampleData
open func isEqual(_ other: Any?) -> Bool
open func hash() -> UInt
open func description() -> String
open var v1: Bool { get }
}
public class MainKt : KotlinBase {
open class func ExportTestFun(v1: Bool, v2: @escaping (KotlinBoolean) -> Void, v3: SampleData)
open class func MainViewController() -> UIViewController
}
For the input:
data class SampleData(val v1: Boolean)
fun ExportTestFun(v1: Boolean, v2: (Boolean) -> Unit, v3: SampleData){
}Guilherme Delgado
12/16/2025, 4:46 PMGuilherme Delgado
12/16/2025, 9:03 PM