-
Notifications
You must be signed in to change notification settings - Fork 32
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
Merge this project into SwiftyStoreKit #1
Comments
Traffic is only available to you privately not public ;-) |
I'm definitely not opposed, Andrea! Thanks for opening this issue -- let's talk about the best way to incorporate it. When I put this repo up, I was aware of SwiftyStoreKit, but I wasn't sure how to integrate the local receipt validation code. There are a couple of non-intuitive things to be aware of:
There may be more, but I think of those right off the bat. Do we do more with the code, itself? Or do we document the requirements around it within the SwiftyStoreKit documentation? Let's discuss and figure out how to move forward! |
Please keep SwiftyLocalReceiptValidator separated from SwiftyStoreKit! I.e. don't kill this repo... |
Would you see any value in donating this code as a "starting point" to SwiftyStoreKit? But also keeping this here, just in case someone didn't want to bring in the whole kit? Help me understand the downside if you can, @MKGitHub. |
No I would not see any value as I don't use SwiftyStoreKit. And so if you were to move over to SwiftyStoreKit then you would be forcing people to also move over or abandon. I think the best solution should be to have a SwiftyStoreKit extension for this repo i.e. it should be a choice to use this repo in SwiftyStoreKit while both are seperate and go on doing their own business without being dependent (except the extension). |
Thank you @MKGitHub for your insight. Your viewpoint as a user is quite valuable to better inform which route we should take. @andrewcbancroft you raise some very valid points. Local receipt validation has been tackled before as part of the RMStore project, and in that case they settled for having an optional reference implementation. Some considerations
Possible integration steps - code levelIn its current form, SwiftyStoreKit can load the local receipt (or refresh it if it's missing) and produce the encrypted receipt contents as Within SwiftyLocalReceiptValidator, We could define an API contract so that users could just create a Possible integration steps - project levelI can see various ways in which we could integrate the two projects. Here I try to list them and evaluate pros and cons. In all cases, we would need to agree on an API that allows SwiftyLocalReceiptValidator to be used within SwiftyStoreKit. 1. Copy SwiftyLocalReceiptValidator into the main SwiftyStoreKit repo.Pros
Cons
2. Make SwiftyLocalReceiptValidator a submodule of SwiftyStoreKit.Pros
Cons
3. Keep the two projects separate and let users pick and choose in the Podfile or CartfilePros
Cons
SummaryPersonally, I like option 3. Maybe SwiftyStoreKit could define a protocol that defines an abstract public interface for Sample code: import SwiftyStoreKit
import SwiftyLocalReceiptValidator
// SwiftyStoreKit already defines a ReceiptValidator protocol.
// In this example, your class is renamed to LocalReceiptValidator.
extension LocalReceiptValidator: ReceiptValidator { }
let localReceiptValidator = LocalReceiptValidator()
SwiftyStoreKit.verifyReceipt(using: localReceiptValidator) { result in
switch result {
case .success(let receipt):
print("Verify receipt Success: \(receipt)")
case .error(let error):
print("Verify receipt Failed: \(error)")
}
} Would be good to get your opinion on the above. Then, we can see how to best more forward. |
option 3 seems like a good start |
@andrewcbancroft no worries, things have been quite busy on my side as well :) I have an idea about how to make this work, however I'm currently unable to compile your code (also see #2). Would you be able to fix this? Then I could code up a quick demo that uses both projects. |
@PaulWagener, @bizz84 -- I updated README.md with additional prerequisite information based on #2's resolution. I also added a demo project under Demo that compiles with Xcode 9. I don't know that this particular demo project should be used for the proof of concept you're talking about, Andrea, but I hope it adds value to others attempting to get up and running on their own with this stuff. @PaulWagener - thank you again for your diligence to remind me of the bridging header and C Union Accessor files. We should be able to move forward with Andrea's demo that uses both projects at this point. crosses fingers |
@bizz84 any update on this implementation? |
Hey @bizz84 - Hope you're well! It's been some time since we touched base on trying to move forward with making something like SwiftyLocalReceiptValidator compatible with SwiftyStoreKit. Last October you mentioned that you had an idea, but you were having build issues with my project. I think I've gotten those fixed. If now's not the time or you're no longer interested in this (ie, we can just keep the projects separate and developers can grab the code they need from here for local receipt validation if they want to), I may close out this issue. We can pick it back up again in the future if it interests you. What do you think? |
Hi Andrew,
Thanks for your email. I barely had any time to look into SwiftyStoreKit
this year, so it's unlikely I'll make progress on this.
Feel free to close the issue for now - will see what I can do in the future.
Best,
Andrea
…On 14 July 2018 at 20:02, Andrew Bancroft ***@***.***> wrote:
Hey @bizz84 <https://github.com/bizz84> - Hope you're well!
It's been some time since we touched base on trying to move forward with
making something like SwiftyLocalReceiptValidator compatible with
SwiftyStoreKit.
Last October you mentioned that you had an idea, but you were having build
issues with my project. I think I've gotten those fixed.
If now's not the time or you're no longer interested in this (ie, we can
just keep the projects separate and developers can grab the code they need
from here for local receipt validation if they want to), I may close out
this issue. We can pick it back up again in the future if it interests you.
What do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJWT8YR7szk_OJ4k2UWw1NzKjxAbG1_ks5uGkA5gaJpZM4O91JI>
.
--
Andrea Bizzotto
Software Developer and Consultant
e-mail: bizz84@gmail.com
website: bizz84.github.io
|
Hi Andrew,
I'm the author of SwiftyStoreKit, which a widely used and very popular library in the iOS community.
One of the missing features in SwiftyStoreKit is local receipt validation, and I feel that your project would be a great addition.
I feel the iOS community as a whole would benefit if we could incorporate your implementation into SwiftyStoreKit, and would make local receipt validation immediately available to all the developers that are already using it.
What do you think?
Best,
Andrea
The text was updated successfully, but these errors were encountered: