243 points · by Austin_Conlon · 5y ago · 112 comments
Apple used to be awesome at documentation. I hope this effort extends to Apple's other frameworks.
Back when I used wrote iOS crap, I used dash as a quick reference for APIs.That was pretty good at alerting me to documentation changes, since it has to download an update. https://kapeli.com/dash
I only started using it (never did buy it) because I was used to using zeal, a free-software alternative.
I interviewed with them in early 2019, and it came down to me and one other person, but I was remote and the other person was in-person. After some back and forth, they went with the other person and told me it was because I would be the second remote person on that team, both hired around the same time, and that nudged them toward the other candidate.
Now everybody is remote, so... fortunately, I'm happy where I ended up instead.
This guide would’ve saved me countless hours had it been available in the summer.
SwiftUI is really great, Combine can be hard to get into for people not initiated in Reactive and generally it's as fast to build stuff in as Flutter without dealing with the tragedy called Dart.
I wish they spend more time looking into Xcode, developer documentation etc. And it is 25M developers at $99 a year. That is $2.5B. And it is looking less than $10M a year investment into Xcode.
Nowadays it is basically a language to write Flutter applications, hardly worthwhile to bother using it for anything else.
Flutter is taking place on Google politics, while Google lets Flutter, JetPack Composers and PWAs play the game of cross platform GUI frameworks, with the difference that Kotlin and JavaScript/TypeScript have a much broader eco-system than Dart.
In general it just feels like old Java spiced up with some Javascript niceties like Futures and a nice constructor syntax.
But you should've noticed that coming from Kotlin?
Why wouldn't they use Kotlin as most mobile developers are already used to it?
Typescript was my first introduction to a typed language and it astonishs me the decisions made in the 'earlier days' regarding nullability.
Some relevant discussion.
The problem was that AppCode was always a few months behind Xcode in terms of Swift support, and Interface Builder never really worked right. So the workflow was to have them both open at the same time and constantly switch back and forth, which at the end of the day just isn't great.
I wish Xcode didn't suck, but it does in so many ways. Not much to be done about it.
But AppCode's navigation and refactoring capabilities are much better.
I remember around when Swift came out, Xcode was so bad that I couldn't even use it because typing was ~1 character/second and it would crash every few minutes. It's definitely recovered from that and I can actually type without lag now.
Like many of Apple’s developer tools, if you stick to the happy path, performance is great. Practically that means compiling your source into a single Swift module and keeping the number of modules low. If you are a “basic” iOS or macOS app with just a couple of 3p libraries things work great. Real world projects are drastically more messy...
Autocomplete in Swift is still broken but I don't think it's an issue with the language itself (autocomplete is probably easier to implement in Swift given the nature of the language).
For me Xcode is quite nice. Didn’t like AppCode. Not sure why people are so enthusiastic about it. What does it give besides better code completion? Development is a lot more than code completion.
Why aren’t files in groups sorted by default? Why does sorting them cause large sections of the project file to be rewritten? Why do I need to add files through the UI? (Why can’t I create them in the terminal and have them just show up?)
I know that groups vs folder references play a role here but most projects use groups, and groups are a terrible experience.
It all leads to constant merge conflicts and files just accidentally getting removed from groups and nobody being able to tell in code review. They need to fix the project file.
Android Studio requires a gaming rig to run properly, Android developer forums are filled with discussions on how to not use it in pain.
struct ContentView: View {
var body: some View {
VStack {
ForEach(0..<3) { _ in
HStack {
Text("Leading")
Text("Trailing")
}
}
}
}
}
> Looking at the above code sample, it’s easy to jump to the conclusion that the resulting UI will consist of a vertically aligned UIStackView — which’ll then contain a set of horizontally aligned, nested stack views, which in turn each will contain two labels rendered using UILabel. However, none of those assumptions are actually true — as SwiftUI instead draws our labels directly using the private CGDrawingView class.Under the hood it will use some UIKit like UIScrollView but the whole architecture is different.
On UIKit, the objects you create stay retained as long as they are used and all you do is to change properties when using.
On SwiftUI, everything is released and retained every time there’s a change.
That’s why you need to address the life cycle differences when you use UIKit and SwiftUI together.
https://stackoverflow.com/questions/64049757/are-swiftui-com...
It is a completely new paradigm, that’s it. Implementation details are just that.
[1] https://stackoverflow.com/questions/65173861/saving-a-file-t...
They ignored errors, so didn't know there was no "Documents" directory, and their file write therefore failed.
There’s something to say about a first-class library, meaning one that is being used exactly as designed. I mean, why do people use Javascript? Because it’s the native language of the browser.
Most places hiring are looking for cross platform “2 developers for the price of one” ... and the burden of dealing with cumbersome react native falls on the developer.
If you’re doing anything more complicated than that, the productivity gains diminish quickly to the point where it’s easier and faster to just build to native applications.
Because Apple could and I bet they sure will add hardware optimizations in future Mn chips for apps made entirely in Swift+SwiftUI+Combine etc.
Also I don’t think Flutter comes close to how SwiftUI spits native paradigms for each device like Mac, iPhone, iPad, Watch and TV from mostly the same UI code.
Even with all the rough edges currently SwiftUI+Combine is how I want all my programming to be done from the day they were announced.
SwiftUI is also cross-platform, in Apple ecosystem. That is, you can develop all of your components and have them work on iOS and macOS. Then glue them together with platform specific main view.
SwiftUI will also always have all of the native features whereas cross-platform tools always lag behind. This is important for smaller developers as releasing before others can be what makes or breaks your app's success.
Cross-platform never meant "just an iphone and a mac os with the correct version". SwiftUI looks like a very cool tech, but it isn't "cross-platform", period.
It might be crappy marketing spin but it's hard to call anything other than the web cross-platform by that definition. It's not just iPhone and a Mac either, it's every Apple platform that has a screen. I don't think Flutter or React Native can claim that despite being called cross-platform.