-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat: Swift libs import recommendations #5202
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
Conversation
mMaxy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
zamulla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
I left several suggestions, some of which are debatable but feel like clarity improvements to me. Let me know what you think.
|
|
||
| You can create an interface or use Swift closures for the "expected" part. The interface-based approach scales better | ||
| for multiple functions and testability. Closures are great for quick prototypes, but the approach has its limitations — | ||
| for example, it doesn't hold state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a little hard to discern the two options, I would suggest transforming this into a list (I'm for removing quotation marks here too, I think it's clear what we're referring to):
You can implement the expected part in one of two ways:
- Create an interface. This approach scales better...
- Use closures. They are great for...
| </tab> | ||
| </tabs> | ||
|
|
||
| In a more complex project, it's more convenient to use dependency injection to pass the Swift implementation back to Kotlin. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do a what's next here? expect/actuals?
Koin has a huge article on this, maybe mention them until we have our own resource on this: https://insert-koin.io/docs/reference/koin-mp/kmp/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, I added links to both our explanation of the DI and Koin's
Co-authored-by: Aleksey Zamulla <aleksey.zamulla@jetbrains.com>
zamulla
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
No description provided.