AppForce1: news and info for iOS app developers

So it is lockdown again... lots of adjusting and finding a new groove, yet again…

December 21, 2021 Jeroen Leenarts Episode 60
AppForce1: news and info for iOS app developers
So it is lockdown again... lots of adjusting and finding a new groove, yet again…
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 sixth episode of my podcast. My name is Jeroen Leenarts. And I've been developing software for over 90 years, developing iOS apps for over nine years and number new Dutch focus for over eight years. If you're an iOS app developer, you should listen to my podcast because we'll keep you updated on interesting articles, conferences and events you might not have heard about. In this episode, I'm going to talk about how to change your image color in Swift attempting sonar cube analysis on Xcode cloud sorting data with key path comparator, loading images on iOS 15. Using at scene storage with AD fetch requests, Apple's use of Swift and swift UI in iOS 15. And of course, daanish, Monday monetary. So let's get started. It's an interesting time here in the Netherlands. Last weekend, we went to significant lockdown, only essential stores are open. So we'll be home with my family for at least a couple of weeks, until January 15, actually, so that's almost four weeks from now. No Christmas dinners, no Christmas, anything really, except things you can do with your own household. So yeah, that's, that's a bit of a bummer to say the least. So next week, I'll the off from work, I'll be taking some out of office time really thinking and considering my options there. My main focus is to make sure that my kids have somewhat of a normal existence. So they can just have fun be kids enjoy themselves, which takes some more effort from me, my wife, because especially my oldest, she's very much aware of what's happening here right now. And she's significantly bummed out by everything, because she wants going to school. And she's really enjoying that. And she's really feeling the effects of not being able to lose a lot of physical and mental energy. My youngest, on the other hand, he had his first trial runs at the primary school. And he was supposed to go to school this week, for real, like five days. But fortunately, it didn't really stick with him. So in his mind, he's now just having a vacation with the sister of three weeks, maybe four. And then after that, he will be going to school for real. So he has a much easier time. He's just enjoying himself with his sister presents so much all of the time. So yeah, we'll see how I'll be. I will be like a week from now. And then the week after, and then the week after. And yeah, my wife and I would just try to make sure that we keep spirits up and make sure that everybody is staying healthy. Especially my daughter gets plenty of exercise, lots of walks, just moving around getting out spending energy, really. So yeah, it's, as you can tell, it's it's a difficult and interesting time right now with with COVID in the Netherlands. On that note, let's switch to some other topics. So that's going to be the first article How to change your image color in Swift by Sharon. There are several ways to change the color of an image in iOS, and usually to change the color of an icon image to fit a theme or part of your app. Basically, this is an example of a concept called template rendering. So image rendering with a template rendering modes and tint color. What this allows you to do is to set your tint color to the opaque areas of your image to transparent areas, they will not be the tint color and every other pixel will be the 10th color you get like a sort of a template really off your original image. But there's also a second way that you can change the color of an image and despite tainting the UI image directly. If your app supports minimum version of iOS 13, you're in luck, because you can change the color of an image with just one line of code. So in iOS 13 UI image got two new instance methods that return a new version of the image with a tint color that you specify the only difference between these two methods in the first in the first one, you will return an image with a specified rendering mode, whereas the latter returns an image with the same rendering mode as the original image. So so these are the with tint color rendering modes and with 10th column functions. There's also a way that you can do the same effects pre iOS 13, but you then have to do the painting yourself. So you have to create a CG context and draw something there and make sure that you clean up everything correctly afterwards. So a lot of convenience has been added in iOS 13. And there are several ways that you can apply a template color or tint color to your image to make sure that you have like a theme, correct image in your app. The next article is by all of our bins. attempting sonar cube analysis on Xcode clouds, sonar cube can be a great tool for finding smells, bugs and duplications in your code. You can use combination of sonar cube and swift lens to enforce quality standards on a code base. So these tools can help you ensure developers always meet required standards in their code, and can reduce or even prevent the amount of bike shedding on your merch requests. So this article is about implementing sonar cube on a project they're using sonar clouds actually. And if you have an Open Source SDK, or an open source app, you can use sonar clouds for free, just check out the pricing page and see if there's any conditions that apply at your situation, or that prevent you from using solar cloud. What's really nice is to just have an experiment with this and see what solar clouds can do for you. Because from experience, I know that if you have sonar cube configured correctly, and there's a lot of benefits that you can, can gain from it, things like coverage reporting, complexity analysis, security issues that are scannable. And it can also provide feedback on those topics on your pull requests. So a lot of convenience, once you have it configured. It integrates with Fastlane if you want if you'd like. And yeah, I think it's a really powerful tool that you should check out and have a look at to see if this automatic analysis by sonar cube is something that can improve your code base. The next article is a short one by Thomas fatter, and it's called sorting data with key path comparator key with comparator was added to foundation in iOS 15 and Mac OS 12. The key path comparator is used by defining a key path which is used for fetching value for comparison, Felsher, then compare it with a sword comparator. And in the simplest form, we do not need to create the sword complex yourself. And this comparable complex is created automatically. But if the value is string, then string standard comparator localized standard is used instead of comparable comparator. That's a lot of comparator in just a short while. So head on over to the article by Thomas and see how you can use the key path comparator in your source code. It's it's basically an article with three bits of code in there and they just showcase how you can use the key path comparator in your code. And it's quite simple and straightforward, and it's a nice new small addition to iOS 15 and Mac OS 12. On pspdfkit.com, there's a nice article on loading images on iOS 15 Banish on the side iOS 15 added a few new API's for loading image from disk asynchronously and loading images from a remote URL. They're quite easy to use, and it's best to evaluate your code base to see whether or not these API's can be applied at some point in your code. Because a number of pain points that you've been dealing with pre iOS 15 have been addressed by these API's, the asynchronous image loading API can bring down the animation hitches and improve perceived performance async image must not be understated. It's a very powerful tool that you can use within swift UI and it makes image loading quite a breeze. So in the article, there's a number of examples on how you can actually download and decode an image on the fly on separate threads so that it doesn't block or hinder the rendering on your main threads. So smooth scrolling, no forms hitches. Just an easy way to get images off the network. Maybe they are cached already locally. So that save some bandwidth, and then get them on the UI. Keith Harrison at you should love has an article called using at scene starts with at fetch request. If you're having trouble using at scene storage to configure a corded at fetch request, this is what works for Keith. So there's a bit of code in his article, and he explains how he's been able to use the scene storage with the fetch request of core data. So the problem is that the since storage property rep restores the state of his search scope, but it's not triggered a correct initialized fetch request to update the list of countries to update the list of items, so this leaves him with an item list that doesn't match the restored search cup. The problem is that the onchange action is not triggered when the scene storage property wrapper initializes that means the predicate is not set correctly on the Fetch Request for restored search call. So he's doing some refactoring and making sure that his model aligns better with what swift UI expects. So a very worthwhile article to read because it can prevent you making the same mistake in the future. Other Sandro Colucci has an article called Apple's use of Swift and switch wine is 15. iOS 15 was released a few months ago in September 2000. That's one one. And in his article, Alexandria will analyze the built in apps of the system and he will look How many binaries are there actually are in iOS 15, which programming language they used to develop these apps. And how many apps are written with Swift. This is a good indicator to tell whether or not Apple has adopted swift UI for some of their built in apps. So their methodology and tools to create this article has been detailed in previous posts by Alexandra. And there's also these posts are also linked from his article. And what's most interesting is that there's 607 binaries using Swift and just 114 binaries using Swift UI. So there's some more details in there that's quite interesting to have a look at. But the most important number is that there's like very low swift UI adoption happening at Apple themselves. So I do wonder once they get to it, how these numbers will look like next year. And yeah, basically, we're now in a phase of stabilizing the Swift language, and seeing what kinds of things need to be refined to make sure that Swift is even more powerful than it is nowadays. Cool on the article that Alexandre has released is that, for some reason I was certain is quite sticky, it's hard to get rid of. And there must be reasons for that. And I think that is due to the fact that a lot of people are having an older phone and are not as quick to upgrade the phone if last year or the year before that model is still good enough. Now let's move on to Danny's Monday morning tweet. Leah Jun Dion has some internet issues. So hopefully that's sorted quickly. And Daniel Steinberg has been working with music kits on his radio app. So now it's time to step back and try to come up with his core data schema. And he mentioned that you'll probably use Danny's book to get back into some of the concepts. Stewart Lynch has just released a Swift package for Firebase authentication using email and sign in with Apple. It's also includes a password reset and covers delete user Firebase extension, video and documentation is available at the link that's been shared in the article. Philip Nemecek is doing some in the app catalog homepage design based on hints and concepts from Jory Bran. With more coming hopefully, next week. danesco is updating DOS mode to Swift why combine and making a Mac OS version at the same time. And here is working on a multi tool or utility app for Mac OS. It's made with 50 Wine advocate and it's called Fergus. Emilio is working on his weaken project. And it was a pure swift UI particle emitter using Timeline view and canvas. And he is signaling that it's working out really well for him. And he has also some source code available on GitHub. And then there's current Jackson planning on releasing a small updates a day for this tiny app, a video blog series is primarily for his own benefit, but maybe someone else can get something out of it as well. And kindred 98 is saying that he is learning Java. So I'm very curious what what this is about. But Kendrick mentioned that he has no clue at all how to work with Java. So there are still hope for him. janosch Huebner mentioned that he got the update out and he makes use of async await music chordates and has been rewritten from scratch. And it's an update on Music Day app. Flooded media just opened the Mapquest public better of task flow. And there was a lot of stuff to do. Multiple Windows support significant UI changes to make the app feel more at home on Mac OS. And finally, Marcus mentions that he released a new game today. And it's at Marcus holland.com/invasion. You can imagine what this game is about. And that's it for this week. So if you have any feedback or comments, contact me on Twitter at app Force One. And I'm still looking for guests for a podcast. So if you are you know somebody else who'd like to join the podcast, reach out, let me know. And I'm very happy to accommodate some more guests at this point in time. So yeah, that's now finally it. Talk to you again next week, and have fun and safe Christmas break. And next week, we'll probably talk a little bit more about what I ate during Christmas. Not going to be something super special but still, with the family will try and make something out of it. So it's a interesting situation. But we'll persevere and make sure that we have a fun time regardless. Talk to you again next week.