Closed esreli closed 3 years ago
@philium At first glance I thought the same you did in this suggestion. Believe it or not, adherence to LocalizedError
requires errorDescription
to be declared as optional. Without doing so, a generic localized description is derived, ignoring the computed localized description i've submit in this PR. Here's how specifying the computed value as String
vs String?
fares when shown in an alert:
var errorDescription: String? | var errorDescription: String |
---|---|
I'll leave as is and will keep this requirement bookmarked- because i'll need to update other errors that conform to LocalizedError
.
That is fascinating! That must be due to the default implementations provided. Normally it wouldn't be a problem to supply a non-optional property to satisfy the requirement for an optional one.
https://github.com/Esri/data-collection-ios/pull/263#issuecomment-733399131 It is! I had operated under the same assumption and it took me some time to debug because it didn't cross my mind that the optional was strictly required. Though it is nice a default implementation is provided.
@mhdostal @philium The old AppError
design pattern is now removed from the app. This PR is ready for review. @philium thank you for all of your help thus far!
This PR is attempting to:
AppError
protocol, a contrived NSError derived protocol that makes too many assumptions on what the end developer need from itNote, i'm not sure how the removal of
LastSyncMobileMapPackage.swift
from the build phase occurred, my best guess is that it is a legacy token left behind by a previous improper Xcode removal and that Xcode is attempting to self-correct.