Question about in app purchases

Hey Guys,

I have a question about in app purchases, by that I mean I don’t think I fully understand how they work.

I’m updating the first app I made to free and I plan (well hope to anyway) make money off level packs through in app purchases. I went and set up everything up through itunes connect but now what I can’t understand is how do I deliver the purchase to them.

By that I mean do I include all the code (the purchasable levels, artwork, etc…) in the shipped app or do I upload those to itunes separately and when they buy it the it downloads it.

If I have to include it all at once how to prevent it from loading/changing scenes (with director) if they haven’t purchased it?

If I have upload the code separate how do I build for that as it isn’t a main.lua file, but something like: “levelpackone.lua”?

Thank you for all/any help you can give.

-Jeremy [import]uid: 23649 topic_id: 16192 reply_id: 316192[/import]

I’m trying to figure out In-App Purchase right now (lots of headaches), and even though I don’t have answers to all your questions, I know that you need to deliver the content to your user (if the premium content isn’t already delivered with the free version).

App Store won’t deliver additional content for you. So, either you distribute the premium content with free version to be unlocked upon purchase, or deliver the content from some server to your user after the user successfully pays for it.
[import]uid: 67217 topic_id: 16192 reply_id: 60275[/import]

Hmmm, so basically what your telling me is that I need to create some sort of check function/variable and save/load that variable.

What a pain. Lol.

I’m assuming it would look something like this:

  
if purchased == "yes" then  
-- load the scene  
else  
--show app store purchases  
end  
  

Thanks that feedback really really helps me out a lot. [import]uid: 23649 topic_id: 16192 reply_id: 60279[/import]

@Jeremy,

yes, in effect it is all a condition to check for, but wish it was that simple, I lost hair and sleep on Apple’s In-App Purchases and gave up on it. :frowning:

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 16192 reply_id: 60288[/import]

@Jay Hey, thanks, good to know that all it is is a condition, for some reason I really thought it was more. After looking over the docs at least I know where/how to start but it really seems miserable. [import]uid: 23649 topic_id: 16192 reply_id: 60290[/import]

@jeremy… I think you lost me there

you have the complex part first

for example


purchased = true



then you have the easy part

if purchased == true then

That is what I am saying is the condition you need to check for

the bit that made me give up on In-Apps is the hoops you need to jump through, I had earlier made a document on In-App purchases when it was released with how to set up the App-Store with In-App articles, and so on…

Let me say that while it is as easy as the Local Notifications are with CoronaSDK, I have not been able to get either of them working for me :frowning:

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 16192 reply_id: 60295[/import]

@Jayant, I can’t believe you gave up on In-App Purchase. That is so discouraging to hear. You must be joking. With all you do and know, I just can’t believe it.

@Jeremy, I thought of doing the if-statement the way you noted above, and thought of saving the isPaid variable together with saved game data (using JSON). This way, once the user successfully pays for it, the paid status is saved, and my game would not need to connect to the store anymore. But then… I’m not entirely sure if it’s good enough.

Can the saved data (using JSON) easily manipulated by someone (i.e., too-clever-users)? I’d very much appreciate hearing any thoughts/guidance on whether or not the game app should connect to store to confirm paid status each time the game launches. [import]uid: 67217 topic_id: 16192 reply_id: 60296[/import]

@jay Hey, sorry I didn’t mean to confuse you, I’m newish to programming and I was basically agreeing with you what I meant by condition was (what you wrote) if purchased == true.

The part that I feel is miserable is setting it up with Apple/making sure you save the purchased data correctly. For me it would be inserting what ever I use for that variable into an SQLite table, loading/reloading it when needed.

@Naomi I was using local JSON files for saving scores/data for awhile but just recently I switched to SQLite as I understand it a lot better. Anyway I have no idea how easily JSON can or can’t be manipulated.
[import]uid: 23649 topic_id: 16192 reply_id: 60297[/import]