Search code examples
kotlinkotlin-multiplatform

How to extend class form SharedCode module in Swift?


I have created open class GitHubApiClient in SharedCode module kotlin-multiplatform. When I extend this class in Android app it works fine, but when I want to extend class in IOS app I have an error: enter image description here

In the SharedCode module class is open:

enter image description here

In Xcode class GitHubApiClient looks like this:

enter image description here

How I can fix this problem? I need that this class will be open in Xcode too. I use kotlin_coroutines version 1.3.0 ktor version 1.2.4 and kotlin serialization version 0.12.0


Solution

  • Try to change private to open in GithubApiClient constructor.