Hi. I didn’t find the information online, so I’m a...
# korge
p
Hi. I didn’t find the information online, so I’m asking for community advice. 1. Is there a way to use some platform-specific APIs, like placing code in
iosMain
sourceSet, for example? 2. Is there a way to use KorGE game/library with already existing Xcode project? From what I see KorGE generates an Xcode project, but it is always updated automatically when I edit assets, for example. Is it possible to use
embedAndSignAppleFrameworkForXcode
gradle target to generate
.framework
of the game to be used with another project? (see https://blog.jetbrains.com/kotlin/2021/07/multiplatform-gradle-plugin-improved-for-connecting-kmm-modules/)
d
1. Yes, korge projects configure iosMain/mingwMain/linuxMain, etc. IIRC 2. Latest version in korge-next exposes a GLViewController that can be used in an existing xcode app. Though the korge plugin doesn’t do anything special to generate a framework. If that task is available on the kotlin plugin, I guess yes
The GLKViewController: https://github.com/korlibs/korge-next/blob/7426aa2578e3892fd64ac5a6d77dbcced06428e9/korgw/src/iosMain/kotlin/com/soywiz/korgw/DefaultGameWindowIos.kt#L195 (this file also contains a ViewController and a somehow App delegate) The objective-c entrypoint: https://github.com/korlibs/korge-next/blob/7426aa2578e3892fd64ac5a6d77dbcced06428e9/buildSrc/src/main/kotlin/com/soywiz/korge/gradle/targets/ios/IosProjectTools.kt#L18-L51 I guess with that you should be able to figure out how it works and maybe integrate it with an existing app. But let me know if I can help you with sometime else