views:

154

answers:

1

Hello experts!

I have created an app which allows users to buy non-consumable content. The retrieving-ids-payment-process works like a charm but i wish too, when the transaction is completed and the request is made to download the content, I would like to save who has downloaded this content. In my observer i have implemented method:

- (void)completeTransaction: (SKPaymentTransaction *)transaction{
    NSLog(@"completeTransaction");
    [[ShopHandler sharedManager] provideContent:transaction.payment.productIdentifier]; 
    [[SKPaymentQueue defaultQueue] finishTransaction: transaction]; 
}

In my ShopHandler i have the provideContent method

-(void) provideContent: (NSString*) productIdentifier {
    Here i want to retrieve the user that has bought this product and
    then perform a request to my server
    e.g http://www.tesserver.com/download?id=com.my.id.test&[email protected]
 }

So how do i retrieve that itunes id?

Edit:

Apple states in their Introducing Store Kit video in the iPhone Dev Center one we should:

"Keep a copy of the TransactionID along with the Customer Information in your server in the cloud. This way if the customer mistakenly deletes your application, you have a mechanism for recovery. You can check your server on first launch of your app for a record of the purchases for a given customer and bring that app back to its state before it was deleted. Believe me your customers will be thankful!"

So what do they mean by this?

A: 

I don't believe you can. This is a security feature, and furthermore as a user I don't want you to know my iTunes ID.

Jeff Kelley
are you sure? Check my edited info.
jakob
I think by "Customer information" they mean things like UDIDs and receipts. I don't see any methods that expose iTunes usernames.
Jeff Kelley
Ok I understand, what you are saying make sense! Thank you for your answer
jakob