Esri / data-collection-ios

Mobile data collection app using the iOS Runtime SDK.
https://developers.arcgis.com/
Apache License 2.0
25 stars 26 forks source link

Swift 5 non exhaustive enums #201

Closed esreli closed 5 years ago

esreli commented 5 years ago

Updating app for Swift 5 SE-0192.

According to the migration guide:

n Swift 5 mode, switches over enums, declared in Objective-C or coming from system frameworks, are required to handle “unknown cases”, i.e. cases that might be added in the future, or that may be defined “privately” in an Objective-C implementation file. (Formally, Objective-C allows storing any value in an enum as long as it fits in the underlying type.) These “unknown cases” can be handled by using the new @unknown defaultcase, which still provides warnings if any known cases are omitted from the switch. They can also be handled using a normal default.