[英]How to set the productIdentifier in SKProduct object in Objective-c
我有這樣的代碼:
SKProduct *product = [[SKProduct alloc] init];
當我嘗試設置價格或產品標識符時,出現編譯錯誤,提示我無法設置只讀屬性。
這是我嘗試設置的方法:
product.productIdentifier = @"2";
為SKProduct設置價格和productIdentifier的正確方法是什么?
謝謝!
您不應該通過您的應用設置價格。 當您查詢應用內購買的SKProduct
將使用SKProduct
。 price是一個只讀屬性,可用於顯示IAP的價格。
如果要設置價格,則必須從iTunes中定義IAP的位置進行設置
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.