Home
Reviews
Forums
New Games
Podcast
• submit tip •
  #11  
Old 06-19-2012, 03:01 AM
Ovogame's Avatar
Ovogame Ovogame is offline
Senior Member
iPad (3rd Gen), iOS 5.x
 
Join Date: Sep 2010
Location: Morestel, France
Posts: 499
Default

Yes, Restore for non-consumable is now mandatory. If people are wondering how it works...

You call:
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
to initiate a full restore.

Everytime an item is restored, you 'll get a call to "restoreTransaction", so, you need to add this function (it is similar to completeTransaction when you do a normal purchase)

- (void) restoreTransaction: (SKPaymentTransaction *)transaction
{
CStore::NumRestored++;
[[SKPaymentQueue defaultQueue] finishTransaction: transaction];
}

NumRestored is part of my own CStore class. I set it to zero before calling a restore. So, I know how many items have been restored.

When all the items have been restored, you get a call to paymentQueueRestoreCompletedTransactionsFinished


- (void)paymentQueueRestoreCompletedTransactionsFini shed: (SKPaymentQueue *)queue
{
if (CStore::NumRestored==0)
{
...
}
}

I'm testing if any items have been restored. If there are none, you can display a message like:
"It doesn’t look like you've purchased this product with this account."

Also, you might want to create this function too for completeness:

- (void)paymentQueue: (SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError: (NSError *)error __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0)
{
}

Hope it helps

JC
Reply With Quote
  #12  
Old 06-19-2012, 10:47 AM
smuttlegiaco's Avatar
smuttlegiaco smuttlegiaco is offline
Senior Member
iPad, OS 4.x
 
Join Date: Aug 2010
Location: Germany
Posts: 470
Default

thanks to the starter of the thread! (and to all the other participants, too, of course)
Reply With Quote
  #13  
Old 06-19-2012, 06:16 PM
Name That Name That is offline
Junior Member
iPhone 4S, iOS 5.x
 
Join Date: May 2012
Posts: 13
Default

So if unlocking a level of some sort costs $.99, then you need to have a 'restore purchases'?
Reply With Quote
  #14  
Old 06-19-2012, 07:00 PM
Connector Connector is offline
Official HDMI Out and iCade Expert
iPad (3rd Gen), iOS 6.x
 
Join Date: May 2012
Location: In the Chatroom
Posts: 11,916
Default

Cool, it was way too confusing before. I'm glad apple is making this change. I know it will make customers more at ease and they won't have to go to customer support web pages just to ask if their inapps are still there.
Reply With Quote
  #15  
Old 06-20-2012, 01:37 AM
Ovogame's Avatar
Ovogame Ovogame is offline
Senior Member
iPad (3rd Gen), iOS 5.x
 
Join Date: Sep 2010
Location: Morestel, France
Posts: 499
Default

Quote:
Originally Posted by Name That View Post
So if unlocking a level of some sort costs $.99, then you need to have a 'restore purchases'?
Yes.
Reply With Quote
  #16  
Old 06-20-2012, 02:19 PM
meyumedev meyumedev is offline
Senior Member
 
Join Date: Aug 2009
Posts: 291
Default

We (Cannibal Cookout) just got rejected for NO restore button for CONSUMABLE items. I have appealed to Apple as this can't actually be implemented
Reply With Quote
  #17  
Old 06-20-2012, 04:02 PM
Blackharon's Avatar
Blackharon Blackharon is offline
Developer
iPhone 4, iOS 5.x
 
Join Date: Mar 2010
Location: Canada
Posts: 759
Default

Quote:
Originally Posted by meyumedev View Post
We (Cannibal Cookout) just got rejected for NO restore button for CONSUMABLE items. I have appealed to Apple as this can't actually be implemented
That could be incorrect labeling of the IAP in iTunes connect. Be sure it's truly consumable.
Reply With Quote
  #18  
Old 06-20-2012, 05:15 PM
meyumedev meyumedev is offline
Senior Member
 
Join Date: Aug 2009
Posts: 291
Default

Quote:
Originally Posted by Blackharon View Post
That could be incorrect labeling of the IAP in iTunes connect. Be sure it's truly consumable.
They are all consumable and have been for the last 4 updates!
Reply With Quote
  #19  
Old 06-22-2012, 04:25 PM
meyumedev meyumedev is offline
Senior Member
 
Join Date: Aug 2009
Posts: 291
Default

Just an update ... Apple finally went back and approved the update without requiring me to make any changes, so I'm guessing a reviewer got confused.
Reply With Quote
  #20  
Old 06-25-2012, 11:56 AM
MelissaMarie MelissaMarie is offline
Junior Member
iPhone 4S, iOS 5.x
 
Join Date: Mar 2012
Location: New York, NY
Posts: 20
Send a message via Skype™ to MelissaMarie
Default

Quote:
Originally Posted by Rubicon View Post
Just a note to say thanks, Melissa.

We were just about to hit the buffers on this one ourselves, until I came across your post.


Seriously tho, glad to help. Our lead programer for tka is on vacation for a month so we're beat on this update until he comes back; if we can save some frustration for other indies, well, at least something came out of it.
Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


iPhone Game Reviews | iPhone Apps

All times are GMT -5. The time now is 07:13 AM.