benjaminmayo / merchantkit

A modern In-App Purchases management framework for iOS.
MIT License
1.11k stars 72 forks source link

Rejected by Apple #50

Closed denandreychuk closed 4 years ago

denandreychuk commented 4 years ago

Hi! I recently got rejected by Apple with this weird reason:

Guideline 2.1 - Performance - App Completeness

We found that your in-app purchase products exhibited one or more bugs when reviewed on iPhone running iOS 13.3 on Wi-Fi.

Next Steps

When validating receipts on your server, your server needs to be able to handle a production-signed app getting its receipts from Apple’s test environment. The recommended approach is for your production server to always validate receipts against the production App Store first. If validation fails with the error code "Sandbox receipt used in production," you should validate against the test environment instead.

Do you have any idea how to fix it?

My current version MerchantKit 0.13.0

denandreychuk commented 4 years ago

They attached screenshot, with alert caused by: productInterfaceControllerDidChangeFetchingState, .genericProblem

benjaminmayo commented 4 years ago

Was it reviewed on Friday by any chance? The App Store suffered a pretty bad outage, which affected receipt validation. That honestly sounds like what happened here.

denandreychuk commented 4 years ago

Unfortunately not. It was reviewed today.

benjaminmayo commented 4 years ago

What does your Merchant initialiser look like? Are you using the default configuration or something more complicated?

denandreychuk commented 4 years ago

I'm using default configuration.

Merchant(configuration: .default, delegate: self)

benjaminmayo commented 4 years ago

Hmm. With the default config, I can't think of anything obvious that would be MerchantKit's fault here. (Local validation certainly doesn't care about sandbox versus production receipts.) If this was my app, I'd probably try submitting as-is a second time to see if they flag it again or if it was a weird quirk.

denandreychuk commented 4 years ago

Got it, thanks. Appreciate your quick feedback! Will come back later, after Apple's review.

benjaminmayo commented 4 years ago

Regardless of your current situation, it would be helpful for MerchantKit to report a more detailed error than genericProblem. The error is created here; we could pass along the error rather than abstracting it away completely.

denandreychuk commented 4 years ago

Ye, sounds great.

Nomad00 commented 4 years ago

@denandreychuk I'm not saying this is definitely your issue, but I ran into a similar response and the only change I made was adding a check and alerting on SKPaymentQueue.canMakePayments prior to kicking off the purchase flow.

benjaminmayo commented 4 years ago

That check sounds like something I should add to MerchantKit itself.

denandreychuk commented 4 years ago

@benjaminmayo I successfully passed the review, so I believe that Apple was just retrograde those days :)

benjaminmayo commented 4 years ago

Good news :) and thanks to @Nomad00 for flagging the SKPaymentQueue.canMakePayments thing, I should accommodate that in the framework.