How to Cook Up a Deliciously Responsive iOS App: Apple’s Secret Recipe Revealed!

Gennadii Tsypenko
Just Eat Takeaway-tech
4 min readApr 19, 2023

--

mindmap for developers

What is this article?

It’s a tiny handbook of industry standards for building responsive apps recommended by Apple.

These are 4 different areas you should look into to make sure your app is up to the highest standards.

Each of these areas is a huge topic by itself, so feel free to Google, YouTube, or TikTok it. I have also included a generous amount of links, so you can dive deep.

Launch Time

Launch time is crucial because it significantly impacts user experience. A fast app launch time creates a positive first impression, encourages user engagement, and increases retention rates. As users are often impatient, a slow-loading app may lead them to abandon it in favor of more responsive alternatives.

Furthermore, Apple prioritizes apps with swift launch times in its App Store rankings, which can influence an app’s visibility and success.

Minimize usage of the main thread during launch, load later if possible, dispatch to a background thread, and make use of Swift Concurrency.

Here is what Apple suggests looking into regarding launch time:

Less Disc Writes

Reducing disk writes is essential as it optimises app performance and conserves device resources. Minimizing disk writes not only speeds up the app’s responsiveness but also prolongs the device’s battery life.

Consequently, apps with fewer disk writes contribute to a more seamless user experience, ultimately leading to increased user satisfaction and retention.

Some suggestions are:

Memory Use

Efficient memory usage is crucial when developing apps for iOS, as it has a direct impact on app performance, stability, and multitasking capabilities.

Properly managing memory involves implementing lazy loading, releasing unused objects, and avoiding memory leaks. By utilising tools like Xcode’s Memory Debugger and Instruments, we can identify and resolve memory-related issues, such as retain cycles or strong reference cycles, which lead to memory leaks.

An optimised app that effectively manages memory resources will be more responsive, less prone to crashes, and capable of running alongside other apps without hogging system resources. This contributes to a better user experience, resulting in higher App Store ratings, increased visibility, and greater user retention.

Consider:

  • Optimize image assets. Always use the assets catalogue.
  • Learn how to use the “Allocations” instrument
  • Use vector images when possible
  • Memory usage is affected by dimension, not the file size
  • Resize assets bundled with the app, resize images before caching, and specify the size to avoid full-size rendering
  • Memory leaks. Use debug memory graph to track down retained cycles and unused objects

Caching and State Restoration

Caching involves storing frequently accessed or computationally expensive data in memory to reduce redundant calculations, API calls or disk reads. Implementing caching using NSCache or custom caching solutions can significantly speed up app responsiveness and reduce network or storage usage, leading to better battery life and an overall smoother experience.

Remember to transform images to thumbnail size before caching. You don’t need to keep them in their original size.

State restoration, on the other hand, is the process of saving and restoring the user interface’s state when an app is terminated or moved to the background. We must provide a seamless user experience when multitasking or resuming apps after termination.

It also reduces the time required for an app to return to its previous state, allowing users to pick up where they left off and reducing the likelihood of data loss.

Remember, users do not understand all the processes that happen under the hood and they expect the app to be in the same state where they left off. So as developers, we must create the illusion that the app is always running.

Few suggestions from Apple:

I hope you enjoyed reading 📚

Want more? Here are some related topics:

--

--