0:00:00- Welcome to Under the Radar,
0:00:01a show about independent iOS app development.
0:00:04I'm Marco Arment.
0:00:05- And I'm David Smith.
0:00:06Under the Radar is usually not longer than 30 minutes,
0:00:08so let's get started.
0:00:09- With this episode, I've been facing a lot of
0:00:13angst and stress about the giant weight
0:00:17of my huge amount of legacy UI code in my app.
0:00:21Because my app, it's eight years old now,
0:00:24and over that time, we've had both Swift itself
0:00:29and then later Swift UI come out,
0:00:32in addition to just huge advances in UIKit under the hood.
0:00:36And if I stay with UIKit, huge advances there
0:00:39in the meantime.
0:00:40And so I have all this huge mountain of legacy code
0:00:43in my app that gives me a lot of stress
0:00:46and makes it hard for me to make changes
0:00:49and move forward and update the design and things like that.
0:00:51And so I have thought for a while,
0:00:53man, wouldn't it be nice to just start clean
0:00:57and do a whole clean, fresh start
0:01:00and rewrite the entire UI.
0:01:02And that's usually a terrible idea
0:01:05because it's akin to a large rewrite of your app.
0:01:09And so usually I've talked myself out of that
0:01:12because it just seems like this impossible mountain to climb.
0:01:16And a few weeks ago, you mentioned
0:01:19an interesting alternative.
0:01:22That you said, why don't you just start building it
0:01:25and make just this fork in the app code.
0:01:28And either when you're ready or maybe only on the latest iOS
0:01:34version or whatever it is, in certain test modes,
0:01:37whatever it is, when you're ready,
0:01:38just switch over to that UI conditionally
0:01:41and still have all the old code there
0:01:43in the app for when it's not running in that mode
0:01:45or under those conditions.
0:01:47And I thought, it's one of those things
0:01:48like a programmer first hears that
0:01:50and that's a terrible idea, maintenance, et cetera.
0:01:52And then it starts infecting your brain a little bit.
0:01:54And you've done this to me before.
0:01:56It's one of those ruthlessly efficient and pragmatic things
0:02:01that you introduced to my thought technologies.
0:02:04I would originally think-- like when you first told me that you
0:02:07stored your Git checkouts for your Macs in Dropbox,
0:02:10I thought that was the craziest thing I'd ever heard.
0:02:12And I'm like, wait a minute.
0:02:13But then you can work on it on the laptop and the desktop.
0:02:16You don't have to constantly be committing things just
0:02:18to transfer to a different computer.
0:02:19Interesting.
0:02:21And so the idea of having an entirely separate UI branch
0:02:26within my app, that sounds ridiculous.
0:02:29And it sounds like a very impure thought to a programmer.
0:02:34But the more I think about it, the more I think,
0:02:37I actually might do that.
0:02:39And I want to actually talk about it.
0:02:41I want to actually get more input on that from you.
0:02:45And let's elaborate on that and see, what does that look like?
0:02:48Why would you do such a thing?
0:02:50And are you doing such a thing in any recent stuff?
0:02:53I'm glad it was an interesting thought to you.
0:02:56And I think it is definitely an approach
0:02:58that I've taken before.
0:02:59And I think it is one of those things that is certainly not
0:03:02the case for everything, that typically, I suppose,
0:03:04the way that we evolve our apps is this kind of incremental--
0:03:09replacing one bit-- it sort of becomes the ship of Theseus
0:03:12or whatever, where it's just like you keep changing one
0:03:14little bit at a time.
0:03:16And eventually, you end up with something new.
0:03:18But over the course of that progression, that change,
0:03:23at no point was there this hard change
0:03:25from one thing to the other.
0:03:26And I think that approach has a lot of merit.
0:03:28But it also means that you're always tied to the past.
0:03:32You're always tied to your old way of doing things.
0:03:35And you have to be balancing all of these things
0:03:38while you're moving forward.
0:03:39Because you're also-- it's one of my favorite gifts.
0:03:44I think it's from Wallace and Gromit, where Gromit is
0:03:47building the train track in front of his toy train
0:03:50as he's riding it.
0:03:51And he's just constantly building just that little bit
0:03:53in front of him as he goes.
0:03:55And that approach means that you always
0:03:57have to have that sense of urgency,
0:03:59that you're in this weird incremental process,
0:04:01that you're building things.
0:04:02But you're building things that are alive and in active use.
0:04:04And so if anything goes wrong, bad things will happen.
0:04:07And so instead, taking the approach of saying,
0:04:09you know what, I'm going to completely start from zero,
0:04:13essentially.
0:04:14And it's not zero insofar as-- well, it's zero code.
0:04:17It's not zero in terms of experience,
0:04:19in terms of expectation.
0:04:20You know how the app should work.
0:04:21You know what it should do.
0:04:22You have something to compare it to.
0:04:24And free yourself from trying to have
0:04:27this be an incremental thing and instead do a complete rewrite.
0:04:29And for me, the first place I had this big version of this
0:04:33was back when SwiftUI was introduced to watchOS.
0:04:37So previous to SwiftUI's introduction to watchOS,
0:04:40we had WatchKit, which was awful and really rough to use
0:04:43and not fun at all.
0:04:45And didn't allow a lot of cool, interesting, and fluid UIs
0:04:49that you might want to build.
0:04:50But then out comes SwiftUI, but it requires watchOS 6.
0:04:55And so I felt in this really awkward place,
0:04:57because I didn't want to feel like--
0:04:59I couldn't require watchOS 6 right off the bat.
0:05:02Because if I did, especially with the watch,
0:05:04it creates this really weird experience
0:05:06where the app just gets uninstalled from the watch
0:05:08and weird things start happening.
0:05:10And so I needed to keep my deployment target sort
0:05:13of generous.
0:05:15But I still wanted to use SwiftUI.
0:05:16And so what I ended up doing with that app
0:05:18is I just left the WatchKit version of the app
0:05:22entirely as it was.
0:05:23Like it's frozen in carbonite.
0:05:24It is just right there.
0:05:26And then on the Swift, then just have built out the SwiftUI app
0:05:32that I'd always wanted to build that I thought was great.
0:05:34And I went and built that.
0:05:36And then in essentially the app delegate,
0:05:38when the app is being run, which entry point the app got
0:05:41was just based on, are you running watchOS 6?
0:05:44Great.
0:05:44You get this one.
0:05:45If you're watching watchOS 5 or before,
0:05:47you get the old version.
0:05:49And when I did this, in some ways,
0:05:51it was forced, because I wanted to use SwiftUI so soon,
0:05:54to go down this road.
0:05:55And I was curious to see what the result would be.
0:05:59Because inevitably, what I was doing
0:06:00was I was creating a situation where there were going to be
0:06:03people who would see in the screenshot some
0:06:06of the stuff that was there for the SwiftUI version in the app
0:06:09store.
0:06:10Or maybe a friend of theirs or a spouse, whatever.
0:06:14They see someone else who has the app, and they--
0:06:16why doesn't my app look like that?
0:06:18And I was bracing for that to be an annoyance and a customer
0:06:22service issue and creating confusion.
0:06:23And I think in reality, it just happens much less often.
0:06:27Because for most people, their experience of--
0:06:31very often, people are more likely to be upset by just
0:06:35any change than they are by the app just staying
0:06:39the same as it was before.
0:06:41And if anyone is running the old version,
0:06:43they're getting exactly the same experience
0:06:45that they're used to that's been there forever.
0:06:47And then the new people, hopefully their experience
0:06:49is positive.
0:06:49And I got a little bit of people who were confused as to,
0:06:52why don't I get this cool graph or the nice animations
0:06:56or any of the features that were in there?
0:06:58But by and large, that didn't happen.
0:07:00And I really liked it.
0:07:01It was a really pleasant way to develop,
0:07:04because I was building the app--
0:07:07when we're first writing an app, I
0:07:08feel like one of the hardest things
0:07:10is we don't know what the app is ultimately
0:07:12going to look like, what it's ultimately going to do,
0:07:15how to structure it, how to build it.
0:07:17And that is just inherent to the initial creation,
0:07:21that we build an app, and then it's
0:07:23going to go through iteration and refinement
0:07:25and get feedback from people and interact
0:07:28with the real world in a way that informs us
0:07:32on how the app should actually work in practice.
0:07:34And so rewriting it-- in this case,
0:07:37when I was rewriting the Pedometer++ WatchKit app,
0:07:42the second app was actually what people wanted,
0:07:44was actually what people used, was much better,
0:07:47was much more performant, did all the things right.
0:07:50And I was glad to be able to do this hard fork approach.
0:07:55And having had that experience, I've
0:07:58opened myself to this in a lot more contexts.
0:08:01And I think in general, it's a way to deal with iOS versioning
0:08:05is probably the main place to do this.
0:08:06Like in your case, I think taking the approach of saying,
0:08:10well, even though you don't strictly need to, say,
0:08:12I'm going to remake the main UI in Overcast in SwiftUI,
0:08:19but I'm going to target iOS 16's version of SwiftUI
0:08:24and only do that.
0:08:26And while technically you could go, I think, all the way back
0:08:28to iOS 13, I think, with SwiftUI,
0:08:32if you go back farther-- the farther you go back,
0:08:35the more complicated it is to deal with compatibility,
0:08:37with issues, with SwiftUI rendering differently
0:08:39in two different ways.
0:08:40If you go with the latest and greatest,
0:08:42like once the sort of initial builds and beta stuff gets out
0:08:45of the way, you'll be on a much more stable, much more smooth
0:08:48ground going forward.
0:08:49And then at some point, yeah, you just turn that on.
0:08:52And depending on how different you make the app,
0:08:54many people may not even notice.
0:08:56But either way, you're in this really nice, clean place
0:08:59that you have this beautiful, clean bit of code that's
0:09:01all Swift, it's all modern, uses all the latest and greatest.
0:09:05And then over time, the old version just kind of falls away.
0:09:08And if you're gaining it based on iOS version,
0:09:10eventually you'll stop supporting iOS 15.
0:09:13And when you do that, the old version
0:09:14just disappears from the app and will never be used again.
0:09:17That fork will die, and you're just
0:09:19sort of living on the new fork.
0:09:20And yeah, it's a little crazy.
0:09:22It's a little wild.
0:09:23I understand why some people would think that it's
0:09:26a bit of a weird way to go.
0:09:27But I got to say, I really liked it.
0:09:30And it's worked well for me in the past.
0:09:32And it's like, I'm going to keep using this pattern, I think,
0:09:34going forward for other projects that I'm working on this summer.
0:09:37Yeah, that's really-- it's a very, very interesting way
0:09:41to look at things.
0:09:43I mean, it's a very pragmatic way,
0:09:45as you are so good at introducing to my thoughts.
0:09:50I want to do something like this in theory.
0:09:53In practice, I'm not sure I will be able to go through with it.
0:09:57I mean, so when I did the same transition on watchOS
0:10:01that you were just talking about, when Swift UI came out
0:10:03and replaced the god-awful watch kit, I was very--
0:10:07I was reluctant to do that at first.
0:10:09And I talked to you about it.
0:10:10And you basically told me, just right from scratch,
0:10:13write it fresh, see how long it takes.
0:10:14And it ended up taking not that long.
0:10:16And I didn't regret that decision at all.
0:10:18It was great.
0:10:19The outcome was great.
0:10:20That has been like a thorn in my mind ever since then.
0:10:26Because when I think about doing it on the iOS app, which
0:10:30is a much larger task, because there's so much more UI there,
0:10:34and it's more complicated.
0:10:35But when I think about doing it there,
0:10:37my first thought is, no, I shouldn't do that,
0:10:40because it won't work out.
0:10:41It'll take forever.
0:10:42I'll regret it.
0:10:43And then that damn watch app, I realized,
0:10:46but it worked really well there.
0:10:50And that keeps being this exception in my mind.
0:10:55But look over here.
0:10:56It worked.
0:10:57And you didn't regret it.
0:10:58And it was great.
0:10:59So that's what has kept this kind of spark burning in my mind,
0:11:03like maybe I should actually do this.
0:11:05It's tough, because SwiftUI, it still
0:11:09feels like you're using beta 1 of the framework.
0:11:13And right now, using the iOS 16 stuff,
0:11:14it actually is very much still early beta in certain ways.
0:11:17And there's still some frustrating bugs.
0:11:19But SwiftUI in general still feels very beta to me.
0:11:22So it's hard for me to get very far with SwiftUI on iOS.
0:11:28On watchOS, it's easy, because it's simple.
0:11:31The needs of navigation and viewed complexity and stuff
0:11:34on watchOS are so much lower than on iOS,
0:11:37because it's such a simpler platform.
0:11:39But on iOS, there are certain expectations
0:11:42of how things should work, how things should behave,
0:11:44how things should look, the kind of customization people expect.
0:11:47And that's just really hard in certain ways with SwiftUI.
0:11:51You hit a lot more walls.
0:11:52You hit them more frequently, and you hit them harder.
0:11:54And so I feel like while the transition on watchOS
0:11:58was relatively smooth, the transition on iOS
0:12:02probably is less so.
0:12:03And at the same time, if I'm going
0:12:05to do a big rewrite like this-- because again,
0:12:08I have two problems.
0:12:09Well, three, really.
0:12:10I'm using old versions of UIKit, and there
0:12:12are newer things in UIKit that can make things simpler.
0:12:15I'm using still mostly Objective-C,
0:12:17and I want to make most of that, or all of it, Swift.
0:12:20And I'm not using SwiftUI, and that's clearly
0:12:23what Apple is pushing as the way we should be doing things.
0:12:26So I need to move to SwiftUI.
0:12:27So ideally, if I'm going to do this big rewrite, given
0:12:31how long it takes me to adopt new things,
0:12:33this is the kind of thing I want to do it once
0:12:36for a very long time.
0:12:37I don't want to just jump to Swift with UIKit
0:12:41if I can go right to SwiftUI.
0:12:44And then that, I think, will buy me more time
0:12:47with this new platform down the road.
0:12:48And I'll be able to do certain things faster and more
0:12:51efficiently.
0:12:52It's just the matter of when I hit those walls,
0:12:54and how many walls do I hit.
0:12:55And I mean, so far, I'm hitting a lot of them.
0:12:57But part of that's because I don't know it as well.
0:13:00SwiftUI is more complicated.
0:13:02I also have to deal with the fact
0:13:03that SwiftUI has to access state and changes in certain ways.
0:13:10And my underlying model layers are still mostly Objective-C.
0:13:13I have some Swift in there, some Swift shims on top of it
0:13:16to make SwiftUI possible.
0:13:18But most of that is still not Swift.
0:13:21And so-- and certainly not SwiftUI,
0:13:24not like the combined publishable kind of models
0:13:28that SwiftUI works on.
0:13:29So if I'm going to go on SwiftUI,
0:13:31I also have to do a whole bunch of that lower level changing
0:13:35and bringing things up to date at the lower levels,
0:13:38and simplifying certain things, rewriting certain things,
0:13:41or putting shims on top of them.
0:13:42So there's a lot more work to do for me to do this.
0:13:45And so the risk is much greater.
0:13:48But yet, I still feel like I probably should do it anyway,
0:13:51because I still feel all this weight of this old code.
0:13:55And it holds me back.
0:13:57And it makes me-- I get this brain freeze.
0:14:00It's hard for me to even work on my app
0:14:02right now, because I'm blocked by so many of these things.
0:14:07And if I can just unfreeze my brain and plow through,
0:14:12I feel like I need something to do that.
0:14:14And maybe this giant modernization project is that.
0:14:18But I don't know.
0:14:19That seems like a tall order.
0:14:21We are brought to you this episode by Sourcegraph.
0:14:24So you've hired a brilliant developer.
0:14:26That's great.
0:14:27Now you have to get them onboarded.
0:14:28If your company is growing, onboarding new developers
0:14:30is a common occurrence.
0:14:31But it's a big undertaking each time.
0:14:33One of the biggest challenges is to getting new hires up
0:14:36to speed with their team's project.
0:14:38This can be tricky if the code bases your developers are
0:14:40working in are already very large.
0:14:42So thankfully, Sourcegraph makes it easy to move quickly,
0:14:45even in those big code bases.
0:14:47Developers know that knowledge is most useful
0:14:49when it's findable.
0:14:51Centralization is helpful.
0:14:52But given the fact that most companies store knowledge
0:14:54in at least two different locations,
0:14:56how do you make knowledge accessible to those who need it?
0:14:58As a code intelligence platform, Sourcegraph
0:15:01gives developers what they need to drive their own learning
0:15:03over time and in different situations.
0:15:06Teams without Sourcegraph need to rely on asking colleagues
0:15:09or reviewing documentation that may be out of date, which
0:15:11is cumbersome and time consuming.
0:15:13But with Sourcegraph, every developer
0:15:15can search across millions of repositories
0:15:17to find specific code, saving time for themselves
0:15:19and everyone else.
0:15:21So when questions do come up, you
0:15:22know it's the big stuff that's worthy of the extra time.
0:15:25Sourcegraph was created to make developers' lives easier.
0:15:28And today, they work with leading companies
0:15:30across every industry, including three out of five
0:15:32of the top tech companies, plus PayPal, Uber, Plaid, GE, Reddit,
0:15:36and Atlassian.
0:15:38Visit about.sourcegraph.com to learn more.
0:15:41That's about.sourcegraph.com to find out
0:15:45why some of the biggest tech companies in the world
0:15:47use Sourcegraph and to see what it can do for yours.
0:15:49Or to click the link in the show notes
0:15:51to let them know that you heard about them from us.
0:15:53Our thanks to Sourcegraph for their support of this show
0:15:56and Relay FM.
0:15:57So I think that there's two things that really come to mind
0:16:00as you unpack the resistances or the issues
0:16:03that you feel like you're coming up against.
0:16:05And it's like, I think the first one is there's the reality
0:16:09that if we never changed our apps at all,
0:16:13like if you just left the version that you have right now
0:16:15in the App Store, the amount of time
0:16:18that it would be that that would just work fine and be great
0:16:23for most of your users is surprisingly long.
0:16:28It's something that, barring potentially like weird--
0:16:31there's a new screen size such that the app gets letterboxed
0:16:36if it isn't rebuilt or something like that,
0:16:38which is relatively easy to fix.
0:16:41It's a weird thing to think that that really old code could just
0:16:44exist for a long time.
0:16:46And I think accepting that, accepting that that old code
0:16:49isn't necessarily bad or needs to be changed or modernized
0:16:53and kept current is freeing in this way.
0:16:56That I think viewing it that you have this ability
0:16:59to draw a boundary around where the new stuff is going to go
0:17:02and the old stuff is just working like it always has been
0:17:05and always will be, and that this new version is
0:17:08different and distinct from it.
0:17:09And I think for me, it would be the freedom
0:17:12of being able to say, the old version is fine.
0:17:14And if that's-- well, in theory, you think,
0:17:17oh, I don't want to have to maintain
0:17:18both versions of my app.
0:17:20Now it's like, now I have two things to manage.
0:17:23That's technically true.
0:17:25But in practice, in reality, I think
0:17:28isn't actually what happens in practice.
0:17:30That more often than not, the old stuff is mostly fine.
0:17:33And it won't actually cause problems or issues for you.
0:17:36Because that's just the reality.
0:17:38One of the best things about being an independent developer
0:17:42is when I go on vacation, and I'll go away
0:17:44for a couple of-- go away for two weeks, come back,
0:17:47and everything's still the same as it was.
0:17:49Everything's still working.
0:17:50It's not like servers.
0:17:51It's not like something where you have this--
0:17:53there's this sense of this active energy has
0:17:55to be poured into the system in order
0:17:57to keep it going, that an app that
0:17:59is in a good, stable place that isn't full of bugs
0:18:03or something like that, once it reaches this equilibrium point,
0:18:07it can sit there for a very long time.
0:18:10And I think the other thing that really just popped
0:18:13into my head was the thought that something like SwiftUI
0:18:16and something like a rewrite is also an opportunity
0:18:20to change the way that you are approaching things
0:18:26and to not just modernize your code,
0:18:29but also to modernize your thinking, your structure,
0:18:33the way that you're building things.
0:18:35And I can say from my own experience,
0:18:37having built a lot of apps now in SwiftUI--
0:18:40and WidgetSmith is essentially entirely SwiftUI,
0:18:43with a few UI kit hooks here and there
0:18:45where I have to go into a low-level thing
0:18:48to hook into a system something or things like that.
0:18:50But the main structure of the app, everything like that,
0:18:52is SwiftUI, is when I first started building in SwiftUI,
0:18:59I was building a UI kit app in SwiftUI.
0:19:02And as a result, I hit lots of walls
0:19:07and felt like I was constantly bumping into the edges,
0:19:10that I kept saying, oh, this is how I would do it,
0:19:12or this is how I would structure my code,
0:19:14or this is what it would look like in UI kit.
0:19:17How do I do that in SwiftUI?
0:19:20And in a weird way, the image that comes into my mind
0:19:26is to think of water flowing down a hill, where
0:19:30when the water flows down a hill,
0:19:32it will encounter resistance.
0:19:33It'll smash into a rock or run into a bank or something.
0:19:38And all it does is it just gently turns and follows
0:19:42to the side and will just keep finding the easy path until it
0:19:46gets all the way to the bottom.
0:19:48And I think once I-- it was a bit zen to say,
0:19:51but once my SwiftUI development became
0:19:54flowing like water down a hill, everything got a lot easier.
0:19:58Where if I start doing counter-resistance,
0:20:00I think to my-- rather than like, ooh, this is SwiftUI
0:20:02being annoying and getting in my way, I sort of think, huh,
0:20:06am I doing this the way that I should?
0:20:09Is this a symptom of me not using SwiftUI in the way
0:20:12it is best used?
0:20:14And most often, that was the case.
0:20:16How could I change it to flow with SwiftUI in the way
0:20:19that it's expecting and get back into its path?
0:20:21And as soon as-- very few times in the development
0:20:25of Widgetsmith, which is a very complicated, large app
0:20:28with all kinds of features and a very wide user base,
0:20:31there was a solution that was more SwiftUI-ish and got me
0:20:35to where I wanted to go.
0:20:36And sometimes that means that feature doesn't quite
0:20:38look the way that it could on UIKit
0:20:40or the way that I may have initially imagined it to look.
0:20:45But I can get to a place that is reasonable, that is workable,
0:20:49that very often is very clean from a code perspective
0:20:52and ends up being really good.
0:20:54Like, I'm a huge fan of SwiftUI.
0:20:56And now when I go back and have to do some work in UIKit,
0:20:59I just like, I don't even know what I'm doing.
0:21:00I feel like I'm coding with oven mitts on.
0:21:02And so that transition is difficult and not something
0:21:06that is right away.
0:21:07But it was certainly something that I found that--
0:21:10and especially having the freedom to be all SwiftUI
0:21:12rather than cobbling something together where you're like,
0:21:15oh, I'm going to replace just this TableView cell in SwiftUI,
0:21:18or I'm just going to sort of start shimming things in here
0:21:20and there, made it really hard to get full SwiftUI
0:21:24and get all of the benefits and all of the velocity
0:21:27that that enables.
0:21:30And if you-- and so without that velocity, then what's the point?
0:21:34Just stick with what you have and just hope
0:21:38that that lasts for long enough that you can--
0:21:42at some point, you will stop needing to maintain Overcast,
0:21:45whatever that is, in 10 years, 15 years,
0:21:47and just ride it into the ground.
0:21:49But otherwise, to modernize it, you really
0:21:52have to just sort of embrace that future in that way.
0:21:55Yeah, that's a good way to look at it.
0:21:57I mean, you mentioned all the shimming and everything
0:21:59if you try to do a piecemeal approach.
0:22:01And I've been running into that all the time.
0:22:03I mean, when I was doing my first phase
0:22:08of my big redesign over the last six months
0:22:11or whatever it was-- oh, more than that.
0:22:12Geez, almost a year.
0:22:14When I was doing that, I made the decision--
0:22:16I talked about it on the show-- that things that were already
0:22:19Objective-C-- like if I was working within a view
0:22:21controller, if that view controller was already
0:22:23Objective-C, I wasn't going to rewrite it in Swift.
0:22:26I did a lot of that work in Objective-C.
0:22:27And that actually held me back a lot,
0:22:30and it made certain things harder, as many of the APIs
0:22:33are decreasingly designed for Objective-C.
0:22:36And I actually-- I think that was the wrong decision
0:22:40in retrospect.
0:22:41While it brought the design forward,
0:22:43it didn't bring any of the code forward.
0:22:45And it didn't decrease my technical debt in this way.
0:22:49It actually increased it, if anything.
0:22:51And it made certain parts of the iteration process,
0:22:53which is most of what design is, most of its iteration.
0:22:56It doesn't take me six months to write a few theme changes
0:22:59to a view controller.
0:23:00It takes me six months to try all the different things I
0:23:02have in mind and see what works.
0:23:03If I was going to do more of this design work, which
0:23:06is what I'm trying to tackle now,
0:23:07with the Now Playing screen and the podcast screen,
0:23:09I am not going to make that same choice that way.
0:23:11Now, I want to rewrite those screens completely.
0:23:15And another major thing-- my app has not yet
0:23:18used the new Swift async stuff yet.
0:23:20And I actually just had to add that to this CloudKit code,
0:23:24because they deprecated some of the old CloudKit methods
0:23:27already.
0:23:28And so I had to start using that.
0:23:29And that's another thing, where if your app is not
0:23:31made with all the async stuff in mind,
0:23:33that's another huge migration that, over time,
0:23:36needs to happen.
0:23:37My current thinking is that leaving things that were
0:23:41already the old way-- Objective-C, UI Kit--
0:23:44leaving things that way, if they already were, was a mistake.
0:23:48I now regret that.
0:23:49And I now think that I want to do any future work
0:23:54in this clean start kind of way.
0:23:57And that's going to take a long time.
0:23:59But I think you're right, though,
0:24:00that the app overall, the UI and everything, is very stable.
0:24:04And I don't really need to rush to do something quickly
0:24:08right now.
0:24:10I should probably be taking the time to do it right
0:24:13and to pay down this technical debt in a way that
0:24:16will allow me to work better in the future,
0:24:20even if that means basically a rewrite of most of the UI.
0:24:24And I think, too, the end result of that
0:24:26is that it is a wonderful thing in the current environment
0:24:31as an iOS developer to be an expert at Swift and SwiftUI.
0:24:36That is the skill set that, going forward,
0:24:40is going to be clearly-- that's where the energy is going
0:24:44from Apple's perspective.
0:24:45That's where, as a community, things are going.
0:24:47And the quicker you can get yourself
0:24:51into that place, where you can code in SwiftUI just as well
0:24:55as you used to be able-- as you could in UI Kit--
0:24:57it's setting yourself up for opportunity and success
0:25:00in the future.
0:25:01And I worry that if you take the approach of doing it
0:25:05more piecemeal and trying to carry around the old code
0:25:08and doing it as you go, is you're never
0:25:11going to be able to be free of the past,
0:25:14such that you're going to be able to really embrace
0:25:16the future and to be able to really build things in the way
0:25:20that, at some point, you're going to have
0:25:23an idea for another app, inevitably.
0:25:25I mean, that's just-- if you're anything like me,
0:25:27and I think you've built a couple things over the years.
0:25:30So those ideas will come.
0:25:32And SwiftUI is great for rapid prototyping,
0:25:35for quickly exploring ideas, or even
0:25:37if you have an idea for a new feature in Overcast.
0:25:41And it's like, you decide you're going to add a stats area
0:25:44to show people their listening history over time, say.
0:25:47And you want to use Swift charts for this,
0:25:50or whatever that might be.
0:25:52The farther the app is in that direction
0:25:55to accept those new ideas, I think,
0:25:57will just allow you to be in this fresh space.
0:26:01And I think that's why I was initially thinking of nudging
0:26:06you in this direction and encouraging you to avoid--
0:26:10feeling the weight of--
0:26:12carrying around all this technical debt
0:26:14and having it feel like weight, rather than just saying,
0:26:16you know what?
0:26:17The code is fine.
0:26:18It works great.
0:26:19I'm going to partition it here.
0:26:20I'm going to start this new thing.
0:26:22I know you know exactly what you're building in terms of it's
0:26:24not an exploration, so you're not
0:26:26going to waste a lot of time there.
0:26:27And I would be very surprised if you just sort of sat down
0:26:30and worked diligently on it, that if you weren't able to
0:26:32build the vast majority of Overcast,
0:26:35again, much more quickly, in a matter of a few weeks,
0:26:38that you could have a basically working, rebuilt version of it.
0:26:42And then obviously, the actual refinement of that
0:26:45and filling it out will take some extra time.
0:26:47But at least spending that initial time to say,
0:26:49I'm going to rebuild the now playing screen in SwiftUI,
0:26:53and seeing how long that takes, and seeing
0:26:55what that looks like as a clean rewrite, I think
0:26:57would be a really instructive time, and certainly something
0:27:00that would be well spent to see where that goes.
0:27:03And if it does work, then great.
0:27:05And it's just like, the now playing screen,
0:27:06if you're on, whatever, an iOS 16,
0:27:08is just different than the old one.
0:27:09And that's fine.
0:27:10And that works great.
0:27:11And I don't think anyone would notice, or if they did,
0:27:14it would hopefully be noticing it in a positive sense.
0:27:17It's funny you mention that, because that's literally
0:27:19what I tried to do over the last few days,
0:27:21was the now playing screen.
0:27:23And that was my first thought.
0:27:25Oh, let me do this in SwiftUI.
0:27:26However, I ran into a wall immediately,
0:27:29which is that the now playing screen, the same view
0:27:32controller is operating both when
0:27:35it is minimized to the toolbar and when it is fully expanded.
0:27:38It's the same view controller.
0:27:39It's the same views that shrink down and join
0:27:42their new positions down below.
0:27:45And it's an interactive transition.
0:27:47And so I could not for the life of me
0:27:50figure out how to do that without everything else being
0:27:53SwiftUI around it.
0:27:55That's when I started getting into, oh, let me try SwiftUI
0:27:56navigation stuff.
0:27:57It's new in iOS 16.
0:27:59And I just slammed into so many walls doing that,
0:28:03and what seemed like bugs and limitations.
0:28:06And I just couldn't break through.
0:28:09I couldn't make it happen.
0:28:10And so I just gave up.
0:28:12And I was just going to go for a dog walk
0:28:14and have dinner with my family and think about what
0:28:16I'm doing with my life.
0:28:19But maybe it didn't have to be that way.
0:28:21I mean, I don't know.
0:28:22I'm sure there's a way to do this piecemeal.
0:28:24But I think it's going to be much easier
0:28:26to do it all at once.
0:28:27Yeah, exactly.
0:28:29And I think you're going to encounter
0:28:30so many of those things get easier when it's all one
0:28:33or it's all the other.
0:28:34And if you're only dropping down to UI Kit
0:28:37when you absolutely have to, I think
0:28:39we'll go a long way to making this work.
0:28:42And the reality is if in the end you decide you don't like it
0:28:45and you go down this road for a couple of weeks
0:28:49and you decide, you know what, this isn't for me,
0:28:52then you've gotten several weeks of experience
0:28:55doing SwiftUI work, which is making you a better SwiftUI
0:28:57developer, which is definitely helpful.
0:28:59And you're no worse off.
0:29:00You can go back and sort of think about it
0:29:02and take a different approach later.
0:29:03Because the nice thing about a hard fork
0:29:05is you're not breaking the old version in the process.
0:29:08You're just completely clean and separate.
0:29:09And it's a nice, straightforward path forward as a result.
0:29:13Yeah.
0:29:14Thanks for listening, everybody.
0:29:16And we'll talk to you in two weeks.
0:29:17Bye.