alexzhirkevich / compose-cupertino

Compose Multiplatform UI components for iOS (Cupertino Widgets)
Apache License 2.0
1.03k stars 34 forks source link

Example project doesn't compile for iOS #56

Open SebastianAigner opened 1 month ago

SebastianAigner commented 1 month ago

Hi! Just tried to compile the official sample project for iOS, unfortunately without success. Ran into the following:

/Users/Sebastian.Aigner/Desktop/github/repro/compose-cupertino/cupertino-native/src/iosMain/kotlin/io/github/alexzhirkevich/cupertino/CupertinoDatePickerNative.ios.kt:63:15: error: Cannot access 'var isManual: Boolean': it is internal in 'io/github/alexzhirkevich/cupertino/CupertinoDatePickerState'.
/Users/Sebastian.Aigner/Desktop/github/repro/compose-cupertino/cupertino-native/src/iosMain/kotlin/io/github/alexzhirkevich/cupertino/CupertinoDateTimePickerNative.ios.kt:37:15: error: Cannot access 'var isManual: Boolean': it is internal in 'io/github/alexzhirkevich/cupertino/CupertinoDateTimePickerState'.
/Users/Sebastian.Aigner/Desktop/github/repro/compose-cupertino/cupertino-native/src/iosMain/kotlin/io/github/alexzhirkevich/cupertino/CupertinoTimePickerNative.ios.kt:44:15: error: Cannot access 'var isManual: Boolean': it is internal in 'io/github/alexzhirkevich/cupertino/CupertinoTimePickerState'.
/Users/Sebastian.Aigner/Desktop/github/repro/compose-cupertino/cupertino-native/src/iosMain/kotlin/io/github/alexzhirkevich/cupertino/CupertinoTimePickerNative.ios.kt:64:19: error: Cannot access 'var mHour: Int': it is internal in 'io/github/alexzhirkevich/cupertino/CupertinoTimePickerState'.
/Users/Sebastian.Aigner/Desktop/github/repro/compose-cupertino/cupertino-native/src/iosMain/kotlin/io/github/alexzhirkevich/cupertino/CupertinoTimePickerNative.ios.kt:65:19: error: Cannot access 'var mMinute: Int': it is internal in 'io/github/alexzhirkevich/cupertino/CupertinoTimePickerState'.
error: Compilation finished with errors

Commenting out the the offending lines yields the following error in PresentationController.ios.kt:

"Objective-C method parameter is not supported here: doesn't correspond to any C type"

Cheers!

alexzhirkevich commented 1 month ago

Thanks, those issues left from Kotlin 2.0 upgrade. Fixed