IAP downloadable content server-side help

Hi!

I want to use In-App Purchases in my app, but my content is really heavy (every pack is about 300 Mb). So I have to use downloadable content option. I searched for any solution for server side setup but didn’t find anything except Urbanairship service.

Does anybody have luck with setting up a server to use downloadable content In-App Purchases in his app? Is it worth to setup your own server? Should you use VPS-server or shared hosting will be ok? How much time it takes to setup server?

Any suggestions are welcome. [import]uid: 117007 topic_id: 25741 reply_id: 325741[/import]

Hey,

I have also quite heavy app with downloadable files (each around 250Mb).
Although I ended up adding all the files into the app and having the filesize nearly 800Mb for it I made a different kind of approach first.

I chopped each file into smaller pieces, so that I had around 50 * 5Mb pieces for each file. Then I just downloaded each file in parts and combined the pieces into one file in the phone when everything was downloaded.

I did this because I couldn’t find a better way to follow the download process and provide feedback to the user about how long it takes, and because I couldn’t find a way to stop and resume any downloads if user exits the app while the download is in progress.

So if user exits the app all the completed pieces are saved and the download continues from there the next time app is opened.

And for the server, you can sign up with Amazon S3 which can host your files easily for quite small fee and gives 15Gb free bandwidth every month for first year. Having just one server could be really slow for users on the other side of the globe, with Amazon this wasn’t a problem as they seem to cache the files in many places.

There could be better approaches to this, I’d be glad to hear if anyone can share those. [import]uid: 10416 topic_id: 25741 reply_id: 104145[/import]

Thanks, Harm! This is really interesting.

If there is no secret, could you tell, how much you pay for Amazon’s hosting every month?

And what about server setup, how did you do that? [import]uid: 117007 topic_id: 25741 reply_id: 104195[/import]

I don’t even pay anything for Amazon, my traffic is below their monthly free allowance. I ended up embedding all the files into the app in the end. It just took so long to download them that I thought it’s better to have them ready in the app and take the hit in purchases as the app size is so huge.
I now host some configuration files there which are just text and take very little space.

As for the server, you get all you need from Amazon. Just drop the files there, make the ones you need to public and copy the link into your application.
They also have the database which you can use so no need to have separate for that purpose either if you need one. [import]uid: 10416 topic_id: 25741 reply_id: 104361[/import]

Thanks!

So, what I need is just drop my in-app files, make them public, it’s easy. But how should I link it with purchases in my code? And, for example, if I have a pack with 200 images, and sure it will be compressed to one file and I have to extract them into documents or system folder (if possible) on iPhone. How to do this in Corona?

[import]uid: 117007 topic_id: 25741 reply_id: 104390[/import]

You can just download all those images one-by-one if you want, if they are jpeg format packing them wouldn’t help much anyways.

You cannot extract a compressed file on iPhone and cannot place them in system folder either. Also, there is something going on with the documents folder and persistent content not allowed by Apple (just saw it in the forums somewhere, related to their cloud service or something) which you might want to check out.

How to do all this (downloading and saving files) is rather easy if you check the shared code section and look for ftp helper or similar. [import]uid: 10416 topic_id: 25741 reply_id: 104410[/import]

Thanks for your patience and advices. I just curious, how other developers made a content that you can download, unpack and so on.

The reason I want to compress images is not to get a smaller file size. I think it’s better to download one file instead of 200, cause there should be a check if file is downloaded.

So, still many questions there… [import]uid: 117007 topic_id: 25741 reply_id: 104427[/import]

Hey,

If they have means to pack the data into compressed files I don’t know how those could be uncompressed in the end user device. Are they using corona?

Instead it could be possible to combine multiple files into one and split that into smaller parts on predefined places if you want to have one big file downloaded and then that made into multiple small ones.

But generally as we don’t have means to resume downloads it’s probably much better to just download as small parts as possible instead of big files. Any time user exits the app the ongoing download will be terminated and it has to be started from zero next time.

Btw. here is the discussion about the problem with big downloads and Apples new policy: http://developer.anscamobile.com/forum/2012/04/13/donotbackup-flag-comply-new-apple-guidelines-downloaded-content-also-allow-folder [import]uid: 10416 topic_id: 25741 reply_id: 104557[/import]

Thanks, Harm!

I will watch that topic for updates. [import]uid: 117007 topic_id: 25741 reply_id: 104640[/import]

i am sure you have found this by now, however, i bundle things in a tar file then download one file.
https://developer.anscamobile.com/forum/2012/03/13/tar-module-extract-tar-files-corona
“But generally as we don’t have means to resume downloads it’s probably much better to just download as small parts as possible instead of big files. Any time user exits the app the ongoing download will be terminated and it has to be started from zero next time.”

this is a very good point! the original way i did it was to download a json file with all the files i needed to download then loop through it. My download size is very small though so i prefer to bundle them in a tar. [import]uid: 89663 topic_id: 25741 reply_id: 111573[/import]

Hi,

I’m playing with the tar module that ezraanderson1979 talks about.
One question: What if the internet connection fails?, is it possible to resume the download of the tar file?

I’d appreciate so much your help.

Alberto. [import]uid: 44013 topic_id: 25741 reply_id: 142479[/import]

Hi,

I’m playing with the tar module that ezraanderson1979 talks about.
One question: What if the internet connection fails?, is it possible to resume the download of the tar file?

I’d appreciate so much your help.

Alberto. [import]uid: 44013 topic_id: 25741 reply_id: 142479[/import]