SwiftUI tutorials rewritten completely
developer.apple.com
developer.apple.com
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.
First one took a year before I got a reply (after reminding him), and only partly answered the request.
The second one I'm still waiting for a reply.
I would love for Dash 5 to fix these issues still, and I would upgrade in a heartbeat, but as it stands, I'm stuck with Dash 4.
The issues are:
1. Dash 4's sidebar shows significantly more hits when searching, making it a lot easier to find what you were looking for, compared to the "omnibar" of Dash 5:
https://i.imgur.com/smuNFws.png vs https://i.imgur.com/SeTShSL.png
2. Dash 4 shows/loads the currently selected search immediately, requiring no extra step. Dash 5 requires the user to press enter to confirm the search. This is especially frustrating when triggering a search from an editor
edit: where did he indicate he was looking for feedback on these features?
I thought it was in the release notes for v5, but I can't find them at this point to verify. I suppose I may be misremembering.
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.
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.
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.
Some relevant discussion.
Android Studio requires a gaming rig to run properly, Android developer forums are filled with discussions on how to not use it in pain.
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.
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).
CMD+,
Locations
Derived Data
CMD+Q Xcode
Delete!!! Derived Data
Restart Xcode
Why not Clean Build Folder
CMD+B
success!! mv ~/Library/Developer/Xcode/DerivedData ~ && rm -rf ~/DerivedData &
And I use it constantly. This approach is fast because it does the actual rm in the background so I can relaunch Xcode right away.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...
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.
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.
Unfortunately I don't think XCode is built to handle third party vendors plugins and it never will (which is why Appcode exists in the first place).
A stand-alone IDE like AppCode is the way forward, JetBrains usually take a while to get their new IDE's up to speed and catch up with the latest language & platform features, but afterwards is able to add a tonne of smarts and maintain feature parity fairly quickly as they've done with Rider which offers a much nicer & faster UX than VS.NET/R#.
Then XcodeGhost happened. They try to replace it with Xcode Source Editor Extension but that one is just not as good as Alcatraz
But AppCode's navigation and refactoring capabilities are much better.
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.
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.
It is a completely new paradigm, that’s it. Implementation details are just that.
https://stackoverflow.com/questions/64049757/are-swiftui-com...
[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.
I'm too cheap, and rather than bite the bullet and spend money on a good mobile team, I'd rather have one guy do it all in React Native! His quality of life be damned!
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.
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.