public override void ReceivedResponse(SKProductsRequest request, SKProductsResponse response) { if (SingleManager.productsRequest == request) { SingleManager.productsRequest = null; } var changed = false; foreach (var product in response.Products) { ProductDetails details; if (SingleManager.products.TryGetValue(product.ProductIdentifier, out details)) { details.SetDetails(product); changed = true; } } foreach (var product in response.InvalidProducts) { ProductDetails details; if (SingleManager.products.TryGetValue(product, out details)) { details.SetInvalid(); changed = true; } } // Check that all products have details - if not reload SingleManager.RequestProductDetails(); if (changed) { SingleManager.RaiseDetailsChanged(); } }
public override void RequestFailed(SKRequest request, NSError error) { // Retry the load - most likley case is no network SingleManager.RequestProductDetails(); }