Wondering what people are doing on iOS for list/de...
# decompose
j
Wondering what people are doing on iOS for list/detail navigation where you have for example to support MyMac target (or iPad) such that detail opens on right side here in this form factor (or opens new screen on say iPhone).....you get this "for free" if using default SwiftUI navigation (using likes of
NavigationView
) but haven't got. my head around how to use Decompose for this (there's tabs btw as well to show different lists no left e.g. sessions or speakers)
a
You can have a separate component that aggregates both list and detail components. And then somewhere at the parent level, choose one or another at runtime, depending on a flag passed (or maybe there is system property for this).
I could contribute this to Confetti if you don't mind. 🙂
j
yeah, that would be great, thanks....reading through the docs here and still not fulling understanding various options
👍 1
a
j
I'm getting this when I run code for that PR
ah, this is probably the other issue we had with lifecycle
btw this is how I'm running this ("My Mac (Designed for iPad)" target)
a
Yeah, I couldn't run that somehow, build was failing with weird errors like ConfetiKit import not resolved.
So I used iPad
j
were you trying to run
ConfettiMac
rather than
iosApp
by any chance (that was created to start building out proper macOS app but isn't in place yet....I just probably remove it)
a
Neither worked
j
this is using capability to run nominally iOS app and run on mac
a
I tried both ways
j
ah, ok
I have changes separately here for the lifecycle stuff.....I'll add to this PR
a
Sure! You could also merge your PR, and then update my branch
Up to you
j
I just added
LifecycleRegistryExtKt.resume(lifecycle)
here in AppDelegate and looks great!
K 1
a
Glad you liked!
j
thanks for that 👍
🎉 1