Lazy load to launch fastiOS
I will discuss how to reduce your app launch time significantly and measurably using weakly linked frameworks that are loaded as needed using the low-level Apple dyld API rather than all at once. Many apps have dependencies that are not required on the very first UI that is presented, meaning it does not make sense to load them all at once before the main() loop has even started executing. This wholesale loading of dependencies often leads to slow launch times, which is undesired and can leave a negative impression for the user even before they start using the app. We have used this approach in the Scout24 iOS app, as many of our features are broken out into internal frameworks whose functionality is needed only when the user requests them.
I will explore the details of how to configure your build to package dependencies correctly, how to load frameworks in code at the right moment, and what the benefits are. I will walk the audience through a simple app created specifically for this purpose so that it is clear how this is done and so that the audience can download the code and see exactly how to apply it to their apps. I will share the benefit that it had on our production app that has many internal and external dependencies, and what the difficulties were in getting it to work with this kind of legacy app.
The code examples will be written in Swift.