Better Programming

Advice for programmers.

Follow publication

Member-only story

Avoiding “Massive AppDelegates” in iOS

Varga Zolt
Better Programming
Published in
4 min readJan 25, 2022

Photo by Cesar Carlevarino Aragon on Unsplash

Introduction

I was writing about how to organise your iOS project. And got many questions to elaborate on how to avoid having “Massive AppDelegate”.

If you have already worked on a couple of projects, you have a high chance that you have encountered the “Massive ViewController” issue.

To resolve this you can use extension to extract some logic, to use child view controller, or to use some architectural pattern like MVP, MVVM, VIPER, CleanVIP etc.

On the contrary, many organized projects still have huge AppDelegates. In this article, I will try to present my favorite solution for this problem.

The Problem

Almost all the online 3rd party SDK Integration tutorials show their basic implementation and how to initialize them — like Firebase, Realm, AppFlyer, Alamofire etc. You integrate them and initialize them in AppDelegate.

Then the Product Owner asks for new features based on the Push Notification, Location, CoreData, etc.

You add them also to AppDelegate. At this point AppDelegate application(_:didFinishLaunchingWithOptions:) already have a bunch of code that logically should have some separation. And this…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Varga Zolt
Varga Zolt

Written by Varga Zolt

 Mobile Tech Lead📱 🧑‍💻 Writing about new Technologies. Coding for fun since 2005, for food since 2008 🚀 Site: https://bit.ly/skyspiritlabs