StoreKit 2 - AppTransaction.originalAppVersion confusion

I've watched some of the WWDC session videos about this topic and read the documentation and header files, but it is still confusing...

Because I change the pricing model of my iOS App (it was a paid App and now it will be a free App with an In-App purchase), I want to check if a user of my App purchased the App in the past. So user who have already paid in the past will get the full access without the need to pay the IAP, while new users would have to do this.

In one of the WWDC videos exactly this topic was covered and the solution would be to check out AppTransaction.originalAppVersion. This would be a simple and easy solution...

...Unless I read the information from the header file and documentation for this API. Here it says:

The string value contains the original value of the CFBundleShortVersionString for apps running in macOS, and the original value of the CFBundleVersion for apps running on all other platforms.

The problem here is that when I check the Info.plist of iOS Apps, the CFBundleShortVersionString is used for the main App version and CFBundleVersion is used for the "build" number. According to the cited documentation from above, AppTransaction.originalAppVersion would be totally uselesss on the iOS platform, because it would only return the build number and not the version number.

So I'm confused. Can I use AppTransaction.originalAppVersion to get the original version that was purchased for iOS Apps? If yes, the documentation must be wrong and misleading. If no, how can I do this?

I'm currently in testing and I only get "1.0" as originalAppVersion within the beta release. This could be either because I really only get the useless build number, or I get the "real" version because the App is on the device since version "1.0" on my device, or it is just a limitation of XCode while testing that it is returning version "1.0" but would return the correct version when the App was installed from the AppStore....

Can someone bring some light into this topic? Am I missing something or did I understand something wrong?

in testing and I only get "1.0" as originalAppVersion within the beta release

Development versions always report 1.0.

In production it does report whatever is in CFBundleVersion. For my apps, in the past that was set manually to 1.2.345667. Now I think it automatically gets set to just the 34567 part.

All you really need to know is whether the version is “new” or not. So if your first free version is 2.0 build 1234567, then check for anything that contains “2.0” or “1234567”, and consider everything else “old”.

I'm having the exact same issue. Did you ever find a working solution?

StoreKit 2 - AppTransaction.originalAppVersion confusion
 
 
Q