Analytics reporting in-app purchases but purchase not showing up in Apple reports

I recently launched an iPhone app that includes in-app purchases (IAPs) on the App Store. The app and its associated IAPs have been approved and cleared for sale by Apple. The application loads, and everything works as expected.

My analytics service reports IAP events, but only a very small percentage of estimated purchases appear in my daily Apple sales reports.

A purchase event is fired only from a method that processes a StoreKit callback for transaction updates:

- (void) paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { case SKPaymentTransactionStatePurchased: [self completeTransaction:transaction]; break; ... } } } - (void) completeTransaction:(SKPaymentTransaction *)transaction { [MyAppDelegate completeIAPPurchase:productId]; } - (bool) completeIAPPurchase:(NSString *)productId { // log IAP here } 

This is the only way that the IAP event is logged by the analytics provider.

The analytics service reports numerous purchase events, as well as other application events, which makes me believe that the analytics (at least reasonably) is correct.

Apple’s daily sales reports reported only a fraction of the number of purchases reported by analytics (about 10%).

I combed the code, wiped the test device and tested everything there, and I can not find anything bad in the application logic itself.

One interesting observation is that most of the purchases reported by Apple seem to correlate with testing purchases made by my team. I can’t be sure what they all do, but it looks like the purchases made by the development team are recorded by both the analytics provider and Apple. It appears that purchases made by users who downloaded the app from the App Store are largely not reported to Apple.

I tried to check all the information on setting up / configuring the application (the provisioning profiles have IAP, the correct application identifier, etc.) to ensure that between the installations used by the team there is nothing else downloaded by our users.

I apologize for not having a lot of code to share, but it is rather a configuration problem (?), Either with installing the application in iTunes Connect, or something that I am missing that distinguishes the settings / devices used The development team of those used by our users.

Has anyone experienced something like this? I'm at a standstill, where to look further. I submitted a question to Apple via iTunes Connect "Contact Us", but also wanted to contact the community.

Any help would be appreciated! Thanks!

+6
source share

Source: https://habr.com/ru/post/910395/


All Articles