Support Compose Multiplatform
Currently this is Android only. Now that Compose Multiplatform is a thing would be nice to support other platforms
I currently just started converting my compose libraries to KMP... I'm currently converting my KotPreferences library and will step by step convert all my compose libraries afterwards...
I will only support android and jvm though - if a library is KMP only then it should work everywhere, if not, I can not provide an iOS implementation myself as I don't own a mac to make any tests nor do I have experience with native iOS coding yet...
I can't say when this library will be updated yet, though
So far I'm done with this.
Here's some explanation on why I currently tag the release as pre release and compatibility with other libraries: https://github.com/MFlisar/compatibility/blob/main/readme.md
I will only support android and jvm though - if a library is KMP only then it should work everywhere, if not, I can not provide an iOS implementation myself as I don't own a mac to make any tests nor do I have experience with native iOS coding yet...
Note that as of Kotlin 2.1.0 there is an experimental feature (that works well) that allows you to build klibs for iOS on non-Macs.
See https://kotlinlang.org/docs/whatsnew21.html#ability-to-publish-kotlin-libraries-from-any-host
Thanks for the info - I did not know that. I tried to implement missing things in my libraries for iOS as well, it's mostly file access stuff only => this stuff is just untested though but implemented. Everything is build on a mac via github actions, so I do support iOS nearly everywhere...
I'd be happy to test it if you need that support
I test all my libraries on windows, wasm and android but iOS and mac is missing...
I plan to buy a mac mini at the beginning of next year and publish my first iOS app, but this is just planned so I don't know how fast I will really be. And help and confirmation that a library is working would be appreciated.
iOS tests
What would you offer? I would need help from setting up the demo app and testing it as I don't know how to set up the iOS demo... Testing alone would not be enough...
But to be honest, I would need to start with my 2 base libraries KotPreferences and Lumberjack - this library has modules for those 2 libraries so you could not confirm that this library works completely without confirming that the other 2 work...
I just meant that if you can publish a library for iOS I will try it out to see if it is working.
You might want to investigate a testing farm instead of buying your own machine if you only need it for testing your libraries. Some have free tiers
I might be checking out LumberJack as we need a good logging framework.
We use https://github.com/russhwolf/multiplatform-settings so KotPreferences not useful to us
this library is published for iOS so you could try it already...
Seems to work for iOS, but a couple of notes:
- Your example does not work for KMP. You used BuildConfig.DEBUG for enabling. There is no BuildConfig for KMP. For iOS there is no debug vs. release builds for iOS
- It seems to support dragging from anywhere on the screen which could interfere with swiping in the normal UI, This may affect Android as well. Might be nice to support a tab on the side to pull out the debug drawer in only that place
Your example does not work for KMP. You used BuildConfig.DEBUG for enabling. There is no BuildConfig for KMP. For iOS there is no debug vs. release builds for iOS
I can only find BuildConfig.DEBUG in the android demo inside platform specific code... It's just an example, personally I never use it like that, I always have developer settings in my app and enable/disable the drawer there...
It seems to support dragging from anywhere on the screen which could interfere with swiping in the normal UI, This may affect Android as well. Might be nice to support a tab on the side to pull out the debug drawer in only that place
That's the same on all platforms - if the content is swipeable it does not interfere with it in my tests though and this is just how the ModalNavigationDrawer works. I do expose the drawers setup though so you can adjust it if desired:
https://github.com/MFlisar/ComposeDebugDrawer/blob/1b3f5f00067f6c32530787804ef069fa766aef62/library/core/src/commonMain/kotlin/com/michaelflisar/composedebugdrawer/core/DebugDrawer.kt#L98-L109
E.g. you can disable the gesture support via the gesturesEnabled if desired...