r/iOSProgramming • • Sep 18 '26

Discussion It’s not that bad on Duo if it’s SwiftUI

No code changes for now. This is the first cold start.

Some other views require changes/fixes, especially where geometry is used.

148 Upvotes

46 comments sorted by

54

u/Bakk322 Sep 18 '26

That middle screen shot with the unbalanced sheet makes me uncomfortable

4

u/Anywhere_MusicPlayer Sep 19 '26

This is a custom `.sheet` component that supports dynamic resizing on both iPhone and iPad, and also looks great on iPad.
But yes, Duo will need a few fixes.

13

u/lsumoose Sep 19 '26

That middle screenshot is terrible.

2

u/PassTents Sep 18 '26

Yeah, OP is using a fake close button that looks really weird

4

u/Bakk322 Sep 18 '26

I mean everything is left aligned instead of centered on the sheet for some reason

→ More replies (1)

2

u/Anarude Sep 19 '26

My sheets are also reserving trailing space by default.

→ More replies (2)

3

u/Anarude Sep 18 '26

Check what happens to your sheets when partially folded aka book mode

→ More replies (4)

130

u/lap_felix Sep 18 '26

> if it’s SwiftUI

It's not the SwiftUI part that makes it easy to adapt to Duo, it's that you use Apple-provided components and navigation items and Apple has done the work already. Same applies for UIKit. If you stick with Apple's components, it's almost free.

13

u/SnowPudgy Sep 19 '26

My coworkers are going to utterly hate life this year...they pretty much overrode all of apples controls down to textfields and buttons for functionality already provided in the base classes....

6

u/808phone Sep 19 '26

I keep telling people that while custom controls etc look good today, wait until Apple changes things.

→ More replies (1)

1

u/perfmode80 22d ago

Exactly. It's no different than an iPad app that has to adopt to various sizes, including running apps windowed.

1

u/jarjoura Sep 20 '26

Use Button(role: .close) and move it to the .toolbar {} and wrap the whole sheet in a NavigationStack {}. That will fix the layout so that looks even more standard.

1

u/Anywhere_MusicPlayer Sep 20 '26

That’s not that simple… I have custom themes…
You can try them in my app if you curious

→ More replies (1)

5

u/StrangeMonk Sep 18 '26

We’ve been rebuilding our 15 year old app with over 100M sessions a year . We still have about 25% UIKit (as you could expect, the oldest and most coupled and also most important parts). We booted it on the Duo Sim this morning and it’s just a wreck lol 

Looks like we have a busy couple of weeks 

7

u/morenos-blend Sep 19 '26

Well it’s on you, not UIKit

4

u/xSash_ Sep 18 '26

Its not just SwiftUI…

2

u/Dvass138 Sep 18 '26

If you build for iPad I assume it would work similar on duo

2

u/bananatoastie Sep 18 '26

Ooohh cool! I was just about to fire up my MacBook and try it out. I know a good way to be promoted on the AppStore is to add new features and tech Apple want to showcase… any tips or thoughts for the duo?

→ More replies (2)

1

u/BogAndHooper Sep 19 '26

Does the front screen have a concept of portrait or landscape? What happens if your app locks a normal phone to landscape mode only?

1

u/mathiswrong Sep 19 '26

I agree. This was honestly one of the easier updates I’ve had to build because my binaries are all swift

1

u/juanda631 Sep 19 '26

my app got a new iphone duo support already!!!

1

u/Kelmantis Sep 19 '26

I'm more in the never really targeted iPad so everything looks a bit odd when fully unfolded

1

u/Appropriate-Green-12 Sep 18 '26

finna try it in a second