private static void AddToISNSettings(UM_InAppProduct prod) { if (prod.IOSId.Equals(string.Empty)) { return; } var newTpl = new SA.IOSNative.StoreKit.Product(); newTpl.Id = prod.IOSId; newTpl.Description = prod.Description; newTpl.DisplayName = prod.DisplayName; newTpl.PriceTier = prod.PriceTier; newTpl.Texture = prod.Texture; newTpl.IsOpen = false; if (prod.Type == UM_InAppType.Consumable) { newTpl.Type = SA.IOSNative.StoreKit.ProductType.Consumable; } if (prod.Type == UM_InAppType.NonConsumable) { newTpl.Type = SA.IOSNative.StoreKit.ProductType.NonConsumable; } IOSNativeSettings.Instance.InAppProducts.Add(newTpl); }
public void SetTemplate(SA.IOSNative.StoreKit.Product tpl) { _IOSTemplate = tpl; _template = new UM_InAppProductTemplate(); _template.id = tpl.Id; _template.title = tpl.DisplayName; _template.description = tpl.Description; _template.price = tpl.Price.ToString(); DisplayName = tpl.DisplayName; Description = tpl.Description; _isTemplateSet = true; }