Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved handling of receipts #521

Merged
merged 1 commit into from
Jun 17, 2019
Merged

Improved handling of receipts #521

merged 1 commit into from
Jun 17, 2019

Conversation

emilioicai
Copy link
Contributor

We noticed obtaining the App receipt isn’t as straightforward as we thought.

NSBundle.mainBundle().appStoreReceiptURL returns an NSURL describing the path behind which the receipt can be found, if there is one!

To quote the documentation: (https://developer.apple.com/documentation/foundation/nsbundle/1407276-appstorereceipturl)

For an application purchased from the App Store, call this method on its application bundle locate the receipt. This method makes no guarantee about whether there is a file at the returned URL — only that if a receipt is present, that is its location.

In such a case, you have to start a SKReceiptRefreshRequest. This tries to download a receipt and saves it in the known destination if everything succeeds.

Obviously the process must be asynchronous now.

On top fo this, we fixed a couple of minor issues with v3.0.0 and added a new method to request the receipt in iOS whenever it's needed.

@hyochan hyochan added 🥺 feature request Request a new feature 🎯 feature New feature and removed 🥺 feature request Request a new feature labels Jun 14, 2019
@hyochan
Copy link
Owner

hyochan commented Jun 14, 2019

@emilioicai Really thanks for this! Could you kindly rebase this withmaster once again? There seems to remain conflict rebasing it with the master branch.

@emilioicai
Copy link
Contributor Author

Hey @hyochan I tried rebasing again but it looks the fork is totally up to date. Could you point out which commit is missing?

@hyochan
Copy link
Owner

hyochan commented Jun 15, 2019

image
I am still seeing above. Did you fetched upstream?

Copy link
Owner

@hyochan hyochan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@hyochan hyochan merged commit cc553d1 into hyochan:master Jun 17, 2019
@hyochan hyochan mentioned this pull request Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants