Optional Chaining in Swift and Why it is Important

Austin Beck
Jun 15 · 3 min read
Photo by Karine Avetisyan on Unsplash

When building out your application in Swift, a lot of developers may encounter runtime errors when building their application. A very common cause for runtime errors is that the value that is being requested is nil. This means that the application is requesting a value that does not exist. The compiler doesn’t know how to handle this case and therefore creates a runtime error, crashing your application.