in Education by
I'm working on an iPhone app with inApp payment: whenever the user pays a small sum, he receives an update of the application. The "update" is a sort of new "chapter" in an adventure game and it is made of text and xml files, images, sounds and so on, generically "assets". When the assets are downloaded, they form the content of a new chapter (or stage, or step) inside the application. I'm looking for advices on how to load all this data: for example, the device, while downloading, could accidentally stop working (low battery, etc.) or it could disconnect for some reason. This way, the integrity of the update would be lost. I researched a little and found solutions with md5 checksum or sockets, but I wanted to ask here too, before starting anything. For example, I wanted to know if it is a good idea to download a big zip file or it would be better to download small uncompressed files. Any advice is appreciated. Thank you. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I have a similar setup, and what I do is maintain a database of items installed. I also have a separate list of items available which is updated from my server periodically. When the user buys one, the item is copied from the "available" list to the "installed" list with a status of "purchased". It then goes into a download queue. After it's downloaded, the status is moved to "downloaded" and some installation is done. Then the status is finally updated to "installed". I protect against interruptions by having the app check when it starts (or is unbackgrounded) for any items in the "installed" list that don't have a status of "installed". And depending on the status, I either restart the download or redo the installation. As for file integrity, I just check for a known header, but an md5 or other checksum would be better. Update: My app only downloads a single file (sqlite database), so if it gets interrupted it has to start over from the beginning. I enabled deflate on my web server, which NSURLConnection supports, so compression is done transparently. But I'm sure your interest in using a zip file is primarily to make downloading simpler. I had considered using a zip file at one point too, but I was unable to find an easy way to extract it.

Related questions

0 votes
    I'm working on an iPhone app with inApp payment: whenever the user pays a small sum, he receives ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I want to get variable value from an objective-c class, using reflection. company.h looks like @interface ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 28, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 25, 2022 in Education by JackTerrance
0 votes
    I have a UITableView of customers where a row/customer is selected. The user can then push another view ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    I'm pretty new to the iPhone platform, so I'm wondering what the best way to switch between ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    guys, I've been developing an iphone web application for a while, and encountered a weird problem: when ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 26, 2022 in Education by JackTerrance
0 votes
    So my build machine spits out a new executable and I would like to update my test machine with the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    If you're working in your company's system/laptop and suddenly a pop-up window arise asking you to update your ... Security questions and answers pdf, mcq on Cyber Security pdf,...
asked Nov 3, 2021 in Education by JackTerrance
0 votes
    I know there are emulators, but is this good enough? If someone is serious about iPhone development, do ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 15, 2022 in Education by JackTerrance
0 votes
    I am trying to implement a Settings.Bundle based application. For that, I implement Settings.bundle in my ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    What is the functionality of Accelerometer of an iPhone?...
asked Aug 26, 2021 in Technology by JackTerrance
0 votes
    Where can we test the apple iPhone apps if we don’t have an iOS device?...
asked Nov 30, 2020 in Technology by JackTerrance
0 votes
    I am trying to load a log-out URL once the app close button is hit, Something like the following. ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 13, 2022 in Education by JackTerrance
...