protected override void OnRun() { if (queueObserver == null) { queueObserver = new ExamplePaymentQueueObserver(); SKPaymentQueue.DefaultQueue.AddTransactionObserver(queueObserver); } if (productRequestDelegate == null) { productRequestDelegate = new ExampleProductRequestDelegate(); productRequestDelegate.Retain(); } var productIds = new AKiOS.NSMutableSet(); productIds.AddObject(AKiOS.NSString.StringWithUTF8String("com.jdshasgdj.product_id_1")); var productRequest = SKProductsRequest.AllocInitWithProductIdentifiers(productIds); productRequest.SetDelegate(productRequestDelegate); productRequest.Start(); }
public static SKProductsRequest AllocInitWithProductIdentifiers(NSMutableSet productIds) { return(Class.FindByName("SKProductsRequest").Call("alloc").Call("initWithProductIdentifiers:", productIds).Cast <SKProductsRequest>()); }