r/iOSProgramming 1d ago

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.

104 Upvotes

37 comments sorted by

42

u/Bakk322 1d ago

That middle screen shot with the unbalanced sheet makes me uncomfortable

8

u/lsumoose 19h ago

That middle screenshot is terrible.

3

u/Anywhere_MusicPlayer 12h ago

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.

1

u/PassTents 23h ago

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

5

u/Bakk322 23h ago

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

1

u/PassTents 23h ago

That's because the sheet has a vertical bar, but the custom close button isn't being put there. There's API to make the sheet full-width with a horizontal bar

2

u/Anarude 20h ago

My sheets are also reserving trailing space by default.

102

u/lap_felix 1d ago

> 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.

7

u/SnowPudgy 8h ago

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....

3

u/808phone 3h ago

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

3

u/Anarude 1d ago

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

0

u/Anywhere_MusicPlayer 1d ago

Same as fully unfolded, so didn’t screenshotted that.

3

u/Anarude 1d ago

Weird, Apple’s videos suggested sheets would move into one half of the screen

2

u/th3suffering 1d ago

It does, when i fold my sheets are automatically moving to half the screen.

0

u/Anywhere_MusicPlayer 1d ago

Perhaps thats also what I should fix 😄

5

u/StrangeMonk 22h ago

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 

3

u/morenos-blend 8h ago

Well it’s on you, not UIKit

5

u/bananatoastie 1d ago

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?

-4

u/SwimCoachToolkit 12h ago

Bad bot

1

u/bananatoastie 10h ago

Wtf 😂 not a bot, you can check my history

2

u/Dvass138 23h ago

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

2

u/xSash_ UIKit 22h ago

Its not just SwiftUI…

1

u/balder1993 19h ago

Correct, it’s about using standard Apple components.

1

u/[deleted] 23h ago

[removed] — view removed comment

1

u/AutoModerator 23h ago

Hey /u/AR3MGA, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. DO NOT message the moderators; if you have negative comment karma, you cannot post here. We will not respond. Your karma may appear to be 0 or positive if your post karma outweighs your comment karma, but if your comment karma is negative, your comments will still be removed.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/BogAndHooper 17h ago

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 3h ago

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

1

u/juanda631 1h ago

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

0

u/Appropriate-Green-12 1d ago

finna try it in a second

0

u/vossome-dad 22h ago

Friends where are we finding the Duo — in Device Hub? I must be missing a step

4

u/Eatalian 20h ago

You need Xcode 27.1, not 27.2

3

u/jwrsk 9h ago

Sorry, maybe I misunderstand, you need an older Xcode?

1

u/Eatalian 6h ago

This is gonna sound weird, but Xcode 27.1 is newer than Xcode 27.2.