ios - Any reason to use restoreCompletedTransactions given appStoreReceiptURL in iOS7/8? -


i in process of updating app new ios7/8 in-app purchase libraries. see of ios7, have access appstorereceipturl part of nsbundle.

it appears can access url, , concomitant data, @ time, without interacting or interfacing skpaymentqueue.

previously, when customer installed our app , wanted restore in-app subscription, app call restorecompletedtransactions method of [skpaymentqueue defaultqueue], , obtain receipt information, 1 transaction @ time, app upload our server 1 transaction @ time.

however, while testing in ios app store sandbox, appear able obtain 1 piece of master receipt data [[nsbundle mainbundle] appstorereceipturl], upload server, obtain complete history of every in-app transaction user has made, , record transactions on server appropriate , send notification client.

consequently, why or when need call restorecompletedtransactions? in app, sell single, auto-renewing in-app subscription; there other use cases today in ios7/8 api still helpful?

if user has made purchase on different device, can useful (or necessary) "restore" purchase on new device. restorecompletedtransactions enable restore operation. default, on new device, believe >= ios7 style receipt not have prior purchases. on >= ios7, skreceiptrefreshrequest work in many cases.

from apple:

in cases, app needs refresh receipt , deliver products in receipt. refreshed receipt contains record of user’s purchases in app, on device or other device. however, apps need take alternate approach 1 of following reasons:

if use apple-hosted content, restoring completed transactions gives app transaction objects uses download content.

if need support versions of ios earlier ios 7, app receipt isn’t available, restore completed transactions instead.

if app uses non-renewing subscriptions, app responsible restoration process.

see https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/storekitguide/chapters/restoring.html#//apple_ref/doc/uid/tp40008267-ch8-sw9


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -