AppForce1: news and info for iOS app developers

Happy Holidays

December 26, 2021 Jeroen Leenarts Episode 61
AppForce1: news and info for iOS app developers
Happy Holidays
AppForce1: news and info for iOS app developers +
Help us continue making great content for listeners everywhere.
Starting at $3/month
Support
Show Notes Transcript
Jeroen Leenarts:

Hi, and welcome to the 61st episode of my podcast. My name is Leenarts. And I've been developing software for over 19 years developing iOS apps for nine years and run that Koch has for over eight years. If you're an iOS app developer, you should listen to a podcast because it will keep you updated on interesting articles, conferences and events you might not have heard about. In this episode, I'm going to talk about building an asynchronous swift UI button, supporting async await as a module owner, unit testing UI view controller dismiss closure arguments in Swift. The fifth tip of today for Xcode. Also, there's a number of conferences happening, and so wants to mention those. The first one of those is iOS, comm SG, iOS, confess G is a remote conference happening in Singapore, it's going to happen on January 17, and 18th, with workshops, and on January the 20th, and 21st. For the conference days, if you haven't bought any tickets yet, you should definitely do so iOS conf.st, they have a great lineup already available. And you should definitely have a look at them. I think you'll like it. Second conference to keep an eye on they haven't announced the date yet, but I do know they're working on things is swift heroes, Swift heroes.com, just have a look at our website and keep an eye on on their social media to make sure that you don't miss it when they launch their call for papers. And when you can actually get tickets. Swift Heroes is a Italian based conference. It's happening in Turin. And I think this year, they will do an in person and online version of the conference. So that will be happening at the same time. So you can either go to Turin, or visit their online conference sometime soon. I think they're going to perform the conference somewhere in April or May. But just keep an eye on this one because this is an interesting one. And last year, you had an amazing lineup as well. So here's to have good luck with Corona and that they can actually execute on their plans for this year. So a big shout out to Swift arrows, and iOS confetti. The day I'm recording, this is actually Sunday. So that's the day after Christmas. And here in the Netherlands, we have something interesting. And that's what we call Second Christmas Day. So we have Christmas evening, Christmas Day. And then second Christmas Day. So three days of Christmas, which is fine. Lots of fun with the family I had over this weekend, and really enjoyed ourselves in the limited settings that we were able to, because we didn't have any family, visitors. We didn't go to any family. It's just the four of us and my mother in law and one friend that came over. So we really enjoyed ourselves. The kids enjoyed themselves. And yeah, now it's just getting ready for the new year. We're approaching New Year's Eve as well. That's the end of this week. But this means I do not have doughnuts Monday morning tweets, I'm just trying to rest up and do things that I enjoy. So often work, not doing much, really just eating, sleeping, and entertaining my kids and my wife, of course. So yeah, not much to share, really in that regard. It's It's just I really hope that this lockdown thing in the Netherlands goes to the right direction, because the numbers still are looking good. But who knows, because will we still need to get into the New Years, we still need to get in the new year. And I think in like, one week time I can, I can sign up for my booster shots for the vaccination. So looking forward to that one, even though I hate needles into the next year. And this is the the final normal episode of this year. So if you don't talk to me before this year is over, I hope you had a nice Christmas weekend and a happy new year for 2022. And I really look forward to hopefully seeing a lot of my listeners so that you in person on conferences across Europe and the world really, because I'm really working on getting myself out there at conferences through my day job, which is amazing. So let's just get to the content and and see where we'll end up. First article is by John sandal building an asynchronous swift UI button. When building modern applications, it's incredible common bow, it's incredibly common to want to trigger some form of asynchronous action in response to a UI event. For example, within the example codes that is based on switch wire with photoview, you're using a task to trigger an asynchronous on like action whenever the user taps diffuse button. So you have a few you tap a button. And then something asynchronous is about to happen. Thing is asynchronous code stuff was happening. Your user interface changes. So what happens which it's asking the context around that. So how should you deal with that? So in his article, John gives a nice overview of this challenge and how you can deal with this. Of course, there are multiple ways that you could implement or deal with such a situation. But the approach that John has taken is, again, one of his typical solutions, well thought through very sturdy and really something you could use in practice. So have a read of this article and see how you can respond to user interaction In an asynchronous fashion without crashing your app, the second article is by cheered in a train, supporting async await as a module owner. In his article, you can read what you can do to support async await in your module, keep it a minor release and support a variety of versions and platforms, all with a few simple steps. So this is an article that really delves into the recent release of Xcode 13.2, which gives backwards compatibility for async await on Swift code. So you can now support async await all the way back to Mac OS, Catalina 10, dot 15. And iOS 13 T vs 13. And watch was six or newer. So this support includes async await actors, global actors struct concurrency and task API, which is amazing because you can do a lot of things with these asynchronous constructs in Swift, and but having it in a backwards compatible way available to you. That's just amazing. So in this article, cheered delves into how you can actually use this async await supports on your SDKs or on your modules and make sure that it's backwards compatible to these older versions of the platforms that you can run this code on without pressing stuff, of course. So It delves into how you can update your public API, how you can make sure that things work as you are intending them to to work, how it's understandable to your end users and how you can use conditional compilation to make sure that your backwards compatibility is in order. And that you can use these new features as much as your own benefit as possible. So as a module owner, you can see in his article that it's quite painless to support both async and regular versions of the same asynchronous code. And it goes a long way to keep a module stable so that you give others the time to update your module to the latest version. So by using the tips that Chet suggests, you can catch a module in existing code base and provide a path to the users of your module to gradually update to this newer API with async await. Keep in mind that you want to replace completion blocks with async await. Even internally, you can support older versions before iOS 13 is such anymore. The next article by Leonardo Maya Pergolesi, is called unit testing UI view controller dismiss closure arguments in Swift. So in this article, Leo will attack some tricky unit testing code. First, he will talk about unit testing the UI view controller with unit tests, but he really wants to test everything like literally everything. He thinks you should have unit tests for everything, every little piece of code you write should be automatically tested. He knows that you have to get constraints in your day to day life. So testing 100% of things is almost impossible. This is something that he wants to fight against. In this article, he attacks one of those things, that can be a very tricky thing to test this misbehavior of a UEFI controller. And to be fair, it's only important if you need to trigger some action after this dismiss or checking something. Because if not, you're just testing UI Kits itself. So do not worry about the details in his article, he will have you end up with a project on GitHub that you can use and see how you can test your UI view controller this misbehavior. And yeah, it's a very thorough article again, by by Leonardo. And yeah, it's just something that you should read. And you can learn something on testing those, like hard to reach spots within your code. And maybe in a case in the future that you want to test something but you don't know specifically how maybe this article can give you some tools to get to the bits that you want to test. So nice one by Leonardo again. So the final article of this week is by Chris Wu, the VIM Tip of the day for X codes, I just really liked the the artwork that is in this, this article, you should definitely just follow this artwork already have a look at this at this post and definitely check out Ltd DFS for the developer related comics that he creates. So um, so Chris Wu, he's a huge fan of him and X goats. Maybe you've heard has something that's called vim support. So you can enable some mode within Xcode that it behaves in some ways to fame. If you don't know what famous this is probably something you don't want to try. Because the joke with fame is always how do you quit it? Well by turning off your computer, right? But yeah, if fame is something that you really enjoy using, and you want more of this keyboard only behavior within Xcode when you're editing your code. Just have a look at this article by Chris Will. And yeah, maybe you'll just think it's a good idea. There's some fun things in there. And even if that's not something for you, you can learn about him a little bit, which is something that's fairly relevant to our history as software developers. So just for that, it's already worth checking out this article. So not to gank you away from your day to day life any longer. This is the end of my A podcast episode for this episode. And actually also for this year, I hope to talk to you again in the new year. And I hope you keep on listening. And if there's any feedback, tips, suggestions, ideas, just let me know, at app force one controller, I always look forward to your feedback ideas and anything that you'd like to share about the content that I'm creating. And yeah, who knows, maybe we'll meet again in person in 2022. I'm really thankful for all my listeners, and the things that podcasting actually gave me in this year. So here's to many more years of podcasting, and many more years of listening for you. And very, very happy 2022 and stay safe, stay healthy, and keep on listening. Have a great one, everybody.