title: Analytics reporting in-app purchases but purchases don't show in Apple's reports
body: <p>I recently launched an iPhone app that includes in-app purchases (IAPs) in the App Store.  The app and the associated IAPs were approved and cleared for sale by Apple.  The app is being downloaded and everything seems to be working as expected.</p>
  
  <p>My analytics service is reporting IAP events taking place but only a very small percentage of the supposed purchases are showing up in my daily Apple sales reports.</p>
  
  <p>The purchase event is only fired from the method that handles the StoreKit callback for transaction updates:</p>
  
  <pre><code>- (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
  }
  </code></pre>
  
  <p>This is the only path that leads to the IAP event being logged with the analytics provider.</p>
  
  <p>The analytics service is reporting numerous purchase events, as well as other app events, which leads me to believe the analytics are (at least reasonably) correct.</p>
  
  <p>Apple's daily sales reports have reported only a fraction of the number of purchases reported by the analytics (about 10%).</p>
  
  <p>I've combed through the code, wiped a test device and retested everything there, and I can't find anything wrong with the app logic itself.</p>
  
  <p>One interesting observation is that most of the purchases reported by Apple seem to correlate to test purchases made by my team.  I can't be sure all of them do, but it does seem that purchases made by the dev team are recorded by both the analytics provider and Apple.  It seems that purchases made by users who have downloaded the app from the App Store are largely not being reported by Apple.  </p>
  
  <p>I've tried to verify all of the app setup/configuration details (provisioning profiles have IAP enabled, correct app ID being used, etc.) to ensure there is nothing different between the installs being used by the team and those being downloaded by our users.  </p>
  
  <p>I apologize for not having a lot of code to share, but this seems to be more of a configuration issue (?), either with the app setup in iTunes Connect or something I'm missing that distinguishes the installs/devices used by the dev team from those used by our users.</p>
  
  <p>Has anyone experienced something similar?  I'm stumped as to where to look next.  I've submitted a question to Apple via iTunes Connect "Contact Us" but wanted to reach out to the community as well.</p>
  
  <p>Any help would be appreciated!  Thanks!</p>