Closed erohin closed 8 years ago
@erohin Thanks for the bug report. Our testing abilities are very limited because Apple won't allow IAP transactions from the iOS simulator. Can you tell me if you were using the IAP Module or the Product Class?
Hi @kevinvangelder, i get error in this code:
full_version = PM::IAP::Product.new('MyApp.NonConsumable.FullVersion')
full_version.retrieve do |inapp, error|
if inapp
view.find(:unlock).find(:button).off.on(:touch) do
full_version.purchase do |status, transaction|
case status
when :in_progress
when :deferred
when :purchased
App.alert('Unlocked')
NSUserDefaults[:full_version] = true
when :canceled
when :error
mp transaction.error.localizedDescription
end
end
end
view.find(:restore).off.on(:touch) do
full_version.restore do |status, product|
if status == :restored
App.alert('Unlocked')
NSUserDefaults[:full_version] = true
else
App.alert('Fail')
end
end
end
if error
mp error
end
end
end
I get error only when i try to restore purchase. Now i use rm_vendor gem, without this error. rm_vendor restore method:
def restore(params, &block)
@params = params
@block = block
SKPaymentQueue.defaultQueue.restoreCompletedTransactions
end
ProMotion-iap have same realization. I can't tell you where is the problem :(
@erohin, we're working on this -- back with you soon!
When i try to restore purchase:
If i try to bye same inapp after cancel restore it (i can cancel restore purchase if i'm not login on device), i get this