I made a request for my client, keeping the target iOS as 4.
But since the application is still not sent to the Apple Store, my client plans to update it for iOS 5.0.
To do this, I read the manual from Apple and found that "only user data or which otherwise could not be recreated by your application should be stored in the / Documents directory, and rest should be stored in the / Library / Caches directory"
In my application, I use the in-app purchase server model for a non-consuming product. To do this, I save all the data you uploaded (mainly books or magazines) to the Documents folder. The database is also present in the same directory that contains information about downloaded products.
My question is
1. Do I have to change my code to store the downloaded data in the Library / Caches directory, and not in the Documents directory?
2. Where should my database file be located (in Documents or Caches)?
If I put it in caches, then I will also have to change the extraction logic, since it is believed that if the record is present in the database, there is no need to change the existence of the file, and it opens immediately when the user clicks on the log.
Please help me in this matter.
Thanks in advance.
UPDATED:
I am updating this for those who are still not sure about this issue.
Using the recommendation of the accepted answer, I implemented this in two of my applications and sent them to the Apple Store. Both were approved in the review.
This can help ensure that the solution proposed in the accepted answer is correct.
objective-c iphone ios5 in-app-purchase
Naved Nov 21 '11 at 9:02 2011-11-21 09:02
source share