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

Product info retrieval support #1

Closed
darekxan opened this issue Sep 21, 2015 · 5 comments
Closed

Product info retrieval support #1

darekxan opened this issue Sep 21, 2015 · 5 comments

Comments

@darekxan
Copy link
Contributor

Does the library support retrieving of product info in any way?

@bizz84
Copy link
Owner

bizz84 commented Sep 21, 2015

It does, through the InAppProductQueryRequest class, however this has not been exposed in the public interface.

InAppProductQueryRequest takes a set of product IDs as input, and returns an array of [SKProduct] in the completion block. This is used internally by the main SwiftyStoreKit class.

Would you like for this to be exposes? What is your use case?

@darekxan
Copy link
Contributor Author

My case is:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/ShowUI.html#//apple_ref/doc/uid/TP40008267-CH3-SW5

Paragraph: Retrieving Product Information.

I believe product information including price should be shown to the user, before he decides to initiate the payment.

@bizz84
Copy link
Owner

bizz84 commented Sep 21, 2015

Sounds reasonable. InAppProductQueryRequest is what you need as it will give you an array of SKProducts.

All is needed is to make the class public along with its startQuery method. Can't promise I'll find time to do it in the next few days - if you need it quick please just fork the library and change the visibility modifiers.

@darekxan
Copy link
Contributor Author

I've created quick pull request, it is still under testing.

I've tried to follow coding conventions.

One problem inconvenience this may cause is users might need to import StoreKit manually when using SKProduct.

I believe wrapping it might be good idea.

@bizz84
Copy link
Owner

bizz84 commented Sep 26, 2015

@darekxan Thanks for the PR, merged with minor code formatting changes.

I also updated the README to document the new functionality and updated the pod version to 0.1.1.

@bizz84 bizz84 closed this as completed Sep 26, 2015
bizz84 pushed a commit that referenced this issue Apr 24, 2016
added MDacne to readme, thanks 🙏
bizz84 pushed a commit that referenced this issue May 24, 2016
bizz84 pushed a commit that referenced this issue Jul 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants