Newsletter of AppForce1 - Issue #33
Next week it is time for Do iOS. Looking forward to it, when we started discussing running another Do iOS with the team at CocoaHeadsNL, we did not expect it to get the reception we had. Tickets were trickling out and all of a sudden everything was sold in just 2 days. It showed us we should get started earlier next year and go way bigger. But let us get through next week first and then look into if and what to do next year.
The beginning of November marks my working with Stream for a year. A pretty uneventful thing, but I am very happy to share I will be with Stream for at least another year. During my 1st year at Stream, I got two promotions even. But most important, my teams at Stream had a lot of fun while doing excellent work. With a big launch looming (more on that soon), I hope we will end the year 2022 with a huge bang.
Speaking about things to be happy about. I've been doing my podcast for over 2 years now. This week’s episode is recording 199 on my feed. Just doing the maths on this is kind of mind-boggling if you ask me. I am already looking at over 105 hours of spoken content I created in the last 2 years. I did not expect that when I got started. You might have noticed I slowed down a lot on the interview-style episodes, it has to do with time and planning. I want to be available for my family as well and I've noticed my podcast since it is not my income was just taking so much time away from my family life. Everything related to my podcast is stuff I do in my spare time, and spare time is a scarce resource.
Especially since my daughter was recently selected to get weekly training sessions in the talent program of the Dutch Gymnastics association. She now trains 5 times a week, and she's only 7. Crazy if I think about it, but also it is what she wants to do. My wife and I keep a close eye on Lisa's well-being. And if we would stop her from pursuing her gymnastics dream, that would not go over well with her. This does not mean she will become the next Dutch gymnastics champion, getting there is a long way to go. Her chances right now, maybe 1 percent? Probably a lot less.
I also moved my newsletter from Revue to SubStack. Let me know what you t think, I enabled the chat feature on SubStack, so we should be able to open up a conversation that way.
Just 2 more nights and Do iOS will start, already people are flying in and having a good time.
Best,
Jeroen
Sponsored by
Introducing Rollouts by Runway
Runway's Rollouts allows your team to easily keep tabs on release health in just one place instead of many, alerts you whenever configured metrics become unhealthy, and safeguards release health by automatically halting rollouts based on thresholds you define.
Rollouts by Runway: a single source of truth for release health, instantly understandable – and actionable
Released Content
Episode 95: Time constraints are big the last couple weeks
Latest News Episode Links
A menu bar only macOS app using AppKit
This week Pol has started a journey to develop and (maybe 😅) release his first ever macOS application. It will be a menu bar app, called Shush 🤫, which will allow users to mute all their computer's input devices using CoreAudio.
In the following sections, I will go through what my initial steps were to create a menu bar app with no dock icon, with code examples and the reasoning behind my decisions.
Note that there are other amazing resources on the topic such as Mohammad Azam's or Florian Schweizer's videos. I would recommend you go watch them as they do a great job of explaining how a macOS menu bar is set up. I thought I would still write my own article on the topic as a reference for my future self and because I have implemented things slightly differently by using entirely AppKit.
Danijela wrote about
How to check for network connection and present an alert in SwiftUI
Most apps use some type of networking in their code. Whether you're handling user accounts or fetching data from a remote server, you need to handle network connection issues gracefully. Not just making sure your app doesn't crash with a fatal error, but displaying a proper information back to the user.
To check for and react to any changes in network connectivity you can use the NWPathMonitor observer from the Network framework. You can initialize the path monitor with different properties, such as specifying the type of connection (wifi, cellular...) or whether it's restricted by low data. You can check the official documentation for more information.
Next up is Natasha with an interesting read about how to
Understanding different cache policies when working with URLRequest in Swift
When in comes to server communication in iOS, the system provides different caching strategies to improve performance and reduce network traffic.
By choosing a cache policy, we can decide whether the caching should depend on expiration dates or disabled entirely or whether the server should be contacted to determine if the content has changed since the last request.
Toomas writes about
Handling never finishing async functions in Swift package tests
Imagine, you are at your desk
Why does my CI never finish and post a message to the merge request? Logged in to CI and oh, my merge job had been running for 23 minutes already, although typically it finishes in 4 minutes. What was going on? Nothing else than on unit-test marked with async was still waiting for an async function to finish. So what can we to avoid this?
How to Get Push Notification while iOS App is in Foreground
Before iOS 10, if a notification arrived while an app was in the foreground, the system would silence that notification.
Apple thinks the default notification banner is redundant since a user is already in the app.
They want us to update our app's interface directly. For example, if a new message arrives, you need to update the badge count in your tab bar.
Since iOS 10, Apple has become less opinionated about this behavior and allows us to decide whether to
Silence the incoming notification (the same behavior as before iOS 10) or
Tell the system to continue to display the notification interface
Sarun explains how to do the second option, more in his article.