at-internet / piano-analytics-apple

Piano Analytics Apple SDK repository
https://developers.atinternet-solutions.com/piano-analytics/
MIT License
7 stars 13 forks source link

Objective-C interoperability for KMM #28

Open OndraBasler opened 4 months ago

OndraBasler commented 4 months ago

I have a KMM project and I want to create a simple KMM library for Piano analytics. I am facing the issue that I don't see a generated API in Kotlin. The issue is that this library is pure Swift and its public API is not exported to Objective-C. Kotlin/Native can work only with Objective-C. According to the documentation, the easy fix might be to add @objc to all public API classes and functions.

I can create a workaround on my side by creating a Swift library that would expose relevant API to Objective-C in the meantime. However I believe that the simplest solution to add the annotations to this library. This change would open doors to creating the KMM library that can be used by everyone.

I created a sample KMM library where you can see that the API is not generated. There isn't the workaround for the current state

adrienmu commented 1 month ago

i have the same issue !

adrienmu commented 1 month ago

will you provide this useful changes @alexey-troshkov ?

adrienmu commented 1 month ago

@OndraBasler i created a PR : https://github.com/at-internet/piano-analytics-apple/pull/29 what do you think about it ?

BenDz commented 1 month ago

Thank you for this, we will take a look at it!

adrienmu commented 3 weeks ago

Hello @BenDz, Have you been considering this PR for the next version of the SDK ? 🙏