Thanks for this - the example is perfect.
Is there a reliable way to test this? I'm trying both Xcode and Sandbox with StoreKit. Using Xcode StoreKit testing I get the current version of my app back (the one I'm building and testing), which doesn't help. Is there a way to inject something into a test environment to simulate a pre-existing user?
Post
Replies
Boosts
Views
Activity
Thanks for replying. I'll give that a go. I omitted to mention I'm developing a Mac app, but your suggestion sounds good.
I had looked at transaction.offer.paymentMode == freeTrial and assumed that it was indicating the subscription contained an offer as part of it, rather than indicating the trial is active.
It would help if the documentation actually said these things :)
Thanks again.
The upgrade notifications seem to vary. Sometimes I get the correct ones, sometimes not. Sometimes one, sometimes two. The two are sometimes the same, sometimes not. Very inconsistent. Pretty tricky to use them to make any reliable decisions in code.
Same problem in July 24.
After several weeks of trying to bully the Storekit/Xcode Testing/Sandbox debacle to do something meaningful for a Mac app, I've come to the conclusion that Apple really don't care about Mac apps at all. The stuff just DOESN'T work in any predictable or reliable way on the Mac. The documentation is pretty useless, and virtually everything in the WWDC videos is targeted at iOS.
Please see post following this
Same. Please let us know.