apple / app-store-server-library-swift

MIT License
225 stars 32 forks source link

appAppleId is required for verification in production environment but it's easy to miss #34

Closed shimastripe closed 8 months ago

shimastripe commented 8 months ago

WHY

// try! used for example purposes only
let verifier = try! SignedDataVerifier(rootCertificates: appleRootCAs, bundleId: bundleId, appAppleId: nil, environment: environment, enableOnlineChecks: enableOnlineChecks)

How

What do you think? I would be happy to receive your comments.

Thanks!

alexanderjordanbaker commented 8 months ago

@shimastripe That is a good suggestion, I will plan on

  1. Adding a comment to the READMEs
  2. Throwing an error in the constructor if appAppleId is null/nil/undefined and the environment is Production
shimastripe commented 8 months ago

Thanks @alexanderjordanbaker ! I create a PR https://github.com/apple/app-store-server-library-swift/pull/35 . Is this the way you would like to do it?

alexanderjordanbaker commented 8 months ago

Resolved in #35