Merging microPebble-KMP back into microPebble

In this blog post, I mentioned that it seemed like the next step for the microPebble-KMP work was to merge it back into microPebble. I spent some time this evening reading the code, and I think I understand what was built as:

  • A handful of business logic was split out of the ui module (for instance, DeveloperConnectionScreenState moved to a commonMain).

  • There were some Bluetooth bug fixes, especially on Android 13!

  • iOS build scaffolding (hooray!)

  • There is a bunch I don’t understand around reimplementing more ui in common with a root composable of com.matejdro.micropebble.ui.MicroPebbleApp (and in turn instantiating a com.matejdro.micropebble.ui.navigation.HomeScreen), and I’m not sure I understand why this is necessary rather than using the existing com.matejdro.micropebble.home.HomeScreen.

    But then, I can’t figure out how the existing home.HomeScreen is supposed to be instantiated, either! It seems like there is a lot of navigation stuff that I truly do not understand in the Android world, and I don’t understand why it is unnecessary (or elided?) in the iOS world – or how it might be shared.

So this was kind of a wild ride so far. I initially thought that most of the existing UI got rewritten, and that’s not true. Some of it did, and I’m not sure I understand where this is necessary and where this is unnecessary. So I guess the question is: is the new way something that happened to be quicker to get to a PoC, or something that is inherently better in the iOS-ComposeMP world? And which way do we wish to settle on for where to put UI things going forward?

1 Like

So, how is the status of this?

I was thinking of making a bigger maintenance update on microPebble (update dependencies etc.), but if this is already underway, it would make it even harder to migrate. Do I proceed?

1 Like

I’m waiting to hear back from Intent on when they can start the next phase – so nothing has happened yet from that side. Given that, I think it is reasonable to not block a maintenance update on that, and then we’ll just have to deal with that.

1 Like

If everything goes according to plan, I will be able to update the navigation library used in the microPebble to the KMP-compatible version. So, in theory, it should make iOS migration much easier.

1 Like

Sounds good. It looked to me like that was a big source of the diffs. I think the Intent team has been traveling but I expect to hear back from them today.

1 Like

I got mail back from Intent today. They’d like to have a KMP-focused developer on it, and they probably won’t have availability until May/June to ramp on it.

So it sounds like if we want to continue to work with Intent, we probably would want to get the iOS build working ourselves first (maybe this will be easier now that you will merge the KMP-compatible nav library? if you make that change then maybe I can muddle through the rest of it) to bridge the gap, and then they’ll come online in May/June to work on UI stuff.

1 Like