github bizz84/SwiftyStoreKit 0.8.3
Add SubscriptionType to differentiate between auto-renewable and non-renewing subscriptions

latest releases: 0.16.4, 0.16.3, 0.16.2...
7 years ago

This is a bug-fix release to address #161.

API Changes

Auto-Renewable

The verifySubscription() method API has changed:

let purchaseResult = SwiftyStoreKit.verifySubscription(
            type: .autoRenewable,
            productId: "com.musevisions.SwiftyStoreKit.Subscription",
            inReceipt: receipt)

Non-Renewing

let purchaseResult = SwiftyStoreKit.verifySubscription(
            type: .nonRenewing(validDuration: 3600 * 24 * 30),
            productId: "com.musevisions.SwiftyStoreKit.Subscription",
            inReceipt: receipt)

See the README file for more details.

Changes

For auto-renewable, receipt["latest_receipt_info"] is used.
For non-renewing, receipt["receipt"]?["in_app"] is used.

This fixes a bug where receipt verification fails for non-renewing subscriptions (which were previously using "latest_receipt_info".

Don't miss a new SwiftyStoreKit release

NewReleases is sending notifications on new releases.