One Early Return Turned My 14-Day Trial Into a Free Licence
Go and look at what your entitlement code does when the store is unreachable. Not what it is supposed to do. What the error branch actually does, line by line.
I did that on 11 August because a different app of mine had a suspicious symptom, and I found that Fingertips, the app I am building for Shipaton, had a worse version of it. A 14-day trial that never expired. Not "expired late". Never. Launch once without a network, and the app was unlocked forever.
It was not a subtle bug once I saw it. It was four lines, and every one of them was written on purpose.
The policy that caused it is the correct policy
Here is the state, and I still think this enum is right:
enum State: Equatable { case unknown case trial(daysLeft: Int) case expired case purchased var isUnlocked: Bool { switch self { case...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE