Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Okta iOS in Kotlin Multiplatform Project #365

Open
Fumi17914 opened this issue Oct 9, 2024 · 0 comments
Open

Issue with Okta iOS in Kotlin Multiplatform Project #365

Fumi17914 opened this issue Oct 9, 2024 · 0 comments

Comments

@Fumi17914
Copy link

Describe the feature request?

I'm working on a Kotlin Multiplatform project and need to integrate Okta for authentication. I've successfully implemented the functionality for Android using file.android.kt, but I'm encountering issues with the iOS part.

The problem is that I need to either import the Okta iOS library into a file.ios.kt file to run platform-specific functions, or somehow call Okta functions defined in Swift from this Kotlin file. However, Kotlin Multiplatform doesn't allow directly importing Swift or Objective-C libraries into a .ios.kt file.

The solutions I've considered so far are:

Import the Okta iOS library directly into file.ios.kt.
Create a Swift class that handles the Okta functionality and call its methods from file.ios.kt.
Currently, I'm leaning towards the second approach: creating a Swift class that uses Okta and exposing its functions to Kotlin using interoperability. However, I'm wondering if there's a more efficient way or if anyone has successfully imported the Okta SDK directly into a .ios.kt file.

Any advice or solutions would be greatly appreciated. Thanks!

New or Affected Resource(s)

.

Provide a documentation link

No response

Additional Information?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant