Support for macOS
tcurdt opened this issue ยท 7 comments
It seems like StoreKit behaves the same (or very similar) on macOS.
Any thoughts on adding macOS support?
macOS support is kinda-sorta work-in-progress. I need to configure the testing suites and stuff. I don't think there should be any major codebase changes required. Hopefully, I'll have a chance to finish the work soon.
I just pushed to master a new stab at making a macOS test target. However, Xcode complains and doesn't build. It appears to be building the iOS test target when I am trying to test with a 'My Mac' device. Any ideas how to configure it so when I press Test it only runs the tests appropriate for the current platform?
It's been a while since I had a setup like that - but shouldn't that be doable with two separate schemes?
I was trying to avoid having multiple schemes but I couldn't find another way so I just bit the bullet and did it, master
now has MerchantKit-iOS
and MerchantKit-macOS
schemes. Got everything building now, but there are five failing tests so evidently StoreKit has some minor behavioural differences that I need to pin down.
macOS support is live with 89b1f0f.
Thanks Benjamin for this very helpful library.
FYI I had to make a couple of minor changes to get it to compile with macOS 10.13 compatibility.
In Purchase.swift Line 42: @available(iOS 11.2, macOS 10.13.2, *)
In ProductInterfaceController.swift Line 318: if #available(iOS 11.2, macOS 10.13.2, *) {
There are probably a few more availability changes required in the TestSuite to get that to build and run under an older macOS too.