Will we still be able to use storyboard in the new swift update?
@SwiftBirdДень тому
Of course!
@selvarajant10 днів тому
Excellent video, bro! I just have a question: With macros, is it possible to attach additional event handler to a button? For instance, can you add an extra tapGesture() for each button in the view? I'm considering adding analytics code automatically to every button in a SwiftUI view.
@SwiftBird9 днів тому
Thanks! What you want isn’t gonna be very easy because of two things. First, macros can’t change the existing code, so it’s not like you can swap the button’s action closure for the original action _plus your analytics code._ I thought of suggesting the good old property wrappers (which _can_ replace the original expressions), but then the second thing comes into play: SwiftUI buttons don’t expose their action closures. If this was a real task, not just an engineering exercise, I’d consider the least invasive approach: extending SwiftUI’s Button with an initializer which returns a normal Button, only with its handler updated to send the event. With something like init(_:event:action:), all you have to do is literally stick the event name in between the title and action.
@MirrorsEdgeGamer0119 днів тому
I am looking forward to type pack iteration in Swift 6.
@muncho404Місяць тому
Interesting case. Thanks.
@Urumasolo-y37Місяць тому
First like ,view, comment
@AswinPaul-gg2mzМісяць тому
Incredible explanation. Thank you so much.
@SwiftBirdМісяць тому
Glad it was helpful!
@aalecaarМісяць тому
Amazing! Thank you. You definitely deserve more views. Keep it up!
@SwiftBirdМісяць тому
Will do! Thanks!
@lukaszstocki6998Місяць тому
Even more cool stuff happens when a struct has a property which is a reference :) Great channel!
@antohasmirnovМісяць тому
So much better than lots of medium articles, precisely explained!
@SwiftBirdМісяць тому
Thanks! 🙌🏻 Actually, I often use the very same Medium posts for my research, adding just a couple things on top. I do some extra fact-checking (and even after that I don’t expect anyone to just trust my word, hence the links in the description). I try to present the data in a more visual format (although I still don’t have enough time to implement _all_ of my ideas). And then, I wrap everything in a cohesive narrative. The last part is probably the most important ingredient because (for me, at least) seeing the connections and big picture makes understanding stuff much easier (e.g. weak refs have certain properties for which the side table is needed, and the way the side table works calls for certain object-lifecycle steps). Like, everything affects everything, and I’m trying to untangle those connections 😄
@Moch117Місяць тому
Keep it up! Love your videos
@SwiftBirdМісяць тому
Thank you so much 😍
@davealma88Місяць тому
Talk about Swift, count me in
@ryansobolМісяць тому
Thanks for the simple and clear explanations!
@SwiftBirdМісяць тому
Glad it was helpful!
@XaxxusМісяць тому
We have had tons of build system crashes on Xcode 15.3. We had to downgrade back to 15.2. Also strict concurrency checking has yielded hundreds of errors and thousands of warnings. Not even sure how we’re going to do the swift 6 migration in our codebase. Apple seems to have blindly slapped @MainActor on every single UIkit construct. Regardless if it’s a simple struct that should be sendable, or a class with mutable state.
@SwiftBirdМісяць тому
Crashes of the build system itself? 🤔 Personally, one (big) issue I noticed after all the releases (and the video) is, Apple seems to have tweaked some checks on the App Store back end. I used to build my app with beta and RC versions of Xcode for the past few months, and they worked just fine in TestFlight. But a couple weeks ago, when I uploaded a fresh build created in the same environment, with very few changes in the project, that build was “processing” in ASC for, like, 12 hours-and then failed to deploy. Apple even reached out to me and showed some errors I’d never seen before: apparently, at least one Firebase component was “not a proper framework bundle.” I wouldn’t be surprised if that was the first time they saw this themselves. The funny thing is, I tried rebuilding and redeploying a commit that succeeded before, and got the same problem with infinite processing. Speaking of concurrency, I also noticed quite a few changes in the strict mode, but that project was small enough for me to fix them (except now I can’t go back to 15.2). So yeah, Xcode 15.3 does have its fair share of problems, after all 😵💫
@Arlen277Місяць тому
@swiftbird so would you recommend downgrading to 15.2 then going back to 15.3 once they have addressed the bugs. Even when I start a new project the default “Hello World!” View will not preview or simulate
@SwiftBirdМісяць тому
I think it could be something different in your case 🤔 Most of the issues I had were caused by third-party frameworks (e.g. Firebase) or App Store checks-neither are part of Xcode itself. Missing previews in SwiftUI happen from time to time, except they’re not really missing-it’s just the preview pane (“canvas”) decided to not show for some reason (but it can be re-enabled in editor options).
@casperes09122 місяці тому
Ha. We use Kotlin Multiplatform at work. Shared library with native swift and kotlin on top. It has issues but it can work
@SwiftBirdМісяць тому
I guess KMM’s come a long way in the couple years I didn’t touch it! What do you think of debugging when it comes to the Swift / Kotlin joint? Back in 2021 everything felt very fragile, which only added to the confusion 😵💫
@ngtamphuong2 місяці тому
- Smaller: Yes, because everyone downloads Xcode mostly to develop for macOS, so just remove the iOS SDK from Xcode and advertise it as an improvement. - New super fast linker: Wonderful. With the new linker you can now use "-Wl -ld_classic" flags to build using the old linker because not every C/C++ library out there is supported by the new one. - Because every developer has an internet connection, Apple now disables the option to debug via cable without the internet. The new linker is blazing fast, so the new over-wifi debugger will make your experience more balanced, by making it terribly slow. - Swift & Swift UI: Really? You care for this fucking ugly language that changes in every release and forces developers to modify their huge codebase in order to build? Apple, if you're reading this you're treating your developers like shit.
@Vigotskij2 місяці тому
Good report! Thanks!
@axelcrkv2 місяці тому
Thanks Yacov!!
@guycohen19582 місяці тому
More of this content ❤
@MrRipman2 місяці тому
I also wish for a native framework for server development from Apple. That being said, I really like using Vapor, which is a 3rd party framework.
@Art-is-craft2 місяці тому
It is not apples wheel house so cannot see it happen. I suppose individuals or groups are free to develop their own service platform to use Swift.
@lisa-ann62172 місяці тому
Really appreciate your work on teaching pure swift concepts ❤ I think you should do a video on the swift-c++ interop please
@SwiftBird2 місяці тому
Thank you! 🥹 I guess I’ll add a C++ interop section in an episode on using Swift outside Apple platforms. TBH, I’m hesitant to do a separate video about C++ because I wouldn’t call myself an expert here.
@Vigotskij2 місяці тому
Interesting video! Keep the good work!
@SwiftBird2 місяці тому
Thank you!
@user-md2hb6zc2q2 місяці тому
This video is a must indeed! The most condensed and almost clear info I've ever encountered.
@user-md2hb6zc2q2 місяці тому
Why does an object still remain in memory when in deinited state? From my understanding ARC proxies all the access operations and the only thing it has to deal with to raise exceptions (unowned) or return nil (weak) is a side table.
@SwiftBird2 місяці тому
Hi! While the side table keeps track of the all three counts, it acts as a proxy _only_ for weak references. Unowned refs point directly to the object, not the side table. So as long as you have unowned references, you also need to have _something_ at their memory address.
@user-md2hb6zc2q2 місяці тому
The background does make sense! It turns out being relaxing :) The only question that popped up in my mind is that some parts of implementation details of ARC remain uncovered. How does ARC runtime actually operate? What is the moment when it finally decides to free up the memory (when release turns counter into 0 or when a special moment comes out)? Likely, it's covered somehow in advanced video but I can't recall you mention it here whereas it's a useful chunk of info for tech interviews. I got asked about it many times throughout my career. All in all, a video is must. Reminds me Sean Allen workings in a good way. Thanks!
@SwiftBird2 місяці тому
Thank you! You raised a good point! Though very rarely, I certainly did receive questions about this “when _exactly_ is memory deallocated (immediately, on the next run-loop iteration, etc.)” thing. But TBH, I hate those nitpicky questions designed to trip you, because job interviews are not theory exams. While I can answer many questions like this, in response I normally ask when was the last time this info helped with a real task. And then I’m shamelessly relishing the look on their face and dead silence 🥲 On this channel, I’m trying to paint the coherent picture one can easily wrap their head around, not make a cheat sheet one has to simply remember 🙌🏻 Your point doesn’t become any less valid, though. I decided to omit this aspect from the _memory-management_ episodes because for something needed as rarely, I didn’t want to introduce the whole concept of the run loop. But I’ll definitely cover this aspect in the run-loop episode!
@Amzdgg2 місяці тому
For ai copilot I am using ollama with huggingface/llm.nvim plugin and it works fine for swift. The main problem I face when using swift for linux scripts is that you HAVE to use SPM to import dependencies, there is no way to just import other libraries without it afaik, which is way over-complicating a simple single file script.
@SwiftBird2 місяці тому
Thanks for the tip! 🔥 I heard about some AI tools for Swift, but so far they’ve seemed more like a proof of concept. As for the dependencies, I _think_ you can link them via command line when building, but to me it feels more cumbersome than having a Package file 🤔
@user-zp9gd6cc7q2 місяці тому
💖
@marcin33562 місяці тому
Wspaniale przekazana wiedza! Twórz więcej!
@SwiftBird2 місяці тому
Dziękuję!
@akbar.n3 місяці тому
Amazingly awesome. I am also a cafine used since a decade. Love to see the complete video. This was your story. Your educational skill about swift is must better than any one out there on youtube. You should tech few concept or projects. That would be much better for new developers.
@SwiftBird3 місяці тому
Thank you so much!
@russellarcher97713 місяці тому
Great video! I've been considering using Xcode cloud and you really summarize the pros and cons very well - thanks!
@SwiftBird3 місяці тому
I’m glad it was helpful!
@AnnasVirtual3 місяці тому
you look like dantdm
@SwiftBird3 місяці тому
Interesting comparison, thanks!
@user-ve7eo8ju4e3 місяці тому
nice video.
@SwiftBird3 місяці тому
Thanks!
@akbar.n3 місяці тому
Excelent.
@remcogreve79824 місяці тому
Swift would also be nice for cross platform game development. Server and web development is a bit overcrowded and very boring at this stage.
@SwiftBird4 місяці тому
Totally agree with your point on game development! And I guess last year’s update that added explicit lifetime management could reduce ARC overhead and make Swift even more appealing for high-performance tasks. But my take on server and web development is slightly different. It’s overcrowded, true, but Swift doesn’t really need to defeat others to succeed. Things like WebAssembly are supposed to make the web and back end language-agnostic so what you use depends entirely on what you _want_ to use. The only problem with Swift is that its back-end community hasn’t yet reached the point of sustainability, where great projects attract new members who create even more great projects. Sort of a chicken-or-egg problem.
@shakyadissanayaka4 місяці тому
👍🏻❤️
@mohamedyusuf60624 місяці тому
Hey, are all previous swift features lost where produce new once. thank you.
@SwiftBird4 місяці тому
Hi! No, of course not. Minor Swift versions (5.8, 5.9, etc.) don’t remove any previously-added features, though they can change the way those features work. But normally, you can use everything from every previous release.
@GA_games214 місяці тому
Could you speak slower please?
@SwiftBird4 місяці тому
Sure! I sped up this clip so it fits UKposts’s one-minute limit. The full video (ukposts.info/have/v-deo/jZaniox7eYGBs6c.html) is much slower 🙌🏻
@Manu_codes4 місяці тому
Really loved the video. Hope to see you making more contents in the future.❤
@SwiftBird4 місяці тому
Thank you! 😍
@0xff0xff0xff4 місяці тому
Great content, thanks. I really hope your channel takes off, you have some of the best Swift explanations
@SwiftBird4 місяці тому
Thank you for the kind words! ✨
@roffia4 місяці тому
Thank you!
@san.dehesa5 місяців тому
Very nice and useful video. Thank you for making it!
@SwiftBird5 місяців тому
Thank *you* for watching 😄
@austinsiu23515 місяців тому
Swift has a beginner friendly learning curve, but the curve extends infinitely just to learn all the features
@SwiftBird5 місяців тому
You’re right! But also, you don’t need to know *every* feature to be proficient. I like Swift because you can learn new tricks (and forget the old ones) as your tasks change-and still feel confident regardless. For example, I learned about the for-case-let-in loops just a week ago, and though they look clever and make the code shorter (e.g. you can run the loop’s body on just the non-optional elements), they’re such a nuanced feature it’s not worth the cognitive burden, IMO. I was totally fine not knowing about them for the past six years 😅
@encapsulatio5 місяців тому
Does Swift work on Linux and Windows just as well as on Mac when it comes to developer experience? What about developing apps that work on Android? Can you make a in depth episode where you go really in depth on cross platform development in Swift and also cross platform compilation of Swift software? Thank you!
@SwiftBird5 місяців тому
Hi! Thanks for your questions! TBH, working with Swift just doesn’t feel right with no Xcode. The standard library, (most) open-source packages, and even (some) autocompletion work on every platform (I’ve used them to write unit tests on Ubuntu). Cross-compilation is no big deal, too. But even on the Mac, VS Code and the command line are much less enjoyable than a proper IDE. I’m a big proponent of adopting Swift outside Apple platforms (especially on the server), but the poor dev experience really slows down the progress. I’ve got something in the works about cross-platform development, but I want to show a real thing, because otherwise it would just be my scripting video (ukposts.info/have/v-deo/j3mZlZCkkZ92pps.html) plus “and here’s how you pack this useless 1 + 1 function into a fat binary” 😅 I guess this project’s gonna take some time to finish, but it’s still one of my priorities for the channel 🤞🏻
@encapsulatio5 місяців тому
@@SwiftBird Thanks. To me Swift is in the sweet spot in the sense it has good defaults, modern features, has a mission to get better and better c++ interoperability and even gives you most of the Rust features but without being forced to use a borrow checker when I don't actually need. I just don't want to be forced into using a Mac to develop software and that is a big show stopper. I subscribed, hope you can make a fair assessment on how is cross platform development going to work...especially the Android compatibility and if I can make apps on Android without too many hassles and how good is multiplatform development compared to Kotlin Multiplatform? The only other ergonomic candidates besides Swift are Nim and Odin, but I would prefer Swift in the sense that it has way more developers and libraries already developed in it's ecosystem. In the perfect world Nim would win but the tooling and available libraries for it right now does not make it a good candidate even if I think the language is better in itself than everything else I've tried.
@mateuszpusiewicz88515 місяців тому
amazing video! very nice that you gave us some examples how they can be used in real world scenarios. Keep up great work! :)
@MirrorsEdgeGamer015 місяців тому
I had fun implementing some of them myself; this helps me understand how it all works.
@SwiftBird5 місяців тому
Thank you! 🙌🏻 I would’ve loved to say it’s just because I believe tech is only valuable when it helps with real tasks (and I do believe that)-but the truth is, I just don’t have much time to make garbage demos which I can’t reuse in my work 😅
@MirrorsEdgeGamer015 місяців тому
@@SwiftBird, I agree entirely. Real-world examples are the best, as they can help you understand more clearly how an API works.
@book62025 місяців тому
Sure, swift compiler
@user29a5 місяців тому
Thanks for this video, so many changes it's nice to have a little digest like this. If I might make a suggestion, when showing code changes like around 2:28 in this video, it would be so much more natural to animate commenting out the old code and putting the new code beneath it. I ended up scrubbing the video back and forth a little to see the change instead
@SwiftBird5 місяців тому
Good point. Thanks for the suggestion!
@jkeee5 місяців тому
Thank you for the videos man
@SwiftBird5 місяців тому
Thank you for watching them! 🙌🏻
@larryburris67615 місяців тому
I'm enjoying the videos but I have a suggestion to make them even better. The graphics that are displayed during the video are presented and removed so quickly that it is hard to grasp what is actually being displayed. Would it be possible to leave the graphics up longer while talking about them? It would really help!
@SwiftBird5 місяців тому
Sounds legit. I’ll keep an eye on those things in future videos. Thanks for the feedback!
@kosnowman6 місяців тому
thanks for running the channel great quality!
@SwiftBird6 місяців тому
Wow! Thank you 🙌🏻
@vasilyrodionovich58066 місяців тому
for sure we want an in-depth video about the Swift compiler! great job Swift Bird.