What is the maximum amount of data an iOS app can handle? - ios

Right now we are designing an app in Swift that fetches HTML applications from a server in form of zip files and then run it in the iOS app as an web view. Each zip files is of approx 4-5 mb in size. We have 30+ HTML applications in our app as of now. But we may reach to 150-200 apps soon enough. I would like to know the maximum amount of data that an iOS app can handle. If excess amount of data gets deleted, where will it go? Will it be stored in iCloud before the data gets deleted? Please help me. P.S. The HTML applications will be downloaded from the servers in form of zip files , it'll be extracted and then will be stored as a folder. When the user first installs the app in his system , he won't have any html applications installed. He'll have to fetch the apps one by one according to his requirements.

Since you're saving the content to disk, the limitation is the disk size of the user's device. It also depends on where you're saving the data: If you save to the tmp directories, the data may get deleted, but if you're saving to the application's normal directory it will also be backed up to iCloud (assuming the user backs up).
I would advise against filling up the user's phone with hundreds of MB of data automatically, they will get very annoyed at you. So you will want to offer them a UI to actually select which content they want to keep and which should be removed.

No limit as far as I know.
But be aware that all files you download and store in the app have to be marked as "do not backup in iCloud" - otherwise Apple will reject your binary when you submit it to the store.
See
Apple Documentation and
Excluding files from iCloud Backup
My advice,
Don't download all the applications at once, instead provide user a UI from which he can able to select any application (only one at a time, because at any point he'll be able to run single app only, I guess), then download that particular application (also removed if any previous installed app found).
But wait, there's one more option, you can keep 3 apps at a time, and I believe they wouldn't cost you more than 20Mbs (as you said, 4-5Mbs / app). If so user may have feel of switching between (last used) three apps. If he want any other application then he can select any app, here you need to delete (a app from last three) and add newly downloaded app, this means at any point you'll have 3 apps in your directory.
Now the problem of preserving user information (for individual apps), here you can use any local db (or your server or any third party servers) to store (preserve) user information for particular app. At any point he'll delete the app (you should keep backup of it before deletion will be made).
Later, when he changed his mind, and download the app (previously deleted), then you can restore the information (which was preserved before).
Good luck! Don't wash your hands :)

Related

Share database [core data] between different devices, not just the user's ones

What is the best way, to share a database between different devices, that are not just the user’s ones, but for example could be his friend’s phone. That means that iCloud is not an option.
Example:
 All of my data is app-user specific, so basically:
user logs into my app, do some work
then he can log in with the same acc on his friend phone and data should be the same
Is there an any way to upload the whole user specific database to some online storage provider (like firebase,… ) and then download it on another device and initialise core data stack, when the same user logs in on a different device?
Or is it the only way to sync data with the server and than preload the database?
You could simply upload the whole database file(s) and then download it on another device. The problem though is portability. You need to ensure that both devices support the same version of the database so they are compatible. To port the same thing to another platform is again a different story but doable when not using core data.
Then there is a problem of conflicts. Imagine you forget to log out from the second device and you open it after a week and the database is accidentally synced back to the server. This will make you lose all the data you created on your "main" device.
So in general it is possible to sync the whole thing but you will have loads of issues. You should create a server that supports all entities and works through ids (so you know the object was modified and not created) and date modified to be able to resolve conflicts.
Syncing data between multiple devices is the biggest reason to use something like Firebase. That's one of its primary purposes. You would use Firebase for data storage instead of Core Data, and it would automatically handle syncing between devices. You don't write code to upload or download anything, you just read and write Firebase data and it handles the syncing. It supports user accounts, so if a user logs on on a different device, their data automatically syncs to that device. There are numerous other options besides Firebase, of course.
CloudKit also syncs between different devices, but it's linked to the current iCloud account on the phone. Since you want in-app login, it's not so good.

Packing IOS App with Large Amount of Data

How can I have the customer of an IOS app select and change selection data for use with an app?
I have an app that is designed to operate away from wifi. As such, it needs to carry its data around with it. This makes the data requirements rather large.
A base package is 25MB of data. However, it is likely people who use this app would want as much as 1GB of data.
Is it possible to do selective data downloads and updates from the app store?
How else could this be done
How can I have the customer of an iOS app select and change selection of data for use with an app?
Hard to say. It's not clear what you're talking about. Downloading data through an app is a well researched topic. You shouldn't have any trouble finding examples for downloading data to an app, here or elsewhere.
Is it possible to do selective data downloads and updates from the app store? How else could this be done?
Again, its not 100% clear what you mean. I don't think you can use the app store to provide new data to users who downloaded your app, unless you're talking about a full app update that comes bundled with your new data set.
I worked on a project once that had to work offline, but also work with a very large data set as well as some mapping components. We required users to first download our app, then after authenticating, the app would automatically download a cache of data while connected to a WiFi hotspot. When the user was out of WiFi range the app would operate off the data set they downloaded and would operate normally. When they came back into range it would ping the server to find out if their data was stale. If it was stale it would download new data. The WiFi connection requirement ensured that they would have an optimal experience fetching the latest data.
My thought is to create a menu in your app that lets the user select which "packages" of data they want to save to their device and run those downloads in the background when the user has an internet connection.

Best place for saving user data for Windows Store App

Disclaimer: I am new to Windows Store App development.
My app is a Windows Store App (for desktop). The app has to create some content using user's input and the data can be considered as documents. Also, the document'd be in a proprietary format. The user should be able to see all those documents listed inside the app every time he launches it.
My question is where to save these document files. I have no issue it is directly accessible to users without using app (it is their data).
The document suggest roaming (limited storage) and local storage. But both are deleted once the app is deleted (bad for the user).
http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
Document also states that accessing right for My Document folder is granted only if the developer is a company (bad for me).
http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx
Any other popular pattern from developers (apart from Azure, SkyDrive and any online storage)?
On app's first launch, you can allow the user to choose his/her folder as per choice, and then add that folder in future access list. So you can access that folder anytime. Please check below given links.
How can I save a StorageFile to use later?
Exploring WinRT: Storage.AccessCache
Windows.Storage.AccessCache Classes

iOS App Memory Limit

I wrote an iphone app that as a first function allows the user to download files. The user then manipulates these files in a particular way that wants them to be in memory.
It's not necessary that all of the files the user gets are in memory, just a few at a time that are well within memory constraints. However, the option to download the rest later is not available because of location assumptions (mainly that there is no assumption the user will be within wifi or data reception).
Is there a way around this? One example would be to have some sort of permanent write that I could access. Is that how the file storage apps solve this?
Thanks.
Could you use a server to do the manipulation instead of the app? iphone app sends the link to the server, server does the manipulation, and the the iphone downloads the manipulated link.

Apple Itunes app limitations

I have a iPhone game that I am creating and wanted to know a couple limitations
once the person downloads the game and they sign in with a user name I want them to be able to download new content maps packs etc. What is the limit in size these downloads can be?
where can this content be stored?
I believe the max size of your app is 2GB.
As for storing content:
For security purposes, an application has only a few locations in which it can write its data and preferences. When an application is installed on a device, a home directory is created for the application. Table 6-1 lists some of the important subdirectories inside the home directory that you might need to access. This table describes the intended usage and access restrictions for each directory and whether the directory’s contents are backed up by iTunes. For more information about the backup and restore process, see “Backup and Restore.” For more information about the application home directory itself, see “The Application Sandbox.”
Source and Table 6-1: http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/FilesandNetworking/FilesandNetworking.html
The download limits are based on the network they are attached to and may be different in different markets. Over 3G the limit is now 20MB it used to be 20MB IIRC. There is no cap over wifi or directly syncing via iTunes.

Resources