in-app purchase best practise: how to use what is downloaded

Member
Posts: 164
Joined: 2010.10
Post: #1
simple example of the problem:
i have an app that can download backgrounds from in-app purchase.
so i download images (or a zipped image).
now that i have it on my iphone...how can my app knows the name of the image and can load as background of the game?

what i have thought is zip of the image+downloaded.plist;
downloaded.plist is a filename that contains the name of what i have downloaded, so my app loads that plist (i know the name because is always equal) and then the rest...
but now i have to save that information in another local plist that contains all add-on downloaded...

this is a very basic example, but i can in future load levels, character...so i'd like to know how to organize work to have it more general as possible...

what is the standard method to make this?
thanks
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
The recommended method for handling IAP is to have all the content in your app already, so that you don't have to do anything but enable it...
Quote this message in a reply
Member
Posts: 164
Joined: 2010.10
Post: #3
thanks for tha answer,
so, if i had understood well, if i want to make other levels or backgrounds ecc, after my first release, i'll put in apple store an upgraded version of the entire app with the other contents...isn't it?
why it is recommended this method?
thanks
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
Because it's simple and cheap. Your code is trivial, Apple covers the bandwidth for the content, and your customers don't have to wait after making an IAP to receive it.
Quote this message in a reply
Member
Posts: 164
Joined: 2010.10
Post: #5
thanks for explanations!
Quote this message in a reply
Member
Posts: 164
Joined: 2010.10
Post: #6
i continue from this discussion because i have similar problem:
i have an app with a plist containing 100 strings (word.plist).
if i use inapp purchase to download a list of strings (perhaps stored in a plist, newword.plist) and want to upgrade the old list with the new.
what are the basic steps to achieve this?

if i must upgrade with other words should i use the same name far all? i explain better:
i downloaded the first pack of word->newword.plist
i download another pack of word...(with the same name i suppose, so i know the name of the file that hold information)...

or what solution can you think?
thanks
Quote this message in a reply
Moderator
Posts: 439
Joined: 2002.09
Post: #7
Why not read in more than one file? For example you could scan your app's directory for any files with the name starting with "WORDLIST" of some other string. Then read them all in.

This would let you easily add additional files for purchase in the future.

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
Also, why download the word files rather than ship them with your app and use a simple setting to control access to them?
Quote this message in a reply
Moderator
Posts: 439
Joined: 2002.09
Post: #9
I was thinking of the downside: if you come up with more sets of words to purchase you have to release another version of your game. But now that I think about it getting it to be completely dynamic would only be worth it if you were planning lots of content drops, say a magazine or book service.

So yeah, don't download them, just ship them with the app. But reading multiple files from a directory is still not a bad way to do it. Or just have one file, but split it up internally.

One downside is if you ship the wordlist with the app as a plain text file, I believe it's not hard for people to open your app's package (using Mac or PC) and modify the list of words. Probably no big deal unless your app explodes in popularity, and/or has multiplayer. But you might think about adding a simple encryption or checksum to the final version of your app. I read that Words With Friends didn't lock down their list at first and had to add it later.

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  x-comic or ibook, login, download, inapp purchase, project structure sefiroths 0 4,978 Feb 19, 2013 09:08 AM
Last Post: sefiroths