views:

198

answers:

1

This question is a little different from the others I've found here. My In App StoreKit is working, I can list products in my store successfully. I've gone through the Apple documentation and never saw my question addressed(I may have missed it).

My client(non-profit) would like to be able to accept donations through their App. I would like to let them have the ability to add new donation events on the fly without users having to update their app. What I mean is, they may have a special "Help us sponsor an event this upcoming Arbor Day" and accept donations particular to that case.

I am currently reading products like this:

SKProductsRequest *request= 
         [[SKProductsRequest alloc] initWithProductIdentifiers: 
          [NSSet setWithObjects: @"goldSponsor", @"silverSponsor"];

This means if that Arbor Day event comes up, I'll have to issue an update to include the @"arborSponsor" in my request list. How can I request every product under my bundle?

I've tried using @"com.thedomain.*" and some other guesses without luck. Is it possible to return the whole list, am I missing something very simple? Thanks!

+5  A: 

You unfortunately have to provide all of the ID's for products you'd like to get information for as far as I could see.

One way to handle this is to store your product ID's on a remote server and then to make a request to the server to pull down the current set of ID's when loading the store.

That would allow you to add or remove products from the itunes side of things and not have to submit any binary updates to your app.

I think you could probably find a happy medium by caching the list of products in the iphone app and then just making a quick request to see if there had been any changes so you wouldn't even have to get the full list each time.

This could be done using a simple http API on the server side or even just an xml file you pull down.

From the In App purchase Programming Guide

Apple recommends you retrieve product identifiers from your server, rather than including them in a property list. This gives you the flexibility to add new products without updating your application.

paulthenerd
Thanks! That was what I was afraid of. Hopefully this will give me reason to push them to get a server for this.
ryanday