app-store-server-library-swift icon indicating copy to clipboard operation
app-store-server-library-swift copied to clipboard

Imple a sugar-coating method (try-await-catch) for the verify function that can throw VerificationError

Open shimastripe opened this issue 1 year ago • 0 comments

WHY

  • SignedDataVerifier's verify is very useful for easy data falsification verification.
    • However, VerificationError is not an Error, but only a data representation of Enum, so we have to switch must be made based on the results received.
  • I would like to be able to write this in a standard expression using Swift's try-await as well

WHAT

  • VerificationError conforms to Error
  • I implemented wrapper methods that converted an existing method to try-await syntax. This is done in this form for backward compatibility as well.

Sorry for the frequent PRs. If you have any reason not to want to make VerificationError an Error, please close this PR.

shimastripe avatar Mar 17 '24 07:03 shimastripe