https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

saket

04/09/2020, 7:38 PM
I’d like to create a macOS app, and was wondering if it’s a good idea to to write it using UiKit instead and then port to macOS. Dev guides for App Kit are awfully low.
j

Jurriaan Mous

04/09/2020, 7:47 PM
I did not confirm it myself but it seems Kotlin native does not support catalyst at the moment: https://github.com/JetBrains/kotlin-native/issues/3713
s

saket

04/09/2020, 8:08 PM
Ah using catalyst is completely out of the question in that case. Too bad.
s

Sam

04/09/2020, 9:36 PM
Correct. Until there is catalyst support in K/N it won’t work. Some have tried creating a framework with a MacOS target and referencing that from their Xcode Catalyst project but it complains. I’m hoping we’ll get support for it in 1.4. 🤞
k

kpgalligan

04/10/2020, 12:57 PM
So, there’s writing your UI in Kotlin, then there’s referencing your shared code from swift. “Some have tried creating a framework with a MacOS target and referencing that from their Xcode Catalyst project but it complains.” Are you saying you can’t use a shared code framework from a macos app, or just a Catalyst-specific macos app? Seems odd that Catalyst would prevent you from using a non-UI framework
s

Sam

04/10/2020, 5:15 PM
A catalyst framework is x64 and linked against the ios libraries. Right now the only target that does that in K/N links against the simulator which is not valid for use in Catalyst apps running on MacOs. If you try to use a macOS target, Xcode will complain that it isn’t a Catalyst framework because it has been linked to the macOS version of Foundation rather than the macOS catalyst version.
k

kpgalligan

04/10/2020, 5:19 PM
Ah! OK
5 Views