2026-10-13 • iOS • 1:01:48
Connect with Apple engineers and designers online to ask questions, get advice, and follow the discussion about creating and updating apps for iPhone Duo. In this one-hour event, you’ll learn how to adapt your layouts across displays and poses, work with the hinge, support Split View multitasking, and build great camera experiences.
Downloads from Apple
Transcript
Hi, and welcome to today’s iPhone Duo Group Lab. Thanks for joining. I’m Curt, a technology evangelist on Apple’s Worldwide Developer Relations team. My colleagues and I will be taking your questions for the next hour. If you’re watching on the Apple Developer site, please submit your questions in the panel on your right. If you’re watching on YouTube and would like to submit questions or vote for your favorites, please hit the link below.
The Worldwide Developer Relations team has been hosting workshops around the world to help developers get ready for iPhone Duo. Developers have also been posting about the work they’ve been doing using Xcode 27.1 and Device Hub. We’ve been so impressed by everyone’s efforts to get their apps ready. Just ten days until iPhone Duo is in people’s hands.
I’m super excited about our panel for this Group Lab. You all come from a variety of different backgrounds and you worked on different things. And one of the things I find so cool about iPhone Duo is how the team came together to produce this really amazing product. And so maybe I think it would be good that we kick off by letting you each introduce yourself and say a little bit about what you worked on in this product. Nathan. Well, I’m Nate, I worked on the design team for the Duo, so mainly on the overall way the system fits together: Home Screen, Lock Screen, multitasking apps. Pinned video, those sorts of features. Yeah. Great. I’m Grant, I’m a human interface designer at Apple, and I worked on features for the iPhone Duo, including a whole bunch of the apps. So things like Messages, Files, Measure, and a bunch more of the apps on iPhone Duo.
Hi, I’m Andy and I’m an engineer on the UI frameworks team for the Duo. I worked on various components, getting them ready for the Duo environment, including tab bars, menus and various other components. Hi, I’m Anna. I’m also on the UI frameworks team, and I got to work a lot with all of these folks on the vertical bar and other features on iPhone Duo. I mostly work on bars and then navigation within apps, so stuff like NavigationStack or TabView. Awesome. So excited for the panel and with the breadth of expertise that we have.
So we’ve got some questions that have come in. And so we’ll, we’ll dive in. So this first one is, is an initial design question. So the question is how should developers approach designing an app that feels native across different iPhone poses. And I think we’ll start with you on this one, Grant. Different poses. Rather than simply adjusting an existing phone’s layout to the larger display.
Yeah, I think the key thing to remember is that you’re making one app for the iPhone, whether it’s an iPhone Duo or the iPhone Pro or any other kind of iPhone, right? And so you want your app experience to be fairly consistent across all the different poses and all the different layouts that it can show up in, right? So you want the same, usually the same type of controls or a similar set of controls, the same kind of hierarchy, the same kind of navigation and all that kind of stuff. And you want it to be continuous as you move between it. So people know where to look for controls. They know where everything is and they know how it all works.
Yeah. And so I think that’s the place to start: this is one app you’re creating and it just shows up in different poses. And maybe some of the controls show up vertically. They show up horizontally, but they’re still the same controls and it’s still the same app that should feel the same across the different devices.
Sure. Nate, do you have anything to add to that? Well, I think that kind of covers it. I think the unique thing about this phone specifically is people will use it in a lot more orientations. It’s very, I don’t know, it’s handy, like place it down, prop it up. So in that way, within a single phone, your app’s going to get used in a lot more.
Yeah. States than you might for just other phones. But yeah, taking advantage of the layouts across the full lineup, I think is key. Yeah. This is my experience when I get to play with one. And unlike some of our panelists, I’m not carrying one. But my experience, I wonder if you echoed this, is it’s an object that is nice to hold and manipulate and to use as a physical thing. And so I think that’s one of the fun things about it. And I think people will very frequently move between poses. Absolutely. Yeah.
All right. Our next question is about the hinge and positioning views. So Andy, I’m gonna start with you on this one. Sure. So when repositioning a custom view to avoid the partial fold division region, what guidance do you have to choose which side of the screen it should move to? Left. Right. Top. Bottom.
An example is the favorites added in library pop-ups in Music. Is there anything we should think about in terms of making those decisions? Yeah. So I think in general, there’s a lot of different ways, different views that could avoid either way. But I think for a lot of them, we tend to avoid more to the right because we found that more people are more likely to hold it that way. And so some of our views gravitate for controls more towards the right.
But then also there’s other elements that are maybe smaller and it, you would almost want to avoid it towards the side that it is mostly on if it was between the two. So one example of this is context menus. And the edit menu for text editing is that we will tend to stay on the side that the source view is on.
So if you know your cursor is currently on the left side, we will actually bring up the menu will stay on the left side so that it doesn’t feel like as you’re holding the device, it just shifts all the way to the other side and doesn’t really have that continuity anymore with the source view it came out of. And I think that’s how we’ve been approaching it.
And I think that’s worked a lot for us. Yeah, I think this is something that the hierarchy of your app can also really drive. And the way that Andy is saying, you often end up with app layouts that have a primary and a detail layout that ends up horizontally and at least on the left-to-right language, you often end up with the primary on the left and the detail on the right.
And so that drives the decision of how it avoids the fold. Is that just from your the hierarchy and the visual hierarchy of your app and the structure of it, like things are already placed in an appropriate position, and then they can just shift over to avoid the fold in that way.
One other thing that’s worth really considering is when the device is posed or is placed seated. And so you have a part that’s flat on the ground and then a part that’s upwards. It can be really useful to keep the interactive controls closer to the bottom. And that can really help with making sure that there’s a stable surface to press against for that.
Right. Thinking about our first question and moving between different arrangements of the device, are there considerations around what goes when the phone’s open, what goes on the right side in order for it to still be there when someone closes the device? Is that something we should think about too?
I think that will happen automatically in a lot of cases. So if you have a primary and a detailed layout, oftentimes that detail will be the thing that you see when the device closes as well. And so it’s often keeping the content fixed or relative to what it is. But that almost, in many ways, works automatically because the detail is the furthest down the hierarchy. And that’s where you say when you close the device as well. That makes sense. I guess we actually see that in the two center shots of Mail. Behind. Here. So. Excellent.
All right, I’m going to throw this one at you. Anna. I haven’t read the whole question, but it starts out with GeometryReader near the top. All right. I think it’s going to be technical. And it just jumped away from me. Here we go. Apps using a custom two-pane split with GeometryReader. After rotating the unfolded Duo from landscape back to upright in the Simulator, a pane kept its landscape width until we stopped a child view. This gets.
Let me try to summarize. So they’re using a custom two-pane split with GeometryReader, and they’re seeing some problems on rotation and opening and closing. And would we recommend that they try moving to ArrangementView. For this. Yeah, I think there’s various details in here that are probably relevant. So if you haven’t heard about them, there’s ArrangementViews, which you can style to be a split arrangement and something that I think is super cool about that is your, you can customize that ratio of the columns.
And in a lot of cases that can eliminate things that you might have previously been using a GeometryReader for. And that’s something that works on Duo, but it also will work on other iPhones. So that can be pretty powerful. But I would say in general, if the GeometryReader is reporting a width or a size that you are not expecting on rotation, that would definitely be worth filing Feedback for sure. All right.
This is an interesting question, and I. Nate, I’m going to throw it to you. I think we may all want to chime in or maybe none of us will. So the question is, do we actually need a physical iPhone Duo to test or can we test in the Simulator? Will keeping a physical iPhone Duo be better for testing than the Simulator? If yes or no, why?
That’s a good question. No, you don’t need a physical iPhone Duo to test. There’s lots of ways you can test. You can even test some of the features that are relevant to iPhone Duo and other iPhones. But specifically for the Duo, there is a great Simulator experience that you can use to end-to-end test your app in all of the different states and poses. And it’s really helpful.
Like any other iPhone, there are very specific things that you might not be able to test on a device. Like if you’re a camera app, for example, there might be some features of camera streaming that are better on a phone. Or if you need to deal with more complicated APIs that are hardware-specific, but your average app can be fully tested in the Simulator.
Anybody have anything to add to that? I would also say that I think there’s also some things that can come up around the design of your app and how does it feel on an actual iPhone Duo versus in the Simulator, right? Are there things where, when you’re holding it in your hands, the placement of controls or the structure that you choose for your app?
You might make different decisions on a physical device than you might make in the Simulator, right? And that can happen with any kind of device, right? There’s lots of different ways to do it. Yeah, I remember that when the watch first came out, it’s like everything I built was way too small until I actually got a watch. Exactly, exactly. And so I think from that perspective, it can be very valuable to try things out on an actual iPhone Duo.
But from the other perspective, I think for the vast majority of things, being able to see it in iPhone Simulator will give you a huge amount of insight into how it behaves, how it works in the different orientations and different layouts of iPhone Duo. And so from that perspective, I think it is a great way to test out your app. And I don’t think that unless you’re doing very specific physical Arrangements, that you can’t get a feel for or simulate that you’re probably pretty well off with what you’re seeing in the Simulator. And it’s a good sense of how it feels. Anna Andy, anything to add?
No, I think, I think I just echo both Nate and Grant. The Simulator is great. It does. There is a lot more flexibility, compared to simulators for other phones. This really allows you to go between the different states and let you try different things. And you also you can get inspiration from just looking through system container APIs and how they adapt on the Duo. And then that can, that you can then use that to make your own decisions on how you want your app to adapt. Yeah. And that’s an important point to acknowledge the Simulator that’s in the betas right now doesn’t have most of the first-party apps in it. It’s a limited set until release of the device in just ten days. Soon. Soon? Yes. Very soon.
No, I think I would just echo those points. I would say honestly, as someone who has access to using a device and using a Simulator, I still find that I am doing a good amount of my work in the Simulator just because it’s more convenient or yeah, things along those lines. Excellent. Let’s see. The next question is about StandBy. I think I’ll start with you on this one, Nate. Will developers be able to make use of the screen space available with the new StandBy experience through Live Activities. And sorry, the question moved on me.
Through Live Activities, the newly selectable widget sizes. And then we’ll stop there, because the rest of the question is forward-looking and we can’t answer it. Yeah, absolutely. So all the different sizes of widgets that we support in StandBy for other phones directly translate to the Duo. We’ve introduced a new, I can’t remember what it’s called in the developer documentation, but it’s an extra large, essentially. I think that’s what it’s… I think you call it extra large. And basically fills like half of the Duo screen when it’s open. So that’s a great new widget format to support, not just for the Duo, but for other devices too. So they will work.
And in terms of Live Activities, one of the great things about the Duo is if you do have it in the book configuration, you can have your time and date and calendar on one side and then a Live Activity open on the other side so you can have it showing music. If you’re listening to music, if you’ve got a flight coming up, you can show the flight, you can pin it open there. Or whatever your app comes up with. Yeah. So yeah, so whatever your app does in its Live Activity, that would be useful for someone on the lock screen. That’ll also translate into the StandBy experience when it’s open. That’s awesome. Yeah, it’s really great.
Cool. This is an interesting one. I’m gonna start with you on this, Andy. Ultimately it’s a camera question. And so I might weigh in as well, but it’s also about how the device is being held on iPhone Duo should camera apps think of opening and closing the device mainly as a camera direction change or more broadly, as an adaptive layout transition?
I’m not sure I have the best answer for that, but I would have to take that one. Okay. Yeah. So I think if you’re a camera app, the act of opening the phone is more likely to be keep the cameras where they were. So rear-facing, for example, if you’re a photography app and then the customer probably just wants more screen real estate to see that through that camera view in the case where you’re using the front-facing camera, so you’re in, say, a video calling app, then I think opening, there’s this assumption that the front-facing camera is still relevant. So there is going to be the switch from the closed display camera to the internal camera.
And that should happen automatically if you’re using the right APIs. Right? Yeah, yeah. It’s super important if you’re making a camera app to use the AVCaptureDevice RotationCoordinator and DirectionCoordinator to follow that. In the past, apps have been able to keep track of the size of the display and orientation and figure out those things.
The variety of poses on iPhone Duo mean that you really need to be using AVCaptureDevice RotationCoordinator and DirectionCoordinator. So if you’re not, please do. Yeah. One other thing just about camera apps. Since I worked on a few of them that not directly about the question, but it could be useful information to think about is when the iPhone Duo is open, the camera on the back is still a portrait aspect ratio, right?
But the screen is in a landscape aspect ratio. And this is one of those things that the aspect or the orientation coordinator that you were talking about really helps with, but you have this choice at that point: do you want to show a portrait preview inside of the landscape screen with letterboxing, or do you want to zoom it up and fill the screen with it?
Right. And that’s a choice that’s really up to your app, what you think is best for the use case of your app, right? The way we thought about it for our apps is that for really photography-type use cases of the camera, it can be good to show the full camera sensor preview. And that’s why you’ll see in the camera app. The default is the camera preview is center frame.
It’s framed there. But in other experiences, like AR or augmented reality experiences, things like ARKit, we went edge to edge and zoomed in that camera preview to fill the screen because it’s less about the highest-quality exact camera frames and more about the interactive experience that you’re having using that kind of stuff. It’s not exactly about the question, but I thought it might be interesting.
I think there’s another piece to it. I think we got at the camera aspects of it. Well, but it is also an adaptive layout transition. If the size of the view is changing, you have to adapt to that. And so it’s not an either or. It’s a both. For sure.
Let’s see. This question has been upvoted. So I feel like we need to address it, but I’m afraid I can’t actually answer it. So the question is, will Simulator gain additional apps like Photos and Files so we can discover how they behave in different poses and make our app match those expectations?
I appreciate your willingness to and desire to make the app match the things we’re doing. I’m afraid until the updates are released, we can’t talk about future events or releases, so I can’t give you a direct answer. But stay tuned. I’m going to start this one with you, Anna, and you can throw it down the line if you want. I spoke to someone who got to try interacting with the Duo at an in-person session.
They mentioned that in the tabletop pose, the seated pose, that tapping or interacting with the top half could tip the phone over. How do we think about this and other physical aspects of design and interaction with apps? Yeah. I can probably speak to this as someone who is more using it, and then I might throw it down the line for the folks who have been thinking about this more than me, but I would say, quite frankly, it is a, it’s sturdier than you would expect. I really can interact with it and it’s not going to tip over.
But just like Grant said before, placing controls where you may be really using them frequently on the bottom can not only be good from a device position perspective, in terms of the hinge, but also just from a reachability standpoint, if the device is like this, it’s closer for me to go here than it is to go up. And you can rest your wrist on the… Yeah, yeah.
Yeah. And adding to that too, I think. Something to think about is, yeah, you want to keep your controls at the bottom because it’s just easier to interact with that, but also trust your users because I think they’ll gravitate towards the best way to use your app as you go based on different experiences.
So one big example is in your video playing app, the controls shift down to the bottom while your video stays at the top because you’re now seated farther away to watch this video. But if you’re in an app where somebody is more needing to interact with it more, they might not choose to put that in the seated position because they might just actually want to be reading something and they would be scrolling, and it might just feel better holding the device in their hand or having it lie flat.
And I think that’s depending on the experience you’re going for. What really matters is which pose you want them to focus on, rather than to say, “I need to do every single one,” because I think you can trust your users to gravitate towards the experience that best fits your app. And that’s some of the magic of iPhone Duo is you have all of these different layouts and poses and states and everything available to you, and you can pick which one is appropriate for the experience you’re using. And I think to pick, I would say there are three things to weigh up. If there is primary content, like a video, you probably want that included. So shifting the controls to the bottom makes a lot of sense.
There are benefits just from interacting on the tabletop surface that could make sense for your app. But then the third thing to consider is we try to avoid having controls move significantly when you go between poses, because it just feels very, I don’t know, it feels very drastic sometimes in the video case. It feels like it makes a lot of sense because it’s helpful.
There are examples where moving a button can feel very unhelpful. And so it’s just not worth that movement. So I think keeping an eye on keeping yourself in check on the moving is a good thing too. But with hinges too, or when you’re avoiding a particular region like that movement. Also, I don’t know how you think about what maybe should or shouldn’t avoid, but it seems like that’s also a movement question. Yeah. Being yeah, being mindful of too much movement. I think start with as little as possible, unless there’s enough value that it’s worth it in that new pose. Yeah.
All right. Great. I love this question and it’s a design question at heart, but I think everyone might have an interesting take on it. So we’ll start with Nate and see where we go. For developers with an existing iPhone-only app, what are the top three things we should fix first?
So it feels great on iPhone Duo unfolded display without a full redesign, but let’s just say so it feels great on iPhone Duo, and you don’t all have to come up with three. Maybe between the group we come up with three. But then we can argue about the priority of those or something. That’s a good question, I think.
When you run your app in the Simulator and you just build against the new SDK and you just see how your app looks, there’s going to be some very obvious things that you can fix that are very easy to fix. And then suddenly your app will just feel native. We’re seeing people build for the new SDK already.
So we’re seeing apps show up and it’s, and the translation to the Duo is really natural for a lot of apps. So I think minimal amount of work and it’s going to look and feel great. And then beyond that, I think there are ways you can take advantage of the extra screen real estate, specifically the width when you’re in landscape.
And I think there it’s thinking about, for this view, is there an auxiliary view that would make sense beside it, or is there a primary, secondary relationship in the hierarchy of my app. Would that make sense? So then reaching for the split views and the ArrangementViews and looking at it as two halves of a book might make sense, but I do think you can start with the first step of just like making sure your controls are laying out vertically and making sure your content just doesn’t stretch too wide, like lines of text being across the full width of the screen will look a little bit wonky. Yeah, that’s one thing we’ve seen in the workshops, once folks get the controls on the side and they’re using the full real estate.
Sometimes it just feels a little stretched. Yeah. See how to chunk that. We have this concept of readable content width, and you don’t want to make texts really, really long, or it’s painful to read. So I think if you, if you think through that mindset of staying within a comfortable reading width, then you’ll notice when there’s room for something else.
And that’s when you can start to layer in the other pieces. Yeah. I agree with that. I think number one is adjusting for the asymmetric safe area and making sure that you don’t have content that’s going under horizontal safe areas or hard to reach or totally impossible to access.
I think number two is making sure that you have the right controls showing up in the vertical layout of the toolbars and navigation bars. So making sure that you don’t have controls that are showing up without icons or showing up without have text labels, even though it would be better off with an icon or other things like that and making sure that’s right. And then I think the third point is what Nate said about having readable content margins and taking advantage of that, whether you’re just adding additional margin in those landscape poses so things aren’t too wide to read or you’re finding additional columns to show or whatever you decide is appropriate for your app. But I think that would be the order I would think about.
Andy, Anna, any favorite bugs that show up a lot and people need to fix. I wouldn’t say bugs, but I think, piggybacking off the same idea is I won’t attempt to prioritize this, but I think a lot of iPhone-only apps generally start with that singular NavigationStack hierarchy. And I think starting to think about taking advantage of that space, maybe switching to more of a NavigationSplitView so that you can show more of your hierarchy, like Mail, where when there’s not a lot of space, when you’re in that more compact environment, you do just push the environment through. But as you get more space, you can now show your message list and you can also show your message detail at the same time.
And some of the things that we’ve seen apps do in our workshops as well is traditionally iPhone widths have been more narrow. And so a lot of people, when they have horizontal carousels, they make assumptions about, let’s just use the device width, subtracting, maybe some padding. And that’s how much each row should look like. I think there’s looking at that and seeing if there’s a better heuristic on maybe capping to some aspect ratio, or maybe just reducing, so that now you just get a better horizontal scrolling experience so that as this device gets wider, your screen space gets wider.
Instead of just enlarging the content, you now just surface more content to the app. Because a lot of times that’s what I’m, how I’m using my phone is, when it’s closed, I’m just quickly glancing through something. But if I really want to take advantage of that space, I just open it up so I can now just see more of the app. And that’s something that we’ve been recommending a lot of people in our workshops.
Yeah. Great call. Anything? Yeah. No, definitely. If you’ve been assuming, especially if you’ve been locking to portrait only, that is something where your app may have a good amount of assumptions that you just didn’t know because you never were testing it in those ratios. I think I would also say that considering if you can go from a standalone bar to using the system container managed bars is another just good thing to consider for general bar hygiene, but particularly on the Duo.
The system is only able to move bar contents vertically if you’re using those system containers. So in SwiftUI that’s NavigationStack, NavigationSplitView, TabView, and in UIKit, UINavigationController, UISplitViewController. Same thing. Instead of using a UIToolbar and then positioning it yourself, or at the very least auditing it and making sure that is an intentional decision, that it is staying horizontal. And I think it’s worth a lot. Some people don’t know that UINavigationController also supports toolbar items at the bottom, and those are the ones you want to use. And so if you have a custom UIToolbar and you also have a UINavigationController, oftentimes the toolbar items are just available for you right there.
And you can get the system and behavior quite easily. Yeah, yeah. I think one of the unique things, well, one of the new things about this device is on previous on other phones, I think developers can expect that they own the whole bottom edge, or they own the whole top edge, and that’s their place to put custom controls.
That doesn’t translate super well to the Duo because the side controls share the space with the status bar in both portrait and landscape when it’s open. And so now you’re having to play in the same space as the system. And it becomes a lot more burdensome to support all the different states.
So moving to those system components that are automatically going to get out of the way of the status bar. And when there’s a Live Activity coming and going, how are you going to resize and move out of the way becomes even more important to stand on the shoulders of the APIs. Yeah. And being prepared to handle getting a vertical safe area, which this is something that you might have already been getting if you’re using a NavigationSplitView. But if this is your first time getting to have this sidebar, then that’s a new thing to adapt to.
Another thing that you mentioned auditing Anna We’ve seen a fair number of folks with an overflow menu inside their overflow menu. Oh, yes. So if you’re doing a custom overflow menu on your own, there are APIs to add those items to the system overflow menu. And then when the system needs to overflow more, they’re all in one spot. So the bar video that Anna and Maria did talks about that API.
The other thing I would say is, this is something that’s just more obvious on Duo than it is on other phones: if you’re using a custom view in your toolbar items. That’s something that’s a lot more obvious in some ways, because the system isn’t able to move that to be vertical automatically, because it doesn’t know how wide it needs to be, if it will be able to fit the fixed width of the bar. And so if you’re using a custom view for something that’s effectively an image, I would consider, if you can just set the image on the item and let the system handle it for you.
Same thing for custom back buttons. Yeah. There is also a way you can set it to go into the vertical axis anyway, right? Yeah. So there’s a, the Axis behavior API where you can say that it prefers vertical. One other thing that we’ve found in workshops, when you say prefers vertical, it doesn’t mean it will go vertical on other phones.
It will still stay horizontal. So you can set that and you don’t need to do anything that’s conditional to do it. You can just set it. And then the system will look at the runtime conditions and figure it out for you. Great. Good to know. So the next question is about testing.
And I’m going to throw this one to you because we’ve talked about it. We run automated UI test suites in CI. And currently there are no UIDevice or simctl APIs to change the hinge state and orientation doesn’t rotate the Duo Simulator. Are official APIs planned? We can’t talk to future plans, but any recommendations on what folks should do in this situation.
Yeah. First, if the hooks are the things you want to test aren’t exposed, file Feedback so that they get exposed. But I would say just in general, thinking about testing, as an engineer, what are the cases that I need to be thinking about? Because also often when I’ve been developing, say, for iPhone and then I run my code on iPad, I’m like, this looks completely broken because I wasn’t testing or thinking about it. And I would say for the Duo, just making sure you’re testing it in all of the different ways that someone could position it.
Honestly, also, now that there’s the Duo Simulator, this is a little bit less necessary, but just using iPhone resizing on a Mac can be really helpful for figuring out how your app adapts to all of the different sizing conditions. But so I would say that just because as someone using an app, it’s so delightful when you can, as a user, move the app to be however you want it. No one is constricting you. You can just figure out what feels right for the moment.
Yeah. And for CI, recognize that there are some capabilities that would be helpful there. Feedback that says, what’s the particular use case you have? Are you doing snapshot testing? What sort of transitions do you want to cover in your testing? These are the sorts of things that help us design those testing APIs to meet the needs that you have today and moving forward.
Don’t just assume that we know what your needs are. Feedback, almost said the R word, Feedback that addresses exactly what you’re trying to accomplish and why. Helps the team here prioritize what gets fixed and how. So that’s super helpful. And feedback is a gift. So thank you for that.
The next one I also have to punt on, but I will take any update for WebKit to support iPhone Duo layouts: folded, unfolded, etc. My understanding is that the web standards include support for hinge position and that WebKit supports that, but additional support would be future-looking things that I’m not in a position to talk about.
All right. This is a design question. I’m gonna maybe it’s an app question. It’s a game question. I’m going to start with you, Grant. That very clear and succinct intro in the half-folded pose, could games show gameplay on the top half and touch controls on the bottom half like a handheld console. Is there an API to detect that pose? You absolutely can. And that is definitely something that if you tried out in your game and it’s great to not have those controls covering any of the game, content like that can be a great way to do it.
If you need an API for that. I think the best thing to use for that would probably be an ArrangementView. If you use the overlay mode of an ArrangementView, it can automatically stack the items on top of each other when you’re not in that kind of pose. But then when you are in that kind of pose, they can show side by side with the controls on the bottom and the content on the top. Very similar to what you see, for example, in AVKit video players as well. Sure. So absolutely a good thing.
And you can read if they’re stacked on top of each other or not. So also, say you needed to maybe move them more to the sides if they’re overlaid versus you want it to be laid out slightly differently. If they’re on top of each other, that’s something that is exposed. I love this question because I’m like, oh yeah. And then the controls that come down and the inventory be at the top of the bottom, it’s a great question.
There’s so much to do there. So it’s very exciting. The other API, I also do want to call out for game apps, especially because they may in general be doing more custom bar arrangements or stuff where they’re not using the system. One other API that can be really helpful is reading the corner adaptation. If say you’re seeing, oh, I have like this vertical safe area on the whole side, but actually I really only want to put like, I want to be able to avoid it a little bit more precisely. That’s an API that can give you something like that.
Nice. Yeah. That came up in one of the workshops where a developer was building basically a tool palette very similar to lots of drawing apps. And they were using that corner area to figure out where they could put their tools. And it was a really neat experience. Adding a little more to that, to that corner adaptation API isn’t just for this device, because it also works on iPad, because the window controls on iPad also take up the space.
And if you want your game to also work on iPad, because I’ve also seen there definitely some apps or some games where there are buttons right underneath the window control. But if you adopt that API, it will also adapt really well on iPad. And Mac Catalyst as well. And Catalyst. Excellent. Cross-promoting, I love it.
So this is I believe it’s an app architecture question. I’m going to start with you, Anna. And then maybe we’ll bring this down the line. It’s a fairly long question. So let’s see what we got. What’s the recommended architecture for preserving navigation, say an unfinished form and scroll position when folding changes a single-column screen into two independently scrolling panes.
Are there additional life cycle or view identity considerations I should account for, especially with lists? Okay, wait, Curt, I may need to ask you a follow-up on that to make sure that I’m following all of the details. So when it’s scrolling, is it that we have one ScrollView and then we’re adding a second one, or is that how are they related?
That’s my read is that someone has the device closed or scrolled partway through a form that they’re filling out and then they when the device is opened, they’re switching to a different layout in order to show more information on one side of the fold and therefore refreshing the view.
Yeah, totally. First, the first thing I would think about it also depends on what UI framework you’re using, just because state management and other things do differ. They did say capital L List in the… Capital L List. All right. SwiftUI probably. SwiftUI. Yeah, I would say using a navigation container or something like an ArrangementView that is going to preserve your state across the transition.
So when your app moves from being on that inner screen to being on the outer screen or vice versa, there’s nothing in doing that that is intrinsically going to tear your app down or your view down and put it on the new screen. However, that will change the size class.
And one thing that we do often see apps doing is sometimes you may have a big if statement at the root of your app that is switching on: if compact, if regular, that is going to tear down all the state in your app. So switching to the system navigation containers, quite frankly, can be the easiest way to preserve that state while still getting adaptation and not having to manage it.
But yeah, I think that’s my initial read of what I would say. There is a high-level design question for this. So when you’re going from like Mail, a really good example where when it’s closed, if you’re in your messages list and you open it, which message do you show in the detail view?
And in the case of Mail, we might choose to show the message that was open last for another app. That might not make sense. It might be surprising that we just pick the message that was open last. And so you do have to think that through a little bit when you’re introducing that second column: are there any surprise moments that wouldn’t be expected in the case of filling out, partially filling out a form. If when the second view comes in, you wouldn’t want to lose the state, change your scroll position. You definitely want that to feel stable.
So just something to keep in mind. Yeah. I’m curious not to put you on the spot, but if I’m in Messages and I’m looking at my list of contacts on the Outer display and I open the display, what do I see? I believe you see your last selected conversation, but it’s very possible that it’s not there.
I would say great design. I know I would say, though, that one thing to remember for those kinds of cases is that sometimes you don’t actually want to automatically pick one. Right. So, for example, something where you’re opening it up and it would select an unread conversation, sending a read receipt, you probably don’t want to do that, right? Yes. And so one thing to think about there is that we do have a content unavailable view, which can be really great for when there’s no conversation selected or no message selected or no item selected to use in that detail slot when the user is making a decision. Right? So that’s another thing to look at. Nice.
This gets at something that was embedded I think in your last answer Anna. So I’ll throw to you and then maybe you can throw to Andy as well. When folding or unfolding is the scene or window recreated? Do onAppear, onDisappear, scenePhase transitions fire, or are there new lifecycle messages to be handled?
Yeah. So I’d love a double check from you, Andy, to make sure I’m getting all the details right. But I would expect onAppear and onDisappear not to get called again, but I believe the scene phase may change in some of the different ways that you can, I don’t know, have apps on Duo.
I’m fairly sure don’t fully quote me on this, is that your app would be moving to a different screen. However, your apps, your view controllers, your views, all those instances should remain the same. So for most parts, you should really be treating this as an adaptive layout resize instead of thinking about oh, it changed windows or changing screens. There should really be a sense of continuity.
So not to think about it as different screens, but just thinking of them as my app just got resized to something larger or something smaller based on somebody opening or closing the device. They’re not different copies of your app on the other screen and the inner screen. Yeah, it’s the same copy and it’s, and it’s resizing and showing you the different layouts. And a lot of those things you would have looked at the screen for would be trait collection type things that you would look for instead. Yeah, yeah. The one thing I will say off of that too, if you’re using UI… I’m forgetting the name of the API, but basically if you’re just trying to get your stuff off the main screen, I would recommend not doing UIScreen.main. It will not work well.
And there’s something that we shipped as part of the Xcode 27.1, actually, even through the summer Xcode 27 with modernizing your app with new skills in Xcode that will help you look through different things that you’re looking at a screen for that maybe there’s more, something more local from traits, the scene, even your view or view controller directly. There’s things that you can be reading more locally.
There’s a skill to help you migrate towards more of those solutions. So things that you may be reading from, like display scale, the bounds of the window, bounds of the screen, things like that. You really should be thinking them more towards the local context so that it adapts really well across different screens and actually different environments, and to stop thinking them as screens, but to really think of them as just a view.
Yeah. And if you’ve primarily been doing iPhone development, we have Split View multitasking now. And so you might not even have the whole screen that your app is showing on that. That is one case where closing the device might cause a scene phase change. If your app wasn’t the one that was most recently interacted with, it can go into the background when the device is closed. So yeah, and I would also say that from a testing perspective, to go back to an earlier question is another good thing to be testing.
Like what happens when you put your app in split screen on the left? Does it still respect everything correctly? Yeah, yeah, that’s an interesting one. And if you’re doing a custom bar, that’s another case to check for sometimes. Yeah, because it goes to the left. The vertical bar may go to the left. I will say when using the standard bars, I have found that very often it just does exactly the right thing.
When you put it over on the left, they do. They all adapt in exactly the way that you’d expect. So. Let’s see. I’m gonna throw this one at you, Nate. When the Duo is fully open, flat, not partially folded, should the middle area still be avoided, or can it be handled similarly to an iPad or a larger window.
It’s a good question. It can go either way. Yeah, I feel like we’ve netted out differently in different apps. I think apps where there is a natural two-column layout, it’s preferable to have the two-column layout because then that partial fold transition isn’t as drastic. Oh, nice. But, That doesn’t mean it has to be exactly 50/50 when it’s fully flat. You’ll often have, and I think that’s the default, NavigationSplitView or UISplitViewController will do this or even a sidebar-based tab bar controller.
You’ll often have a 35/65 layout. And then when you go into the folded state, then you’ll have something more like 50/50. Yeah. But I think what you don’t want is a very large layout transition when you go from the flattened to the folded state. Yeah. But if your app, the content makes the most sense for just the device is going to be flat. You want it to just go full width, it’s totally fine. And if partially folding it, there’s no avoidance that makes sense for your app, that’s also totally fine.
So yeah, it can depend. And that’s one thing you see on the device, when you get a chance to play with it is if there’s a horizontal carousel or something that scrolls through the middle, we don’t avoid the hinge area on those. They scroll right on through. Yeah. Which is fun to play with. One of the things I think we find is that scrolling perpendicular to the hinge can work pretty well.
So if you’re in a vertical fold layout or a pose like a book, scrolling horizontally, and those carousels can work really well. Or if you’re placed on a surface, almost like a laptop, scrolling vertically can work really well, right? For something like a web page, but when you’re scrolling is parallel to the hinge, it can be a little bit more difficult. Interesting. And the reason for that is that there’s regions of the screen then where you are. It’s very difficult to reach in and actually perform a scroll right in that hinge area.
And so for that reason, you can often end up with some layouts that can be quite difficult to actually access parts of the screen, right? So it might be worth thinking about the direction of your scrolling and how that relates to the hinge. And then that can affect how you do your layouts. So a good example of this is the Quick Look experience where you’re viewing a PDF or the Preview app, where if you have a PDF open, the scrolling there takes place generally horizontally, right?
You’re scrolling between pages. And so because it’s a horizontal scroll, when you go into the book pose, you want to keep that perpendicular scrolling behavior, right? And so it goes horizontal. Whereas in the standard layout, the scrolling takes place vertically when you’re not in there. So a lot of it can depend on some of those edge cases. You could think about the direction of your scrolling relative to the hinge.
Chime in a little from the technical side, too. As we’ve seen in some of our own apps, the way they adapt is if you’re finding that your layout maybe is already 50/50, and when you want to avoid that fold partially as it goes up and you’re finding that the layout, the changes are very minimal, you can actually request for the region ahead of time to say, hey, is there a region that I could just avoid before it gets folded so that as you fold the device, there actually won’t be any changes or transitions because now it actually just feels like the layout just works between the two.
You can do this by requesting the reserved regions and asking for the inactive option to just say, hey, I just want all the regions, whether or not they’re active right now, just so that I can check if I want to refer to them, or if I just don’t want to apply my own metrics to it.
Nice. Good point. Just to extend a little bit, one contrasting example that might be helpful for people would be if you’re in the App Store looking at an article about a particular app and you’re in landscape. In that case, we have a hero image on the left, and the article on the right and scrolling is pretty natural there.
Fold avoidance is natural because it’s already split in half. In the TV app, in portrait, we don’t do that fold avoidance because if we did, then you would only have half a screen to scroll in. So I think it depends on whether your content is aligned with the axis of the phone too. Right. Exactly. So in open portrait, you might make a different choice than when it’s open landscape as well. Yeah. Fascinating. And a great segue because the next question is about the TV app. And in particular it’s a question about sidebars versus tab bars.
And I think everyone on the panel might have opinions about this. But we’re going to start with Andy, right? We’ll start with Andy. Did the WWDC video on a related topic. Anna rode shotgun on that. So I saw the TV app is using a tab bar on iPhone Duo, even on the inner screen, but it uses a sidebar on iPad. How should we think about whether our app should use a tab bar or sidebar on iPhone Duo? If our iPhone app has a tab bar and our iPad app has a sidebar?
Yeah, I think that really depends on what you’re prioritizing in your app. We see some apps who prefer the sidebar where they’re trying to, they have a lot of content or a lot of different categories of destinations that they want to surface up into the sidebar. And it is something more, there’s more utility in letting people quickly jump between more sections of their sidebar than they gravitate towards. Sidebar experience with the TabView, there are apps more content-driven that I’ve seen where really navigating, looking through the content of the app versus navigating the different destinations is where I’ve seen apps move towards one or the other, like apps that are really about focusing within the content. Like if you’re in the TV app, you’re really looking at the shows rather than filtering through the sidebar, like on iPad, where it’s just different channels, different apps, different categories, or you’re downloaded the it’s there.
The TV app gravitates more towards showing more of the shows and the different movies that you can actually browse through, and being able to let you jump through with the vertical tab bar. And I want to point towards our designers to see how they want to. I love the question.
We were talking about it before we came on, Grant, about the data and the structure of the app and whether you dive in or spread wide. Yeah. And I think another thing here to remember is there’s also a tab bar on the iPad as well, right? And in a lot of the same cases as iPhone Duo, you would use a tab bar layout rather than a sidebar layout. Those can often also be valuable on the iPad as well, where you can have a tab bar that goes across the top and be a quick way when you don’t need as much detail in every specific category or subcategory, or dozens of different tabs. If there’s really main areas of the app, a tab bar can be really great for that. So a lot of it depends on what is the hierarchy and what is the structure of your app, and how much time do people spend browsing the detailed subsections versus wanting to get into a few main areas, which a tab bar is great for. And I want to ask a follow-up there. It seems really interesting that I think people tend to use iPads and the iPhone Duo in different circumstances. And so does that weigh into the decision making about which is the right design for an app.
I think it does. And I think it’s also important to remember that even the smaller-sized iPads still have larger displays than the iPhone Duo, right? And so even on an iPad, something that is right around that line of where the content is most focused on a few sections versus a larger list of things. When you have that little bit extra screen space on an iPad, it might be worth more going towards a sidebar layout where on an iPhone Duo, it’s really about prioritizing that content. Sure. So sure.
Yeah. With the iPad, you always tend to be launching an app into the same kind of aspect ratio. So like a landscape larger format. And you can choose to have the sidebar there, or you can collapse it into more of a tab bar and you’re making that choice based on preference. And then every time you launch the app, you can use that control to navigate the app.
The difference on the Duo is you’re working with two sizes of the app. And so if… There is something to be said for having a consistent navigation model where you’re playing into the muscle memory of how you navigate the app. So trying to be consistent between the closed and open states becomes a factor as well.
Like if you’re used to browsing for shows closed and then you open it and now you’re like, oh, I can. Navigate it through this side panel, but it’s not available when it’s closed. It becomes a little bit tricky, right? So the apps that I feel work pretty well for the sidebar tend to be ones where in the sidebar they’re representing a view that would be available when it’s closed.
So you would see that in like settings, for example, it’s just the top level of the settings app, right? Whereas TV, I think its structure is designed to be a predictable thing that you see every time you launch the app. And that’s where a sidebar or a collapsible sidebar becomes really useful. I launched TV not because I want to think right now. Yeah, yeah. You don’t want to have to like, oh, am I open or am I closed? How do I do this thing? Yeah. Excellent. All right.
So the next one is about, it mentions UITextView. So I’m going to start with you, Andy. In a long-form reader, when the user unfolds iPhone Duo midway through a long UITextView, the text reflows for the wider display. Does UIKit keep the reading position? Should we re-anchor on a visible paragraph?
Does the inner display report regular size classes like an iPad? That one I know. Yes, it’s… But what about scroll position on something like that where the text is going to reflow. Do you know? Yeah, it does actually already baked into UITextView and various other ScrollView-based components. We have UICollectionView stable views. The system will know how to anchor as going back to what we said was it is just a resize of your view. And so as your view resizes, we do actually anchor it to the visible position of where it is.
And you can also see this as you’re resizing like an iPad app in windowing mode. And so yeah, that is something that the system will handle for you. Awesome. Glad to hear it. So we are down to about five minutes left. And I think I’m going to try a speed round.
And so I’m just going to ask the question. We’re going to start with Nate. And if you don’t know just say pass and we’ll send it down. And if it runs off the end I’ll apologize. And we’ll go to the next question. All right. So for game developers, what are the recommended best practices for adapting gameplay to dual screen and foldable devices? Specifically, how should we handle screen transitions, different orientations, touch controls and maintaining game state as people switch between displays?
Pass. I think the main thing is making sure your game supports any aspect ratio and display size. I think that’s the most important thing. Also very valuable on iPad and Mac, of course. So once you’ve done that, I think the next question was about positioning controls and how that works.
I think, as Andy was saying earlier, and Anna was saying, not all games are going to have something that makes sense to translate into a system vertical bar, you’re going to have your own custom menus and all that stuff. And that’s great. But it is worth considering things like when you are in those poses, for example, it’s placed on a surface almost like a laptop. That could be a great time to move your controls down into the bottom area, get them out of the way of the game, and things like that could be good opportunities for it.
Excellent. I’m going to change the rules because the next question should go to Andy and Anna, probably. How is the navigation bar large title transition to small title handled? We’ve noticed the navigation bar scrolls away with bar button items now. Is there a way to make them stick?
Yeah. So on iPhone Duo, by default, the bars do actually scroll away when, I believe, you’re closed and also maybe in landscape, but there is an API on UINavigationItem as well as toolbar behaviors, toolbar in SwiftUI, that will allow you to change that behavior. And this API is something that you can also adapt on other devices too. Like this API isn’t just exclusive to the Duo.
Yeah. So you can say that you actually want it to scroll away on other phones. So the Duo does it by default, but you can force it on other phones or you can force it off. Yeah. Force it off on Duo. From a design consideration. I’m breaking the rules here again.
Two small things there. One is depending on the orientation of your ScrollView, you may want to flip the direction that the navigation bar scrolls off. So for example, in Messages it scrolls off when you’re scrolling back in the history rather than when you’re scrolling down because you start out anchored to the bottom. So if you’re anchored to the bottom, that could be something to think about. The other thing to think about with it is the reason the navigation bar scrolls off. iPhone Duo has a shorter display than other iPhones. And so it can be really valuable to maximize that content area. And so if you can allow it to scroll off, people might enjoy having that additional space for the content. That’s a good point.
So this worked out because Anna chimed in on Andy’s. So I’m going to go back to Nate with a question that I know he’s got the answer for. How does Picture in Picture work on iPhone Duo and does it affect an app depending on how much of the app is on screen?
So it works the same way as other iPhones. So if you’re playing video content and your app supports Picture in Picture and the customer has automatic Picture in Picture on, you can just swipe to go home and your video will start playing in Picture in Picture. The new feature that’s available on iPhone Duo is if you’re in Portrait Open, there’s a new control that lets you pin the video to the top of the screen.
And the cool thing about that is you can launch another app and use it at the bottom of the screen, and the video won’t occlude the app that you’re in. So that’s a cool new iPhone Duo feature. But other than that, the PiP features work exactly the same.
Let’s see that question we’ve had before. I think I want to do one more and I’m gonna throw this one to you. Anna, we use a custom floating tab bar. The guidance says custom bars don’t adapt by themselves. What’s the minimum we need to do so it behaves correctly in landscape and when partly folded.
Yeah. So I guess I’m going to interpret behaves correctly as it’s behaving like someone using the device would expect from other system apps. So I would say two APIs to check out are first, you have the ability to see what edge the vertical bar is laying out on. So first you want to take a look at that, and you also want to take a look at the ability to get the bar region to see where the system would be drawing of you.
And then at that point, what you can do is effectively take your horizontal bar and then move it into that vertical region based on whether or not there’s a vertical bar so that you’re able, if you can’t make your custom one, be something that’s adopted to the system. That is one way to do it.
One other way to do it is bar button items support having a custom view. So if your view is something that you might just be able to adapt vertically, but you’re okay with having the system glass and the system laying that out, that can be a way to reduce the workload, quite frankly. Excellent. All right. I’m afraid we have to stop there. That brings us to the end of our Group Lab for today. A huge thank you to Anna, Andy, Grant and Nate.
It was a lot of fun. Great chatting with you all. To all of you watching around the world, thanks for tuning in. Your enthusiasm for iPhone Duo has us all even more excited to see this new iPhone in people’s hands very soon. If you have more questions or we didn’t get to yours, please tune in for another iPhone Duo Group Lab on Thursday morning at 9 a.m. Pacific time. Thanks again and hope to see you then.