Transitioning a freemium app to StoreKit 2

I'm currently working on transitioning to StoreKit 2. In order to see if my users are legacy users who purchased the app before I implemented an in-app purchase, I am trying to use the original purchase date for the app. Unfortunately, it's returning 0 seconds since 1970.

    func updateOriginalPurchaseStatus() async throws {
        let transaction = try await checkVerified(AppTransaction.shared)
        self.originalPurchaseVersion = transaction.originalAppVersion
        self.originalPurchaseDate = transaction.originalPurchaseDate
    }

This is from the transaction:

      [3] = {
        key = "originalPurchaseDate"
        value = number (number = 0)
      }

Currently trying to figure out when I actually purchased the app, but it might be as early as 2012. And I likely used a download code.

Are you seeing this in development or in production?

Both development and production.

Actually, it turns out I had to remove the AppStore configuration from the build settings for it to talk to the production server. Problem solved!

Transitioning a freemium app to StoreKit 2
 
 
Q