开发者

In App purchase Related things

开发者 https://www.devze.com 2023-04-12 14:17 出处:网络
I am new in application and am doing in app purchase in my application. There are lots of videos comin开发者_运维技巧g from the server side according to their two different prices.

I am new in application and am doing in app purchase in my application. There are lots of videos comin开发者_运维技巧g from the server side according to their two different prices.

So what can i do for this?

My question is that I have to create so many product ids for each video or is there a different way?


Yes, you have to create the product id for every product you wish to put on the app store. Apple checks each and every purchase made by the user on the basis of the product id you create on iTunes Connect.


If all video having same price there on the app store by IAP then you can only add one item there and display this item all time and make transactions there.


You have to create a a product id for every product - so yes each video will need two product id's.

It's important to remember that if I buy a video in your app then I will be able to delete the app, and re-install it and re-download the video for free - iTunes will recognise that I have already bought it and give it to me for free.

This is only be possible if every product has a unique id - so there is no way around it.


What I did is this: I have to buy more than 100 items and when a user taps two items I just pick the one ID with the count and multiply the cost against the counted object. When you have to buy one by one just forget the count and pick the price of the product. It works for me with simple logic.

(void)requestProductData {
SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObjects: @"com.Image.image3", nil]];
request.delegate = self;
[request start];
//[request release];
}
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {


if([response.products count] > 0) {
SKProduct *productData = (SKProduct *)[response.products objectAtIndex:0];
NSInteger nQty = [appDelegate.arrSelImages count];
SKMutablePayment *myPayment = [SKMutablePayment paymentWithProduct:productData];
myPayment.quantity = nQty;
[[SKPaymentQueue defaultQueue] addPayment:myPayment];
}
else {
[self removeLoadingView];
}
[request release];

}
0

精彩评论

暂无评论...
验证码 换一张
取 消