You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good point. These messages are displayed by the SumUp app indeed. We've thus added the error per the NSUnderlyingErrorKey, which is the "recommended standard way to embed NSErrors from underlying calls". However we missed to populate the localized.... properties of the error in a standard way in the SDK.
We will try to add them in a future SDK version, most likely as NSLocalizedDescriptionKey.
Yes, I got the underlying error using that key. However, depending on your debug schema (or Xcode bugs), sometimes the underlying error is unaccessible through lldb and NSError's NSUnderlyingErrorKey.
For future reference, I got the message using the following code:
As per https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/index.html#//apple_ref/occ/cl/NSError,
NSError
has a default way to handle application errors with localized description keys. However, when performing a checkout withcheckoutWithRequest:fromViewController:completion:
that causes an error,localizedFailureReason
,localizedRecoverySuggestion
andlocalizedRecoveryOptions
returnnil
.Inside the error's
userInfo
there is useful information, this is the console output of apo [error userInfo]
lldb command.It's a bit tricky to access to the
message
key, which contains relevant localized information about the error.Populating the localized keys with the info of the underlying error would be very helpful.
The text was updated successfully, but these errors were encountered: