0:00:00Welcome to Under the Radar, a show about independent iOS app development.
0:00:04I'm Marco Arment.
0:00:05And I'm David Smith.
0:00:06Under the Radar is never longer than 30 minutes, so let's get started.
0:00:10So this summer, as most summers are filled with, there's been a sizable amount of speculation
0:00:17and rumor-mongering around what the new iPhones will look like this fall.
0:00:22And this summer has been particularly interesting, I think,
0:00:26as we got way more details than we normally do from the HomePod firmware leak.
0:00:31But what I thought would be interesting to dive into this week is to talk a little bit,
0:00:38not a little bit maybe about what we're expecting to happen this fall,
0:00:41but I think more generally an interesting discussion around making apps and developing apps
0:00:48and designing apps in a way to accommodate the varying screen sizes that we have to deal with.
0:00:53Because I think as of right now, if you're making an app that, say, supports iOS 10,
0:01:01so in terms of which devices are knocked out from it, you have to deal with the iPhone 5 size,
0:01:08the iPhone 6 size, the iPhone 6 Plus size.
0:01:12On the iPad side, there's the three sizes of iPad size physically.
0:01:21There's the big Pro, the baby Pro, and then regular--oh, no, there's four there now,
0:01:26because there's the new iPad Pro size as well.
0:01:29You may or may not have to also deal with different resolutions.
0:01:34I think we've eliminated an iOS 10 on non-retina devices, I think.
0:01:40I think we finally got rid of the iPad 2, which was the one that was holding us back on that.
0:01:44So now we have 2X and 3X.
0:01:47It's a lot of devices, and I'm sort of going back in history.
0:01:52I remember distinctly developing my initial applications in a world where developing an app
0:02:00for that then iPhone OS was 320 by 480.
0:02:05That was it.
0:02:07My entire world fit into 320 by 480.
0:02:10That was the screen size forever for years.
0:02:16It made a lot of things very straightforward.
0:02:19When I'm coming up with a design, I just have to see, does it fit in this screen size?
0:02:23If I'm doing localization testing, when I load up German, do any of my strings overflow and get truncated?
0:02:32All I have to do is look at them in one screen size.
0:02:35That was nice for a while.
0:02:37Then we got the iPhone 4 and then introduced Retina,
0:02:41which at the time was this genius way to make the screen better and in some ways show more on it,
0:02:49but as a developer to do almost no work.
0:02:52The Retina transition was, from a design perspective, fairly straightforward.
0:02:57Mostly what it just required was re-rendering some assets to be more detailed,
0:03:03but the actual layout and design stuff for a retina and non-retina was fairly minor.
0:03:09Maybe you could have gotten away with slightly smaller fonts and a few other tricks like that
0:03:14just because you have a bit more resolution, but overall it wasn't too bad.
0:03:18Then we got the iPhone 5, which introduced the tall version of that, basically,
0:03:25which again wasn't too bad of a transition because a lot of layouts tend to be flexible vertically.
0:03:34At the time, anyway, you have a lot of the obvious examples in a table view,
0:03:39where it doesn't really matter how tall you make it.
0:03:42The width is the thing that is much more constraining and you tend to design around.
0:03:46Then the iPhone 6 rolls around and it all just falls apart
0:03:51because now we have support for the old versions of all these old screens,
0:03:57and now we have these new screens.
0:03:58Then on the iPhone 6 Plus, we have the 3X mode.
0:04:03It's also really big, and in theory, though, I don't think it actually really...
0:04:07See, it didn't seem to really take on in a way that I think Apple was hoping for.
0:04:11It was supposed to also have a more common landscape use for most apps.
0:04:17They were trying to push that a little bit with the way that it was a phone that you could use in either orientation,
0:04:22but still, there's a lot of things that we have to deal with when we're having to navigate that.
0:04:27I'm in the process of finishing up a big update and just got a whole bunch of new localization strings in.
0:04:32It takes a non-substantial amount of time to go through my app in all the different screens
0:04:38and on all the different test devices I have to make sure it looks good in a variety of different languages.
0:04:43There's that kind of practical side, but on the design side, it gets really hard
0:04:48because I often struggle with this tension between,
0:04:53"Do I want to optimize my app for one size in particular?"
0:04:58You know, whatever the most common screen size is, which I think for me and for my phones is the...
0:05:05Or for my apps is the iPhone 6 and the iPhone 7 size,
0:05:10the smaller of the two modern big sizes.
0:05:16That's what I see most of.
0:05:18And do I want to optimize for that? I think for me it's about 50% of my users are on that screen size.
0:05:23Or do I need to scale up and scale down the other two?
0:05:28Or should I try and be more flexible? It's this constant source of stress.
0:05:32And then of course now, as I start to think about this fall,
0:05:35and we get these wide reports of a new size, at least there's only one size,
0:05:41which I've got to say I'm slightly encouraged by, that there's not two new screen sizes.
0:05:46But there's going to be this whole new screen size, and this one sounds pretty different
0:05:51and potentially with some kind of odd and interesting quirks to it,
0:05:55in terms of it may have a cutout into the top of the screen, which you didn't have to deal with before.
0:06:00And it may be edge-to-edge, and so now you have to deal with margins where you can't go put your content
0:06:07all the way to the edge if the display goes all the way to the edge,
0:06:10because now you'd have problems with people accidentally touching things.
0:06:14And so it's going to be an interesting fall, but it's an interesting journey,
0:06:17and it's something that I think is worth unpacking.
0:06:21This is not even to get into the iPad side. The iPad is a mess in my experience,
0:06:27because there you even have, not only do you have full-screen apps,
0:06:31but you also now have partial screen apps, and partial screen apps of so many different sizes and widths
0:06:38that ultimately with anything I do on the iPad, it's just sort of like make things as absolutely fluid as possible,
0:06:46try not to worry too much about it, and just hope for the best,
0:06:50because that's the best I've been able to come up with.
0:06:53I think it is worth diving into the iPad a little bit more, though,
0:06:56because it does relate in some ways to the realities of designing a modern app for multiple screen sizes,
0:07:02because when Apple introduced universal layout, and I forget exactly when this main thing was,
0:07:08maybe around iOS 7 or 8, when they introduced this concept of you don't have a separate iPhone and iPad,
0:07:15and you don't have a separate iPhone and iPad interface anymore,
0:07:17now you use a split view controller or something like that,
0:07:20and you have just one interface that adapts itself to whether it's running on a phone or an iPad.
0:07:25And the reason why is because when you resize iPad apps in multitasking modes,
0:07:31they can get super skinny in one of the modes, where it's like the sidebar app,
0:07:36and in that mode it basically is running a phone layout,
0:07:39but then if you make it half screen or full screen or two-thirds screen or whatever,
0:07:43then it will adapt an iPad layout. So you kind of had this need all of a sudden
0:07:46to make your iPad app be able to scale down to iPhone sizes while running,
0:07:53and then scale back up as necessary, which was certainly not easy to do in other ways.
0:07:58And so Apple bringing out these adaptive UI things actually helped that quite a bit.
0:08:03And then also Apple and the market pushed us very heavily to just use universal apps,
0:08:09to no longer do the thing that many of us did when the iPad first came out,
0:08:13of you have a separate iPad app and an iPhone app. Like even in the store, they're separate apps.
0:08:18These days, the market and Apple are strongly encouraging people to have one universal app
0:08:25that runs on every size phone and every size iPad, and can transition between the sizes while running.
0:08:32And if you try to do this, as I said, if you try to do this without universal layout stuff,
0:08:38like split views and some of those size class based things that we have in the APIs,
0:08:43it can be remarkably difficult and not worth doing at all.
0:08:47And then if you do it with the universal API stuff, it's still not easy. It's just less difficult.
0:08:55You have problems like, you mentioned the 6 Plus's landscape mode,
0:09:01or I guess now the 5.5 inch screen landscape mode on the phone that kind of treats split views like iPad layouts.
0:09:10So you have this little tiny skinny bar on the left and slightly less skinny bar on the right.
0:09:15That messes up universal layouts like crazy. You have different things like certain layouts will work in portrait on the iPad,
0:09:23but will bomb out horribly in landscape or vice versa.
0:09:26Again, rotation itself is a whole different problem with screen sizes basically,
0:09:31because the aspect ratio of your app can change and you have to be able to accommodate that in most cases.
0:09:37And so what this always leads me back to, and I haven't always followed this advice,
0:09:44in fact I almost never follow this advice, but it's something I keep in the back of my head,
0:09:48that you are really rewarded in this problem domain here by sticking to standards,
0:09:55sticking to UI kits, stock layouts, stock components, not trying to be too fancy with custom stuff.
0:10:02This was helped tremendously with the move away from textured bitmap interfaces from iOS 6 and earlier,
0:10:10once iOS 7 came out and everything was basically just big white bars with text.
0:10:14And there wasn't a lot of pixel perfect design anymore.
0:10:18That has helped us a lot, because if you're still doing pixel perfect graphics heavy design,
0:10:24you have to do so much more work for all these new screen sizes,
0:10:27and every time a new screen size comes out you have to do more work.
0:10:31Whereas if you have a more visually simple and more flexible, more web-like layout in your UI,
0:10:39then when a new phone comes out or a new iPad comes out, you might not have to do any real work on the UI to get it to work.
0:10:46So in order to keep this manageable, especially for individuals like us,
0:10:51where we don't have a huge team like Instagram does, although they're a bad example since they still don't have an iPad app,
0:10:58but we don't have a huge team like some of these big companies do that can throw 15, 20, 100 engineers at their iOS apps,
0:11:06and somebody has a team responsible for adapting to new screen sizes. No, it's just us.
0:11:11And adapting to new screen sizes is not something that we should be spending a ton of our time on.
0:11:17It's not a great use of our time. That should be something that we keep as simple as possible so we can focus on other stuff about our apps.
0:11:24And so we are very well rewarded by using stock stuff, by not altering it too much, by not customizing it too much,
0:11:34by not hacking around or relying on things being a certain size.
0:11:37When the iPhone 5 came out, as you mentioned, because it was mostly just like,
0:11:42"Well, it's the same width, but just add another table row." It was 88 points taller, so that's two toolbars or a table row, basically.
0:11:50It was very, very easy to adapt to that, because most apps had the scrolling table view.
0:11:58But the ones that didn't, the ones that had the big graphical things, some of those apps are still running Letterbox today.
0:12:05Some of them are still not updated. Even the Tesla app was not updated for the screen size for a very long time.
0:12:13Modern apps that are being updated, or banking apps, they're famous, the reason they haven't updated in a lot of these cases,
0:12:22or the reason it takes so long, is because it's hard for them.
0:12:25So the best thing we can do is keep it easy for us.
0:12:28Don't get too crazy with hacking UIKit or making custom layouts that can't be very easily adapted to new screen sizes,
0:12:36new aspect ratios, new arrangements.
0:12:39But it also is worth, as you mentioned, considering what we should be optimizing for.
0:12:45In my designs, I try very hard to just optimize for the middle case, for the most.
0:12:54My analytics basically reflects what you said about yours, which is about half the people are using the 4.7 inch screen size.
0:13:02And unfortunately, the other half is split pretty well between the iPhone SE 4 inch size and the Plus phone 5.5 inch size.
0:13:13So I don't really, I can't really lean one way or the other on that.
0:13:16I have to design for the middle, but also be really sure it works on both sides.
0:13:21And one of the concerns I had when choosing my own device even, is when I was weighing whether I wanted to get a Plus size phone or not,
0:13:30one of the downsides of getting a Plus size phone for me is that I would, my own use of the app would be skewed a little bit towards this large screen,
0:13:39and that's not what most users are using.
0:13:41And because I have a self designed app, I think it's important for me to be using what the most of my customers are going to be using,
0:13:50so that I can design it for that.
0:13:52So that's another consideration in here, but I don't know.
0:13:57Yeah, because I think from an optimization perspective, like the only sane approach that I've really been able to land on is to optimize for one device,
0:14:08and that's what I'm making my layout for.
0:14:10And then in my technical approach, do make no assumptions about the size of things, and make everything essentially scale up and scale down
0:14:23between the bigger phone and the smaller phone.
0:14:26So like optimize for the midpoint, just like you said, and especially because it works out well, the middle size is the most used size,
0:14:33and so you can optimize for that, and then most of my code is structured such that you can give it any arbitrary height or width,
0:14:44and it will adjust the frames and the layout accordingly, but it's doing essentially just a dumb scaling of that.
0:14:53It's not radically changing things, it's not like when you go down to the small ones, suddenly the controls that were laid out side by side
0:15:01are now on top of each other and it's taller, like I've never gone down that road, and instead it's basically just having things scroll up,
0:15:09sort of scale up and down, but not doing it in the way that it looks bad, and it's not rendering it at a small size and squishing it up or down.
0:15:18It's just making everything a little bit bigger and smaller.
0:15:22And then usually it's just a question of adding a few adjustments to make sure labels don't get truncated and so on.
0:15:30But anything other than that can just, in my experience, become so unwieldy to try and keep track of,
0:15:38and it's just too much work and things to think of.
0:15:41In some ways it reminds me of the way that I design watchOS apps.
0:15:46So in watchOS we have the same problem but in a slightly different way, where there's two different watch sizes,
0:15:53a big one and a small one, and in that case I actually designed my apps for the small size,
0:16:00and then the way watchOS is geared and designed, it'll almost naturally just expand out to fill the bigger 42mm size watches,
0:16:12and it seems to work pretty well.
0:16:14It's an approach that's not perfect, it's definitely one of these things where I think you have to just become okay with the fact that you're not,
0:16:22it's probably impractical to have a perfect layout and design that is, you know,
0:16:29the more I go down the design road I run into all these terms and things,
0:16:35where things are on 8 pixel grids and terms that you start to get into for how people are being very precise in their layout.
0:16:43I tend to do something sort of like that, like I'll do a fairly precise layout to make sure the aesthetics are perfect on that middle size,
0:16:51and then things just sort of scale up and down accordingly, and that works.
0:16:56I mean, it's probably a fair place to confess too that I also don't use size classes in any of my apps.
0:17:01You're not missing much.
0:17:02At all?
0:17:03They're such a pain.
0:17:05Yeah, I mean, size classes, storyboards, like the crazy advanced stuff that you can do in nib files now,
0:17:14there's all this stuff that is theoretically possible to do there, where when you open up a file in Interface Builder,
0:17:21or an Interface Builder file in Xcode now, you see, you know, you can look at this layout in this phone size,
0:17:29this phone size, this layout, this layout, I mean, you have this huge array of options there,
0:17:33and that's just so cumbersome to me, and especially because those kind of files are so opaque.
0:17:39I've said it before on the show, I just do all my layout in viewable layout subviews,
0:17:45and there's a bunch of math, and it just sort of sits there, and as long as I don't hard code any values,
0:17:51if all the values are relative and parametric, so I can change them, every now and then we'll have something
0:17:59where it's like on the small phone, decrease the padding amount a bit more than you do on a bigger phone,
0:18:06or things like that, but in general, like taking that approach where it's very straightforward and simplistic,
0:18:12is the only approach that I found that keeps me sane, because otherwise there's just too many things to think about,
0:18:18and it's optimizing for something that I don't know, maybe for different, for other apps it would be super important,
0:18:25but in general, I find that a really well thought out, well conceived design for the middle case,
0:18:35tends to scale pretty well up, and tends to scale pretty well down.
0:18:39If it doesn't, that's probably an indication that it's a bad design in the first place, rather than the need to be like,
0:18:45"Okay, well let's do this totally different thing on this size, let's do this totally different thing on this size."
0:18:50And so, that's the approach I take, and it seems to work pretty well, I mean, maybe if I spent more time optimizing it,
0:18:58it would be better, but the reality too is, like you said, it's hard because I've tried having multiple phones
0:19:07that I switch between on a regular basis, in terms of, it's hard if you don't use a phone or a layout on a regular basis,
0:19:16to really know what's going to feel good there and be nice, because as much as it's, you know,
0:19:25when I'm developing, I'm constantly, on a regular basis, I'm cycling through which simulator I'm running it on,
0:19:32or what iPhone I'm testing on at my desk, but it's never going to be the same as if I was actually using that phone
0:19:39on a day-to-day basis, using the app in regular use, and unless I'm willing to do that, which can get complicated and awkward,
0:19:48and some of the things that have held me back from doing that before are getting slightly better,
0:19:52and I was eleven with the sinking of health kit data and things, but still, you have all the issues with like,
0:19:57which phone is your Apple Watch paired to, or do you pair a different watch to each phone,
0:20:02and just hope for the best, and hope it all sinks out, but in general, I find I'm just going to pick one,
0:20:08I'm going to optimize for it, and then that's hopefully just sort of good enough.
0:20:13Yeah, because you have to draw a line somewhere, you know, as Indy's, like, how much time do we have,
0:20:18how much money do we have for devices, how much of a hassle is it to switch between them,
0:20:22you know, one of the things I usually do is, most of my simulator use, I use the smallest device,
0:20:30so I use like the iPhone SE for the phone, I use a 38mm for the watch, and then on, you know,
0:20:36on my actual devices, I have a 42mm watch, and I have the 4.7 inch phone, and so, because about half of my design
0:20:43and development is on the simulator, and about half is on the device, I get a decent blend there.
0:20:47I also, you know, because again, like, failing on a small device, I feel like is a worse failure mode
0:20:53than not looking great or not taking advantage of a big device, so my standalone testing device,
0:21:00you know, my main phone, which I do most of my testing on, is the 4.7 inch, but also on my desk,
0:21:06in a charging dock all the time, is an iPhone 5S, and so whenever I need to test something that I think might be slow,
0:21:13or might, where like I need to see how it fits on the small screen, like in my hand, not just in the simulator,
0:21:19I kick it over to the iPhone 5S, and there, you know, I can't like take this phone outside and do anything,
0:21:24there's no SIM, I don't have any service on it, it's just an old iPhone 5S, but it is like a physical device
0:21:30of the smallest size that my app supports, that is useful for testing. I don't have a 38mm watch,
0:21:36just because I don't, you know, my watch apps aren't that important to me, so it's not that big of a deal,
0:21:40I feel like, you know, the simulator is good enough for that, and similarly with iPads, I don't have a 12.9 inch iPad Pro,
0:21:48because like, this is another area, you know, you have to kind of figure out like for your app,
0:21:52if hardly anybody uses it on the watch, or hardly anybody uses it on the iPad, you don't really need to invest too much
0:21:59in optimizing those, like, the overcast interface on the iPad is fine in landscape, and pretty rough in portrait,
0:22:07and the main reason why is because almost no one uses overcast on the iPad, and I used to optimize like crazy for it,
0:22:14and it was tons of overhead, tons of code, tons of testing, tons of bugs, trying to manage the universal layout
0:22:22between portrait modes on the iPad, and so when I redesigned the layout for 3.0 with the little slidey-pain thing,
0:22:29I kind of half-assed the iPad portrait version, because almost no one uses it, and it was going to be a huge ordeal,
0:22:36to try to fix that, so now if you launch overcast on the iPad, you get this giant, expansive white space that includes the play controls,
0:22:45and a little square thing above it for artwork, and to fix that again would be so much work, I just decided this isn't worth it to me,
0:22:52and you have to do that, you know, with some of these things, like if no one uses something, that's just, you know,
0:22:57that's something you have to do, but make it usable, but it doesn't have to be pretty.
0:23:01This episode of One of the Radars brought to you by ZOJO. ZOJO is a cross-platform development tool for creating native apps for desktop, mobile, web, and Raspberry Pi.
0:23:12ZOJO currently supports macOS, Windows, Linux, iOS, and even Android coming soon.
0:23:17With ZOJO, you just write one version of your app, so for example, you can write it on the Mac, and then you check a checkbox,
0:23:23and you can have a completely native Windows version as well, and ZOJO apps use native controls, so your app looks at home on every platform.
0:23:30You'll be able to build apps ten times faster, which will save you time and money.
0:23:34ZOJO is great for everyone, from newbies to professional developers.
0:23:38It's currently used by over 300,000 developers worldwide, from students to Fortune 500 companies.
0:23:44So go take a look at their site, and you will see just how many companies you know use ZOJO.
0:23:49It's free to use, and licenses are required to build standalone applications, so you can see for yourself, try it out for free.
0:23:55Go to ZOJO.com, that's X-O-J-O dot com slash radar to find out more, and listeners of this show can get 20% off any license with the code radar.
0:24:05Thank you so much to ZOJO for their support of this show.
0:24:09So the thing that probably makes sense to wrap up talking about is a little bit of expectations for what's going to happen in a few weeks when the new iPhones are released,
0:24:19because I will say one of the things that does drive me crazy is when we're in a cycle like this where we had WWDC and Apple laid a few hints,
0:24:30maybe there's a few APIs that are kind of indications that things are going to be different,
0:24:35but then we spend the summer working, and we're working on updates for iOS 11, and just trying to be all ready,
0:24:41and then in the back of my mind I know that I'm developing an app without knowing a big important aspect of how this will ultimately be used.
0:24:53That there is this information that exists in the world that I do not have that I can't really make any choices about in the meantime.
0:25:02So it always leads to this mad rush in the sense that what I expect will happen is sometime in early September,
0:25:11probably the first Wednesday or the second Tuesday of September, there will be an event, Apple will announce it,
0:25:19"Hey, show all this fancy new stuff on the new phone," is why they expect it will have a new layout,
0:25:24and then a few hours later there will be a new version of Xcode that comes out that includes a simulator for that screen size,
0:25:32and probably a little bit of documentation about how we're supposed to deal with it,
0:25:36if there's weird constraints or things that we have to do, the way we indicate to the OS that we're sort of ready for it,
0:25:43because typically what Apple has always done is when there's a new screen size you have to actively opt into it,
0:25:49and if you don't you just run in a compatibility mode where typically the phone will report to your app that the screen is
0:25:58whatever the biggest size that would fit inside of the new phone size,
0:26:06and so you get tricked into thinking, "Oh, I can just run like I'm running on a plus size or a regular or a four-inch size,"
0:26:14and then we'll kind of have this bad rush, and then I'll probably be getting up in the middle of the night to pre-order a phone
0:26:21so that I can actually try this out in real life.
0:26:24iPhone launch day will happen, in which case I'm frantically waiting for my UPS box,
0:26:30or I used to go and wait in line at the Apple store in the middle of the night, but I think I'm getting too old for that,
0:26:36so I'll just wait around for the UPS guy, and then just kind of like hope that, you know, grab the phone as soon as it comes.
0:26:41The first thing I do is I'm just kind of sad in some ways when you get this brand new phone that's super cool.
0:26:45The first thing I do is I run downstairs into my office, plug it in, and just launch all my apps and see how broken they are,
0:26:52because inevitably something's different from the simulator, and this is kind of the cycle that I'm expecting,
0:26:57and it's a little annoying and a little frustrating, but that's probably what we have to look forward to for us in the middle of September this year.
0:27:05Yeah, I mean, again, that's kind of all we can do, right? And it's going to be one of those things, like depending on how different it is from what we've seen before,
0:27:13you know, like there's speculation about this status bar notch and this possible function area on the bottom,
0:27:19and if these things are accessible to developers in some ways, we're probably going to have to do some work to adopt to that.
0:27:25And I would guess, based on how things have gone in the past, this is another one of those areas where if you stick with stock controls, you are better off,
0:27:34and Apple is kind of pushing you into sticking with stock controls. You know, for things like, if for example, you know, bars scroll under the status bar tabs up there, up top,
0:27:44or if bar button items from navigation bars get put in the function area, as some designers have speculated,
0:27:50like, if that kind of thing happens, you need to be using the standard controls probably to take advantage of those.
0:27:56Like, again, keeping things standard and not messing with them too much is almost certainly going to help you with transitions like this.
0:28:04So, I guess if there's a theme to this, it would be don't mess around too much with custom layouts,
0:28:10because the standard stuff Apple tends to, you know, force us into over time to get the best stuff or to have flexible layouts or to not have tons of headaches.
0:28:21So, with that, I guess that's the end of the episode.
0:28:25Yeah, and I think we just look forward to a slightly frantic middle of September, but otherwise, hopefully, if we've been flexible enough in our designs and, you know, code, it shouldn't be too bad.
0:28:36I can definitely say that the transition has gotten easier over time because I've learned the lesson to not hard code anything.
0:28:44You know, I remember distinctly going through my app in the first, like, the first one, I think it was the iPhone 4 came out, I remember going through and searching for, you know, searching for 320 all over my app.
0:28:54Command shift F, 320.
0:28:56Like, finding all these places that I was hard coding values that I learned, don't do that, you know, pull it from the screen or pull it from the view rather than having a hard coded value.
0:29:04And if we've done that, we should be in good shape.
0:29:07Alright, thanks for listening everybody and we'll talk to you next week.
0:29:09Bye.