after months of hard work creating a new app for our social app, I'm stuck with IAPs in iOS.
Long story short:
After the migration to the Unified API and an updated Xam.IAP component, my Products were not being displayed correctly in my "buy-menu" anymore. (Especially the price information, when trying to retrieve through FindProduct(...).
Just a few days earlier, everything still worked.
IAPs are not live at the moment, but ready for use in conjunction with iTunes sandbox servers/Env.
A short examination:
FindProduct just returned a placeholder product with the float Price being 0 and FormattedPrice being an empty string.
Obviously, the requested products haven't been received from the iTunes Servers, neither as valid, nor as invalid products.
Okay, as I evaluated this problem for a long time now and checked every point on the "IAPs checklist" (every potential reason it could not work, like missing Banking&Tax/iOS Paid Application contracts in iTunes Connect) I started disassembling the component (sorry @KMullins) and manually bring it to life in a new project.
I came to the conclusion (and proof) that neither ReceivedResponse, nor RequestFailed of the corresponding SKProductsRequest get invoked - there's just the RequestFinished event occuring shortly after starting the request.
A deeper analysis showed there're some WeakDelegates underneath (in the binding lib of StoreKit).
As I experienced some strange behaviour regarding WeakDelegates and WeakRefs in other classes before (since the upgrade to Unified API), I suppose it's a similar issue. It seems in some situations, WeakRefs/WeakDelegates targets get crunched by the GC some time before they are invoked/used. In another class, I just fixed this by not using Weaks in these places. Did SGen become this aggressive?
However, I'm just assuming, as I'm baffled with this issue.
The main problem is, a pure StoreKit implementation would take a longer time to be created in a similar manner - and if it's a SK bug, this wouldn't fix it at all.
Is anybody experiencing similar problems?
Greetings from Germany,
P.S. if anybody needs more information or context on this issue, just tell me. As this issue targets an app with more-or-less live IAPs, a sample app with Xam.IAP set to testing mode would make no sense.