Recorded – watch the full episode on YouTube.
What are your thoughts about SwiftUI – is it the future of iOS development? Is it going to replace UIKit anytime soon?
James Thomson: I think the answer to that is probably yes, and probably no. I think it's the future. I don't think it's the future in the next two years. Is it the future in five years? Possibly. Is it the future? Probably.
Right now, you know there's some people doing really nice stuff with it. There's some rough edges to it. There's some stuff where you have to break out to UIKit or AppKit or whatever. The same is true of Catalyst, in some ways.
"If you're starting a brand new project and you're thinking two years ahead on it, maybe SwiftUI is the place to start on that. If you have a lot of existing code base, if you're looking at doing a Mac app, Catalyst is a good thing."
I think it will be interesting to see what gets announced this year. Because there's been, I don't want to say they've had another year to work on it because they haven't. Especially in the last month or whatever. I think plans will have gone out the window for a lot of things. But it'll be interesting to see, especially to both of Catalyst and UIKit, and SwiftUI, where it looks like the investment has been in terms of time.
Because I think that will be an interesting signifier. If we see sort of whole load of new Catalyst stuff and a whole load of new SwiftUI stuff, these are both good ways of doing things. You pick what works for you. I think that's true of a lot of things. If you're starting a brand new project and you're thinking two years ahead on it, maybe SwiftUI is the place to start on that. If you have a lot of existing code base, if you're looking at doing a Mac app, Catalyst is a good thing.
There's no “one size fits all,” and nothing works perfectly. If you had infinite time for these things, let's write a bespoke app from scratch on all your platforms. But not everybody has that time.
Paul Hudson At this point, SwiftUI is quite a long way behind UIKit in terms of support. There are no text views, there are no collection views, there are no attributed strings, and similar. And that's going to change, presumably, in WWDC20. They're going to say, “here are collection views, here are text views.” But UIKit's not sitting still. Right?
James Thomson: Another interesting thing might be, and maybe not this year, maybe next year, if Apple rolls out AR devices. What are the SDKs going to be like for that? Is it going to be some UIKit variant? Or is it going to be something that they've thought through, like 3D SwiftUI, if you see what I mean? So you can imagine something along those lines, kind of.
It's clear they're not putting all this effort in for nothing. It's something that they think, it's like Swift itself: “here is a thing we have made. We believe this to be the future.”
And Swift, what are we at? Five years, six years? Something like that. We've seen that evolving over time and becoming, if somebody said on year one, year zero, are you going to rewrite your app in Swift? People would go, “No.”
Okay, some people would, but the value proposition wouldn't have been as a good thing. But if you say to somebody, now, “Are you going to write your app in Swift?” If you're writing a new app, yeah, almost certainly.
I think there's going to be that process for SwiftUI as well. And candidly, I am not doing either of those things. I have an awful lot of Objective-C. PCalc still has some routine names in it that are the same as they were from the original Pascal version. There are variable names and there are things which are the same as the Pascal.
You could say I'm slow to adopt on some things and quick to adopt other things. But with the Dice app, it was a case of, "I want to do this thing in a week." I've done a certain amount of Swift. I can read Swift, but I wouldn't say I'm fluent in it. So it was the easiest thing for me to do was to write it in Objective-C. And also SwiftUI – all this stuff I'm doing is 3D, so SwiftUI doesn't really fit into that world as much, although you can use it for the interface things. But I'm taking a wait and see approach to things on SwiftUI. I do genuinely think is the future, but I don't think it's my present.
This transcript was recorded as part of Swiftly Speaking. You can watch the full original episode on YouTube, or subscribe to the audio version on Apple Podcasts.
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Link copied to your pasteboard.