34: tvOS 10, macOS 10.12 and Swift 3
00:00:00
◼
►
Welcome to Under the Radar, a show about independent iOS app development. I'm Marco Arment.
00:00:05
◼
►
And I'm David Smith. Under the Radar is never longer than 30 minutes, so let's get started.
00:00:10
◼
►
So for the last few weeks, we've been covering WWDC announcements, platform by platform.
00:00:15
◼
►
And this week is kind of like the cleanup week because we're going to talk first about
00:00:18
◼
►
tvOS and macOS, and then some bonus stuff after that. And we're kind of lumping this
00:00:23
◼
►
together because, honestly, from the point of view of two iOS developers, there's not
00:00:28
◼
►
a whole lot of new stuff in tvOS or macOS
00:00:31
◼
►
that's really relevant to us.
00:00:33
◼
►
I guess let's start out with tvOS.
00:00:35
◼
►
I mean, neither of us have a tv app,
00:00:37
◼
►
but we've both kind of looked at it, considered it,
00:00:40
◼
►
even gone to the tvOS tech talks this past winter.
00:00:43
◼
►
So David, what do you think,
00:00:45
◼
►
has anything changed in regards to like,
00:00:47
◼
►
is anything in tvOS now going to make it more appealing
00:00:52
◼
►
or more relevant or more compelling
00:00:55
◼
►
for us to make apps for it?
00:00:57
◼
►
I don't think so. I mean, it's a strange thing to have an Apple platform that I really don't
00:01:03
◼
►
feel much drawn to making apps for. Because almost so many other platforms, I've always
00:01:11
◼
►
had an app available and ready on the first day. That was just sort of been my thing for—I
00:01:17
◼
►
did it for as close as I could for the iPhone, definitely did it for the iPad, for the watch.
00:01:24
◼
►
And I did it for Mac App Store even too, if I remember right.
00:01:28
◼
►
But there's something on the TV that just doesn't really appeal to me or feel compelling.
00:01:33
◼
►
And I think a lot of it's just the TV.
00:01:36
◼
►
And this is in large ways that Apple kind of is pitching it, is TV OS is like the future
00:01:42
◼
►
of TV is apps.
00:01:44
◼
►
But implicit in that in some ways is that the apps are reflecting the previous content
00:01:50
◼
►
that was shown on TV.
00:01:52
◼
►
And I think there's a lot of, unless you have a, you know, you're a content creator or producer,
00:01:59
◼
►
you're a network, you're a TV network or a movie station or something, or you're a game
00:02:03
◼
►
producer, someone who would alternatively be playing on a game console, there's not
00:02:08
◼
►
a lot there.
00:02:09
◼
►
I mean, maybe I'm just not creative enough.
00:02:11
◼
►
And I think in general, this has been borne out.
00:02:13
◼
►
Like I don't hear a lot of talk from, about interesting tvOS apps that aren't from networks.
00:02:22
◼
►
and largely it's just a slightly more convenient way to access content that you previously
00:02:27
◼
►
would have access to some other way.
00:02:30
◼
►
And the changes we see in TVOS this year seem lined up with that.
00:02:33
◼
►
There's really not much there, which fair enough to TVOS was announced in between the
00:02:38
◼
►
last WWDC and this one, and so there's less time for things to have changed.
00:02:43
◼
►
But the biggest change is the single sign-on thing, which is useful and awesome if you're
00:02:48
◼
►
a TV network or someone who needs to do a way to authenticate whether someone has bought
00:02:53
◼
►
a cable package. But that's a very narrow use case. And so generally it's like, cool,
00:02:59
◼
►
I'm glad there's more stuff happening here, I suppose, but in general, I'm like, yeah,
00:03:03
◼
►
that's kind of, it'll keep doing its thing and maybe I'll check in with it periodically,
00:03:06
◼
►
but I don't see much there for me. Do you see anything there for you? Because obviously
00:03:10
◼
►
you have, of the two of us, you have the closest sort of need or reason to be there, insofar
00:03:17
◼
►
as you make a media consumption app, which you could reasonably imagine existing on a
00:03:22
◼
►
television. Do you have any plans to go towards that, though?
00:03:26
◼
►
I still am kind of waiting and seeing on that, because, you know, I mean, as you mentioned,
00:03:30
◼
►
like, it really does seem, you know, like when the TV first came out, and when we first
00:03:35
◼
►
were hearing that we were going to have access to make apps for Apple TV, and there was this
00:03:39
◼
►
new TV platform with this new crazy remote that you can't hold and everything, I thought,
00:03:43
◼
►
And a lot of people thought, wow, this is gonna be really great once we figure out stuff
00:03:49
◼
►
we haven't even thought of before.
00:03:50
◼
►
Like apps that right now, as we think about it beforehand, it's like apps that right now
00:03:55
◼
►
we can't even consider, that we haven't even thought of, and there's gonna be something
00:03:59
◼
►
really cool that you can do on the TV now that we can put apps on it.
00:04:03
◼
►
And I think so far that has proven not to be the case yet.
00:04:08
◼
►
that so far we as an industry of app makers
00:04:13
◼
►
and Apple TV users, we really haven't figured out
00:04:16
◼
►
anything else to do on TVs than we weren't
00:04:18
◼
►
basically already doing before.
00:04:21
◼
►
Maybe now we're doing things better,
00:04:22
◼
►
and maybe we're doing things on different platforms.
00:04:27
◼
►
Before, there were no games on the Apple TV.
00:04:28
◼
►
Now there are games for it.
00:04:29
◼
►
Not a ton of them.
00:04:30
◼
►
They aren't all great, but there are games for it.
00:04:33
◼
►
But we're still basically using TV
00:04:36
◼
►
to watch video, maybe occasionally play some music,
00:04:40
◼
►
and play games.
00:04:41
◼
►
Like that's mainly what people use their Apple TVs for.
00:04:45
◼
►
So as you mentioned, like if you're not,
00:04:47
◼
►
you know, watching video is tough
00:04:49
◼
►
if you're not a content owner.
00:04:51
◼
►
Like there's not a whole lot for non-content owners to do,
00:04:55
◼
►
because for the most part, there's no good source
00:04:59
◼
►
where you can get video content to play in your app.
00:05:01
◼
►
Like there are video podcasts,
00:05:03
◼
►
you could make a video podcast player,
00:05:04
◼
►
Those are pretty, it's a pretty small market
00:05:08
◼
►
both of content and of viewers
00:05:09
◼
►
relative to something like YouTube or a TV network.
00:05:12
◼
►
So there's not a whole lot for you to do
00:05:15
◼
►
in making a video consumption app
00:05:17
◼
►
if you aren't a video producer
00:05:19
◼
►
or working for a video producer.
00:05:21
◼
►
And then most people I know who are indie developers
00:05:26
◼
►
make either some kind of media consumption app
00:05:29
◼
►
or what I would generally classify as productivity apps
00:05:32
◼
►
or utility apps.
00:05:34
◼
►
Like I don't know a lot of people who make games,
00:05:36
◼
►
and I don't know a lot of people
00:05:38
◼
►
who own TV stations and TV networks.
00:05:40
◼
►
So the vast majority of apps, of programmers I know
00:05:45
◼
►
who are like working for themselves
00:05:46
◼
►
and not contracting for somebody like a media company,
00:05:49
◼
►
I don't really see a lot for any of us
00:05:50
◼
►
to do on the Apple TV.
00:05:52
◼
►
There is that one area though
00:05:54
◼
►
that you mentioned of media consumption,
00:05:55
◼
►
like what else is there besides video
00:05:56
◼
►
that you might be able to get on there?
00:05:57
◼
►
And you know, like I know people who make RSS readers,
00:06:00
◼
►
I don't see much of a use for that on the TV,
00:06:02
◼
►
especially given there's no WebKit,
00:06:03
◼
►
but even if there was, I don't think that would solve the problem. So then I guess that
00:06:07
◼
►
boils down to, okay, what about audio? You know, I make an audio playback app. I don't
00:06:11
◼
►
need to worry about where the content comes from because it's free and open because it's
00:06:14
◼
►
actually the last useful medium. So, sorry, getting political there. So, there is a good
00:06:20
◼
►
question of like, well, is there a use for overcast on the Apple TV? And no question,
00:06:25
◼
►
there is a use for overcast for some people. Some people have asked for it. But for the
00:06:31
◼
►
most part, most people don't use their TVs, as far as I can tell. Most people don't use
00:06:36
◼
►
their TVs to just play audio content and then sit there with nothing else happening on screen.
00:06:44
◼
►
Most TV media consumption is video. And because I don't even play video, even the World of
00:06:49
◼
►
Video podcast, I'm not in. So because I don't even handle video at all, and I don't really
00:06:53
◼
►
intend to change that, I just don't think there's enough reason for me to be there to
00:07:00
◼
►
justify the fairly sizable amount of work it would take. The whole bottom half of the
00:07:07
◼
►
app, like the data layer, the sync layer, the audio engine, I got those built and running
00:07:11
◼
►
on Apple TV back when the SDK first came out with a couple hours of work. That was the
00:07:16
◼
►
easy part because it was already all iOS code. The hard part is the entire TV UI, which all
00:07:24
◼
►
basically has to be written from scratch. You pretty much can't use any code, or at
00:07:29
◼
►
you can't use most code that you wrote for iOS on tvOS
00:07:33
◼
►
'cause things just work differently,
00:07:34
◼
►
they're structured differently,
00:07:35
◼
►
the input is completely different,
00:07:36
◼
►
the navigation is completely different.
00:07:38
◼
►
So you basically have to write
00:07:40
◼
►
the entire UI layer from scratch.
00:07:42
◼
►
And I just, I started doing it,
00:07:46
◼
►
I made the login screen and stuff,
00:07:47
◼
►
and after making login and registration and everything,
00:07:50
◼
►
and I was like, you know,
00:07:51
◼
►
I really am not enjoying this at all,
00:07:53
◼
►
and what's the benefit really gonna be here?
00:07:55
◼
►
Like, a podcast app has a lot of screens,
00:07:58
◼
►
way, way more than you might think if you haven't built one.
00:08:01
◼
►
And yeah, I could just port over a subset of functionality,
00:08:04
◼
►
but it doesn't really, I don't know.
00:08:06
◼
►
It doesn't seem worth it unless there's really strong demand.
00:08:09
◼
►
And I just haven't seen evidence of that.
00:08:12
◼
►
I've seen evidence of a few people who want it,
00:08:14
◼
►
but not most.
00:08:16
◼
►
- Yeah, and I think it's a tricky platform too,
00:08:18
◼
►
'cause I was even trying to imagine
00:08:21
◼
►
if Apple has likely sold more Apple TV fourth generations
00:08:25
◼
►
or Apple Watches.
00:08:27
◼
►
And my guess is they've sold more Apple watches.
00:08:30
◼
►
And that's even, in and of itself,
00:08:32
◼
►
a relatively small and narrow audience,
00:08:36
◼
►
certainly compared to something like iOS,
00:08:37
◼
►
which is where it's just immense and massive.
00:08:42
◼
►
And so I think of something like TVOS,
00:08:44
◼
►
and it's like, usually if you have
00:08:46
◼
►
a relatively small addressable market,
00:08:49
◼
►
you have to be able to charge a lot for an app,
00:08:51
◼
►
for it to sort of make sense financially,
00:08:54
◼
►
and I'm not sure, like in general,
00:08:56
◼
►
the app store, that's always been kind of a tricky thing to have, or there's always
00:09:01
◼
►
been a downward force on pressure, pressure on prices. And so it's kind of a strange thing
00:09:06
◼
►
to be like, well, if it's, there's only, I don't know, a few million of them in the world.
00:09:11
◼
►
And of those, how many people are looking for third party apps that aren't just, you
00:09:16
◼
►
know, major TV networks or things like that. And so, in general, it may just be fine for
00:09:21
◼
►
to be a platform that there isn't a lot of interest from people like us, which seems
00:09:27
◼
►
like that's probably fine, that's okay. Maybe it's for other people, it's cool,
00:09:31
◼
►
it's—I have one in my house and I use it, but it's not a platform that I expect to
00:09:37
◼
►
really dive into until there is such—something changes to where that becomes compelling.
00:09:42
◼
►
And I don't really know what that change could or would be, but as it is now, I don't
00:09:46
◼
►
expect that to change in the near future.
00:09:48
◼
►
Right. I mean, one obvious big thing they could do is the App Store environment really
00:09:53
◼
►
needs some help on the Apple TV. It is a very limited, difficult to browse App Store. There
00:09:58
◼
►
are still no conveniences like web links to Apple TV. So if you convince somebody to go
00:10:04
◼
►
look for your Apple TV app, they can't just click a button and buy it from their phone
00:10:08
◼
►
or computer. They have to go to the Apple TV, which they might not even be near at the
00:10:12
◼
►
time. They might be reading Twitter on their phone away from home or something. But they
00:10:15
◼
►
to go to the Apple TV at home, if they remember to do that, go to the App Store, search for
00:10:20
◼
►
your app, find it. There's no link or buy for later or anything like that. So a lot
00:10:26
◼
►
of that could help this a little bit. But also, I just feel like you as an Apple TV
00:10:32
◼
►
user, me as an Apple TV user, I've used the Apple TV every day for years. And of course
00:10:37
◼
►
we got the new one immediately. And I've been using that every day since it came out.
00:10:41
◼
►
The Apple TV is our primary TV connected device. The vast majority of the time the TV is on,
00:10:45
◼
►
what we're using. So as a user though, I hardly ever go to browse the App Store on the Apple
00:10:52
◼
►
TV. Like that's not what I'm sitting down there to do. I'm sitting down in front of
00:10:56
◼
►
the TV usually to play video content in like two or three apps. And I think for most people
00:11:02
◼
►
that's probably the biggest use cases. Like you're not sitting down to browse through
00:11:07
◼
►
the App Store and buy a bunch of crap and see what you like, you're probably sitting
00:11:10
◼
►
down to watch TV. And even if you were sitting down to browse, I think, "What would I be
00:11:16
◼
►
browsing for?" I'd probably be browsing for games. So like, I--and when I have--the
00:11:23
◼
►
handful of times I have browsed the App Store on Apple TV, that's the only--I was only looking
00:11:27
◼
►
for games. I was not looking for like, "Oh, I wonder if there's any podcast players."
00:11:30
◼
►
That never even crossed my mind. It was only about, "Okay, I'm at this thing. I either
00:11:34
◼
►
want to watch TV or play games." And that just might always be the case. Like, that
00:11:39
◼
►
might never actually change with the Apple TV. And that's okay. That's just how people
00:11:43
◼
►
use their TVs most of the time. And if the TV never ends up becoming a general purpose
00:11:49
◼
►
computing platform, that's okay. We have lots of other general purpose computing platforms
00:11:53
◼
►
that are really good and really compelling. And so not everything needs to be one. Obviously
00:12:00
◼
►
you can say a lot of similar things about the watch, honestly. But I think the TV is
00:12:03
◼
►
even more limited because it's like this fixed thing in your house that you're accessing
00:12:06
◼
►
through this distant remote with very little interaction possible and you just kind of
00:12:12
◼
►
want to sit back and watch TV or play a game. So I think if you're a game maker, the case
00:12:16
◼
►
is fairly compelling to, you know, if you can get your game ported to the Apple TV without
00:12:21
◼
►
a whole ton of work, it is almost certainly worth doing that. But if you are pretty much
00:12:26
◼
►
any other kind of app maker besides a TV content producer, I think you can safely avoid it
00:12:32
◼
►
for now. Our sponsor this week is Pingdom. Start monitoring your websites and servers
00:12:38
◼
►
today with Pingdom. Go to Pingdom.com/Radar. You get a 14-day free trial, and when you
00:12:43
◼
►
use offer code radar at checkout, you get 20% off your first invoice. Pingdom is focused
00:12:47
◼
►
on making the web faster and more reliable for everyone who has a site or runs a service.
00:12:51
◼
►
They offer powerful, easy-to-use tools and services for monitoring your site and its
00:12:56
◼
►
performance. For example, you can monitor a server, a database, an entire website, and
00:13:00
◼
►
such a breeze to do it. They use more than 70 global test servers that emulate visits
00:13:04
◼
►
to your site, checking its availability as often as every minute. And they give detailed
00:13:08
◼
►
performance metrics. They can alert you when it's down after one minute. And of course,
00:13:13
◼
►
you can customize that if you just have a flaky site and you already know that. But
00:13:17
◼
►
they can alert you immediately or after a certain period of downtime or with certain
00:13:20
◼
►
thresholds being crossed or if a certain string doesn't appear on the page, like a string
00:13:24
◼
►
saying everything's okay or your footer or whatever else. It is incredibly useful. I've
00:13:28
◼
►
I've used Pingdom now for what, seven years was it?
00:13:32
◼
►
- Something like that, yeah, and I think I'm six years,
00:13:34
◼
►
I'm just behind you on that.
00:13:35
◼
►
- Yeah, I mean, it's such a good service
00:13:37
◼
►
for monitoring your stuff, and anybody else's stuff too.
00:13:39
◼
►
Like, we used to use it to monitor changes
00:13:41
◼
►
to the WWDC site back when you had to rush in
00:13:43
◼
►
and get tickets, you can monitor any URL,
00:13:45
◼
►
you don't have to own it.
00:13:47
◼
►
It's a really great service, we love Pingdom,
00:13:48
◼
►
I love Pingdom, check it out today.
00:13:51
◼
►
Go to pingdom.com/radar, and use code radar
00:13:56
◼
►
to get 20% off your first invoice.
00:13:58
◼
►
Use Pingdom.
00:13:59
◼
►
You should not learn that your site is down
00:14:01
◼
►
by people telling you on Twitter.
00:14:02
◼
►
You should already know, and you should be fixing it
00:14:04
◼
►
before anybody sees it.
00:14:05
◼
►
Thanks a lot to Pingdom for sponsoring our show.
00:14:08
◼
►
- So the other platform that I think
00:14:10
◼
►
seemed like it made sense to just briefly touch on
00:14:13
◼
►
is macOS, and macOS is an interesting platform
00:14:17
◼
►
in so far as I use it constantly,
00:14:20
◼
►
but I don't develop for it.
00:14:22
◼
►
I develop on it, and so there are a variety
00:14:25
◼
►
of interesting changes happening to macOS.
00:14:27
◼
►
name, it has a new file system, and there's a few other user-facing things, but the only
00:14:34
◼
►
thing that actually caught my attention in this WWDC on the Mac that I think I'm excited
00:14:39
◼
►
about as a developer is the new console app, which is a bit of a low-level thing, I suppose,
00:14:46
◼
►
to be excited about. But I got a chance to play with this when I was in WWDC, and it
00:14:51
◼
►
It is going to be extraordinarily useful to be able to keep track and diagnose problems
00:14:57
◼
►
when I'm debugging to have the new console app on Mac OS Sierra.
00:15:02
◼
►
Because essentially the thing that it can now do, and this is part of this whole new
00:15:06
◼
►
re-architecting they've done of the way console and logging works in the various platforms,
00:15:13
◼
►
but is you will be able to get the logs from your devices.
00:15:19
◼
►
So like from your watch or your phone or your iPad,
00:15:23
◼
►
streamed to your Mac if you have a debug session,
00:15:26
◼
►
if you have a sort of a development session in active.
00:15:29
◼
►
And once they're in the console app,
00:15:31
◼
►
you can start to do clever and interesting things with them.
00:15:34
◼
►
Like you can start to filter them down
00:15:36
◼
►
based on particular keywords,
00:15:37
◼
►
or what I find this is really hopeful
00:15:41
◼
►
for me in watch development,
00:15:42
◼
►
where watch development can get really, really annoying
00:15:46
◼
►
because a lot of the things that you're trying to do,
00:15:49
◼
►
you don't want to be connected to Xcode
00:15:52
◼
►
while they're happening.
00:15:53
◼
►
So all the background refresh stuff.
00:15:55
◼
►
You want it to be running off on its own
00:15:57
◼
►
and then be reporting results as it goes.
00:16:00
◼
►
And you want to see, OK, every 15 minutes
00:16:02
◼
►
it woke up and refreshed itself.
00:16:05
◼
►
So right now what I end up doing is I have my iPhone connected
00:16:09
◼
►
to my watch, connected via Lightning port,
00:16:11
◼
►
and then Xcode open to the Devices tab.
00:16:14
◼
►
And then I have the full and complete console log from the watch shown there.
00:16:19
◼
►
And then I need to go through and take that file, save it to a disk, run it through grep
00:16:24
◼
►
to find the various relevant things and kind of go through it.
00:16:27
◼
►
It's a bit of a nightmare.
00:16:28
◼
►
In the new console, you'll be able to do that much more straightforwardly.
00:16:30
◼
►
I can just say, "Show me messages from my app from my watch."
00:16:35
◼
►
And that'll just stream live and I don't have to fuss with grep or anything like that.
00:16:39
◼
►
So that's kind of exciting, kind of nice, very low-level and straightforward.
00:16:43
◼
►
but I almost missed it in the announcements
00:16:45
◼
►
that that was coming.
00:16:47
◼
►
But other than that, I didn't see anything in it
00:16:49
◼
►
that was really exciting or interesting to me.
00:16:51
◼
►
I was like, yep, hopefully at this point,
00:16:53
◼
►
all I want from the Mac is for it to be stable, reliable,
00:16:56
◼
►
a place that I can sit down, open Xcode, and get to work.
00:16:59
◼
►
And I think macOS Sierra will probably be that,
00:17:03
◼
►
and so I'm happy.
00:17:05
◼
►
- Yeah, I mean, as a user, it seems I'm pretty happy with it.
00:17:08
◼
►
As a developer, I am a Mac developer slightly,
00:17:13
◼
►
in that I did recently write a Mac app called Quitter,
00:17:16
◼
►
and now I'm working on another one
00:17:18
◼
►
for podcast post-production utilities, basically.
00:17:22
◼
►
But because I'm such an elementary-level Mac programmer,
00:17:28
◼
►
imagine if you were learning iOS development,
00:17:32
◼
►
and you started learning iOS development in March.
00:17:36
◼
►
And that was the first time you ever did it.
00:17:39
◼
►
Whatever was announced at WBC wouldn't really be
00:17:42
◼
►
that important to you because you were at such an elementary level that you still need
00:17:48
◼
►
to learn the basics that were announced five, ten years ago, if it was that old. So that's
00:17:53
◼
►
kind of where I am with macOS development, where I'm still using the basic stuff and
00:17:59
◼
►
any new things they introduce to the Mac. First of all, the Mac API doesn't change
00:18:03
◼
►
much these days anymore because it's much older and has matured and the rate of change
00:18:09
◼
►
much slower than an iOS, but whatever they would change
00:18:13
◼
►
would be so far above my head unless they radically
00:18:16
◼
►
revamped AppKit, which I have doubts on whether
00:18:19
◼
►
they will ever do that.
00:18:21
◼
►
So it's not really relevant to me, whatever they change.
00:18:25
◼
►
I don't even know what they change, but whatever it is,
00:18:26
◼
►
it's almost certainly not relevant to me,
00:18:30
◼
►
except for stuff that's shared with iOS.
00:18:33
◼
►
So as a developer, cool.
00:18:35
◼
►
I love that there's no App Store.
00:18:36
◼
►
Let's move on.
00:18:38
◼
►
So I guess the last thing to talk about for major WWDC announcement areas is Swift. Now,
00:18:47
◼
►
Swift is interesting because ever since it went open source, which was what, last fall?
00:18:54
◼
►
Was that it?
00:18:55
◼
►
It was right before the end of the year, I think. Because I think it was because they
00:19:00
◼
►
had said—what sticks in my head is that they had said, "We're going to open source
00:19:03
◼
►
Swift this year," and then they ended up open sourcing it in December, like towards
00:19:08
◼
►
the end of December, but it was along those lines.
00:19:10
◼
►
- Right, so ever since Swift has been open sourced,
00:19:14
◼
►
there's, you know, we've seen the roadmap,
00:19:17
◼
►
like they've developed the vast majority of it in the open,
00:19:20
◼
►
so we've seen the roadmap and we know what's coming.
00:19:23
◼
►
In many cases, the community has input
00:19:25
◼
►
and influences what's coming, which is great.
00:19:28
◼
►
So there wasn't really any kind of surprise
00:19:31
◼
►
to announce at WWDC, except maybe the Playgrounds app
00:19:34
◼
►
for iPad, but, and that's big and that's good,
00:19:37
◼
►
but I don't think it's really that relevant to existing Swift developers. What is new
00:19:43
◼
►
So I think the biggest things that—I'm by no means a Swift expert, but the biggest
00:19:48
◼
►
goals as best I could understand for Swift 3 was to get to a place where they would be
00:19:54
◼
►
able to maintain source compatibility going forward. Because in the first versions of
00:20:00
◼
►
Swift, Swift 1 and Swift 2, those jumps, and from 2 to 3 in fact, there have been a variety
00:20:06
◼
►
of source-breaking changes that I hear from a variety of people who are Swift developers,
00:20:11
◼
►
where something new comes out and sometimes there's tools to help them with this, but
00:20:16
◼
►
then they need to go and sit down for a day and fix all the things to make it not broken
00:20:21
◼
►
anymore, which is a little bit scary. If you imagine if you had a project of any kind of
00:20:28
◼
►
significance and you go through this massive refactoring process, to have confidence that
00:20:33
◼
►
at the end of it, like everything works in the way that you expected it to work.
00:20:37
◼
►
So as best I understand, for Swift 3, their goal was to get all of those kinds of changes
00:20:44
◼
►
done with at once.
00:20:45
◼
►
And so now, from Swift 3 going forward, there should be very few things that would break
00:20:51
◼
►
source compatibility going forward.
00:20:53
◼
►
There may be things that change, you know, I believe the binary format and things is
00:20:59
◼
►
not stable yet and things like that, but that doesn't really matter practically.
00:21:03
◼
►
It's an important thing, but in general, that's more of a tooling problem than a developer
00:21:11
◼
►
There's certainly some overlap there, but in general, that's fine.
00:21:13
◼
►
Then now in Swift 3, they've gone through and they've done all these things, like they've
00:21:16
◼
►
changed the way things are named, so they got rid of a lot of prefixes, they did some
00:21:22
◼
►
really cool and clever things to take C APIs and make them look swifty, which I thought
00:21:28
◼
►
was really clever. So like now if you're working with core graphics, which even felt awkward
00:21:34
◼
►
in Objective-C, now in Swift it actually looks really Swift, and it looks really clever and
00:21:40
◼
►
clear to be able to, you know, you take your context and you call methods on it in a way
00:21:44
◼
►
that you would expect from Swift. And I believe all it's doing is under the hood, it's taking
00:21:49
◼
►
your Swift syntax and like unwrapping it and turning it into this, the old sort of very
00:21:56
◼
►
verbose C syntax, but it's doing things like that. So it's just trying to make the platform
00:22:02
◼
►
make it a really nice, clear and concise language to start writing in. And going forward, I
00:22:08
◼
►
think the big things they're expecting to they're working on for like, I don't even
00:22:12
◼
►
know if it's 3.1 or Swift 4 or whatever the roadmap will go get towards like they're
00:22:17
◼
►
going to make the binary more stable, work on generics, slightly improved concurrency,
00:22:23
◼
►
I think is something that I remember being on the roadmap. But in general, Swift seems
00:22:27
◼
►
to be in a pretty good place after, you know, it's two years in from when it was first announced.
00:22:34
◼
►
I think it finally seems to have entered into the slightly mature phase of its life, where
00:22:41
◼
►
this is probably a reasonable time to sort of start diving into it, because what you're
00:22:47
◼
►
you're learning now is unlikely to be, sort of,
00:22:51
◼
►
need to be unlearned a year from now.
00:22:54
◼
►
- I really should dive into it.
00:22:56
◼
►
I just keep wanting to do things faster
00:22:59
◼
►
and with less time investment,
00:23:01
◼
►
and so I keep falling back to Objective C,
00:23:03
◼
►
but I do admit I am tempted to jump into Swift this summer.
00:23:06
◼
►
I just haven't quite done it yet.
00:23:08
◼
►
Do you plan on anything with that?
00:23:10
◼
►
- So, shockingly, yes.
00:23:11
◼
►
This is actually one of these,
00:23:14
◼
►
So this last week, I decided that I was going to learn Swift, and I sat down with the Swift
00:23:23
◼
►
developer book in iBooks, and I read the first sort of third of it, which is essentially
00:23:29
◼
►
the language overview, and I'm delighted to say that I am going to be—I'm a little nervous
00:23:35
◼
►
in saying it, but I think I need to say it in order to make it actually happen—that
00:23:38
◼
►
I'm going to write my next app in Swift.
00:23:42
◼
►
And if you are a follower of my work, I tend to release a new app every summer, at least
00:23:48
◼
►
And so the next app I write is going to be in Swift.
00:23:52
◼
►
All right, congratulations!
00:23:54
◼
►
Earlier this week, I think on Tuesday, I went into Xcode, you know, "File a new project,"
00:24:00
◼
►
and for the first time ever changed the language dropdown from Objective-C to Swift.
00:24:07
◼
►
And so I've been spending the last few days just kind of digging into how I would actually
00:24:12
◼
►
write an app in Swift.
00:24:14
◼
►
And it's weird.
00:24:15
◼
►
It's taken a lot of like, it's just this really strange feeling.
00:24:20
◼
►
And it almost makes me think of what I imagine people who switch to like, try and learn a
00:24:24
◼
►
Dvorak keyboard, their experience where it's like, it feels really familiar, like typing
00:24:29
◼
►
feels familiar.
00:24:30
◼
►
But it's like, I'm writing Swift and it looks familiar.
00:24:34
◼
►
Like I know all the API's.
00:24:35
◼
►
It's not like I'm doing something new that I had to learn.
00:24:38
◼
►
I know how UIKit works, I know how HealthKit works, I know how all these frameworks work,
00:24:43
◼
►
but I have no idea how to call it.
00:24:45
◼
►
And so I keep running off to Google and being like, "How do I do this in Swift?
00:24:50
◼
►
How do I do this in Swift?"
00:24:51
◼
►
And it keeps learning the syntax and exactly all the idioms for it.
00:24:57
◼
►
But overall, it's been pretty cool.
00:25:00
◼
►
It's an interesting language because I think ultimately Objective-C is a better fit for
00:25:06
◼
►
my mentality than Swift is.
00:25:09
◼
►
I think I like Swift as a language and I can see its utility.
00:25:14
◼
►
The thing that always kind of frustrates me with it, at least so far, and I'm certainly
00:25:18
◼
►
a bit of a noob with it at this point, but it values correctness higher than I would
00:25:27
◼
►
value correctness, which maybe makes me a bad programmer. But the way I think about
00:25:32
◼
►
a lot of things is I don't write code that has these elaborate error checking things
00:25:40
◼
►
in it. I tend to do best effort and then just throw up my hands. It's sort of the approach
00:25:46
◼
►
that I'll often take in my apps. And that's just the nature of the way that I program.
00:25:50
◼
►
I go for quick, and I'm experienced enough that I know how to not write horrible code
00:25:56
◼
►
that's going to be very problematic. And I mean, I would, this is the way that I built
00:25:59
◼
►
my apps. And if you look at my apps, I wouldn't think you would say that they're, you know,
00:26:04
◼
►
like poorly, poorly designed or created. But in Swift, there's all of these things that
00:26:09
◼
►
you just have, you can't get around, like everything has to be super correct and type
00:26:12
◼
►
safe and the whole thing with optionals and like, is this nil? Or is it not? No. And you
00:26:17
◼
►
have to always check. Whereas in Objective C, I can be like, I know it's not or I know
00:26:21
◼
►
that if it is nil, I don't care. And there's a philosophical difference there that I have
00:26:28
◼
►
to give into and be like, "Okay, no, it's fine that I have to be explicit about all
00:26:33
◼
►
these things," which I imagine in a team environment would be huge, that you don't
00:26:39
◼
►
have all of this meta information that is just stuck in my brain about how this function
00:26:45
◼
►
works because I'm the one who wrote it and I'm the only one who's ever going to see
00:26:49
◼
►
it. Whereas if you work in a team environment, it might be more important to have everything
00:26:53
◼
►
like, it's almost like self-documenting in a way where all the conditions and things
00:26:59
◼
►
have to be so much more explicit. But overall, I like it. It's been weird. I like that there's
00:27:05
◼
►
a lot less code, it feels like. Like I have more code per line, because I often have to
00:27:10
◼
►
do a lot of extra kind of like casts and little checks. But overall, it seems like there's
00:27:17
◼
►
no header files and things. Overall, the lines of code count goes down, and so it's been
00:27:23
◼
►
fun. And I guess we'll check in in a couple of months at the end of the summer when I've
00:27:27
◼
►
actually written this app, and it's not just this terrible, basic, learning my first UI
00:27:35
◼
►
kit program to see if this experiment succeeds. But so far, so good, and I recommend trying,
00:27:43
◼
►
because I think this seems like the right time. One of our first episodes was about
00:27:48
◼
►
when we were going to get into Swift, and I think I remember we were saying, "Well,
00:27:53
◼
►
we want to do it when it's stable and it's a reasonable thing to tackle." And this
00:27:58
◼
►
felt like the right time for me, so I've taken the plunge.
00:28:02
◼
►
All right, well congratulations. Now I'm the last one, so I'll probably take the
00:28:08
◼
►
point myself soon, but I'm not quite there yet. Probably later this summer. It's always
00:28:14
◼
►
like the year of desktop Linux. I'm always going to write Swift starting next month.
00:28:18
◼
►
All you need to do is write a new app, right? You need to just broaden your horizons, think
00:28:25
◼
►
of something new to make, and then just do that scary thing of changing the dropdown
00:28:29
◼
►
from Objective-C to Swift, and you can go from there.
00:28:33
◼
►
Yeah, I'm curious, do you think you're going to be writing all or mostly Swift from
00:28:38
◼
►
this point forward, even in existing code bases?
00:28:43
◼
►
I expect to be writing Objective-C in my existing products and Swift in my new things, I think
00:28:48
◼
►
is probably what I expect to do.
00:28:51
◼
►
The context shifting has been—the little bit I've done so far where I would look
00:28:56
◼
►
at the way I did something previously in Objective-C and then try and Swiftify it, it really hurts
00:29:01
◼
►
your brain to—they're so similar but so different that if I think I'm going to want—if
00:29:07
◼
►
I'm working on a particular project, I want to just be in the Objective-C mindset, or
00:29:11
◼
►
if I'm in this one, I want to be in the Swift mindset. That jumping back and forth between
00:29:15
◼
►
them I think would just drive me insane. Like the number of times I do ampersand quote for
00:29:22
◼
►
a string or things like that, where it's like all—or add a semicolon to the end of
00:29:26
◼
►
a line, which are just habits I have from a JFC, but in Swift I don't need them, and
00:29:32
◼
►
so I think I would just drive myself crazy jumping back and forth. So I have this one
00:29:36
◼
►
new project, it's one I'm going to work on in the summer, and it'll be in Swift,
00:29:40
◼
►
and we'll see how it goes.
00:29:41
◼
►
Awesome. All right, well we're out of time this week. Thank you very much for listening,
00:29:45
◼
►
everybody, and good luck, Dave, with your new Swiftification.
00:29:49
◼
►
And we'll talk to you next week.
00:29:51
◼
►
[BLANK_AUDIO]