Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Issue 45
Jan 19, 2021

Stay updated with the latest in Swift & SwiftUI

The 2nd largest newsletter in the Apple development community with 18,573 developers. Don't miss out – Join today:


Performance issues aren't fun, especially if they occur in a release you just did, and you won't notice until the release is live.

Every now and then, I like to share a story of my day to day job at WeTransfer. Many of you might be beginners and stories from "in the wild" will definitely help you grow your learnings.

Last week, we released 5.5.1: an update in which we moved to SPM and improved launch time performance. We did this by setting a batchSizeLimit to often performed fetch request in Core Data besides several other improvements. (read my tips on launch performance).

The mistake I made was only to look at the numbers. Our DYLD statistics showed an improvement and (too quick) testing didn't bring any performance issues. Our QA team did find the scrolling hitches but reported it as a "Severity 3" which at this point doesn't have priority in our roadmap.

Soon after the release, we got reports from our Support team telling us several users had performance issues. Some couldn't even open the app anymore! At this point, we stop all regular work and we jump on the hotfix train. After finding out the cause, we did the minimum thing to fix the issue and submitted a hotfix. Our app got rejected (bad timing, haha!) but luckily enough, we could ask Apple to release this as a bugfix.

Long story short; be conscious when improving performance. Even though a fetch batch size is often described as performance increasing it might result in decreases for your app. Create a release with the minimum required changes to lower the risk of introducing new bugs with your hotfix. Once the hotfix is live, you can start working on a proper fix.

Hopefully, this story was inspiring and educational. Let me know if you like it and I'll think about sharing more stories in the future.

Enjoy this week's SwiftLee Weekly!

THIS WEEK'S BLOG POST

Closures can be hard to understand when you're just getting started with Swift. Once you're more experienced there's still a lot of different syntax types you can omit which can lead to discussions within teams. Do you prefer a shorthand closure or not? And what about trailing closures?

SPONSORED

Would you describe yourself as knowledgable, but struggling when you have to come up with your own code? Fernando's ebook contains iOS rules you can immediately apply to your coding habits and dramatically improve, applied programming fundamentals seen in refactored code from published apps.

Try the book and fight your coder's block!

TWEET OF THE WEEK

You have to get used to this shortcut but once you do, I’m pretty sure you’ll find it useful. I’m so often scrolling to find my changes to adjust it again and this tip by Greg Heo definitely helps me to improve that workflow.

CURATED FROM THE COMMUNITY

CODE

It’s not often that I encounter blog posts about XCFrameworks. They’re a great addition and any resource helps us better understand what they are. Jon takes us through the past few years and how the framework arrived.
I bet many of us have written solutions ourselves to display units in a specific way. Toomas Vahter shows us how this can be done using the MeasurementFormatter which simplifies things by a lot.
This post by Stuart Breckenridge has been shared in several newsletters over the past week but I still find it useful to share this with you. It opened up my eyes as I’ve been looking for a solution to this problem for a while to work with Diagnostics. The solution is still not ideal and we should hope for better integration in standard APIs but it’s at least a solution to custom mail apps.

PRODUCTIVITY

“We are wasting 45 hours per week” is a great way to introduce an article, especially if you’re about to explain how to get rid of those 45 hours. Krzysztof Zabłocki explains how tools like SwiftLint and SwiftFormat can be used in a way it takes less time for engineers.

NEWS

Paul Hudson announced the nominations for this year’s Swift Community Awards and I’m incredibly proud to see RocketSim being nominated for Best Developer Tool! Votes are now open.

STORY

After reading this blogpost by Andy Ibanez I realise how lucky one can be to live in a country with good foundations. Andy lives in Bolivia and shares his experience of being an iOS developer in a 3rd world country.