-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Add Windows 10 UWP implementation #1
Conversation
Hey there! I have been adjusting the API recently so if you can update based on this new finalized API, should be better. I will start a review on your current and give you some feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping Ping @robinmanuelthiel let me know if you can make these adjustments
private bool testingMode; | ||
|
||
/// <param name="testingMode">UWP offers a way to test in-app purchases with the CurrentAppSimulator class instead of CurrentApp.</param> | ||
public InAppBillingImplementation(bool testingMode = false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can not have a constructor that takes arguments as that creates issues with Bait and Switch.
We should add a bool IsTesting {get;set;} to the Interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, adding IsTesting
sounds way better. Will do that.
using System.Threading.Tasks; | ||
using System.Xml; | ||
using Windows.ApplicationModel.Store; | ||
|
||
namespace Plugin.InAppBilling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is currently linked with other projects. We will need to remove that or the build will fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really get, what you mean here. UWP needs them both to work with IAPs. How could we remove them? Build works for me here. Any advice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look in the project... essentially the same file is linked to older Windows Phone projects. this means the build will fail. You need to create a blank implementation for those projects.
{ | ||
throw new NotImplementedException(); | ||
// Get list of products from store or simulator | ||
var listingInformation = testingMode ? await CurrentAppSimulator.LoadListingInformationAsync() : await CurrentApp.LoadListingInformationAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this a method for testing mode to return the base of whatever the "CurrentApp" is. That way we don't duplicate that code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea, will do that.
Hey @jamesmontemagno, thanks for your review. Sounds good, I will update the PR during the day and give you an update, when it's ready to get reviewed again! |
Alright, I have updated the PR. Beside failing AppVeyor build. We have to take a look at that together, I guess... I also took out the testing mode and will send you a separate PR with the |
I created a new UWP branch to look into it and will help out with me trying to get it working. Should be good now :) |
Consumption state + merge from forked repo
Update InAppBilling.apple.cs
Min Supported Version:
Windows 10.0 (Build 10240)
Known issues:
Testing Mode currently not available for MvvmCross (needs a platform wide change)