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

Feature Request: Add MacOS Support #202

Closed
ShammyLevva opened this issue Jan 8, 2019 · 4 comments
Closed

Feature Request: Add MacOS Support #202

ShammyLevva opened this issue Jan 8, 2019 · 4 comments

Comments

@ShammyLevva
Copy link

Could the iOS code be adapted with minimal effort to provide MacOS In App Purchase support?

@jamesmontemagno
Copy link
Owner

I will not be implementing it as I have no plans here, however anyone can send a PR.

@x-ji x-ji mentioned this issue Apr 9, 2020
@tussock
Copy link

tussock commented Oct 4, 2020

It seems that the only reason that the InAppBilling.apple.cs uses UIKit is to perform:
static bool IsiOS112 => UIDevice.CurrentDevice.CheckSystemVersion(11, 2);
i.e. to see if the version is 11.2 or later.

This is used later for introductory prices.

LocalizedIntroductoryPrice = IsiOS112 ? (p.IntroductoryPrice?.LocalizedPrice() ?? string.Empty) : string.Empty, 
MicrosIntroductoryPrice = IsiOS112 ? (long)((p.IntroductoryPrice?.Price?.DoubleValue ?? 0) * 1000000d) : 0

Otherwise, it looks like this code should be portable between mac and iOS.

Cheers.

@Suplanus
Copy link

@tussock
I had a look into it... there are problems with SkPayment and SkPaymentTransaction:
image

image

Have no idea how to handle the tokens.

@jamesmontemagno
Copy link
Owner

#354

Will be in 4.1.0 there will not be a transaction receipt though as you will need to call the native APIs for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants