Book Image

Mastering iOS 12 Programming - Third Edition

By : Donny Wals
Book Image

Mastering iOS 12 Programming - Third Edition

By: Donny Wals

Overview of this book

The iOS development environment has significantly matured, and with Apple users spending more money in the App Store, there are plenty of development opportunities for professional iOS developers. However, the journey to mastering iOS development and the new features of iOS 12 is not straightforward. This book will help you make that transition smoothly and easily. With the help of Swift 4.2, you’ll not only learn how to program for iOS 12, but also how to write efficient, readable, and maintainable Swift code that maintains industry best practices. Mastering iOS 12 Programming will help you build real-world applications and reflect the real-world development flow. You will also find a mix of thorough background information and practical examples, teaching you how to start implementing your newly gained knowledge. By the end of this book, you will have got to grips with building iOS applications that harness advanced techniques and make best use of the latest and greatest features available in iOS 12.
Table of Contents (35 chapters)
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
Index

Chapter 24. Discovering Bottlenecks with Instruments

To properly debug and improve your apps, you need to understand what tools are available to you. One of the tools Apple ships as part of Xcode is called Instruments. Instruments contains a collection of measurement tools that help you to profile and analyze your app to debug and detect complex problems or performance bottlenecks. For example, Instruments can help you figure out whether your app is suffering from memory leaks. Tracking a memory leak without the right tools is tedious and nearly impossible. A tool such as Instruments can help you track down several possible causes for a memory leak, which can save you a lot of time.

In this chapter, we're going to look at an app named Mosaic. This app is a straightforward app that was built to demonstrate how you can profile your app. The app is very slow; the longer it's used and the more the user interacts with the app, the slower the app becomes. You will learn how you can use Instruments...