Storing pictures in iCloud - ios

I'm currently working on a concept for a new iPhone app, the would involve some very basic profile system.
Since all the other data will be stored in iCloud, I was wondering if it would be possible to store pictures in the cloud too.
I see that the storage per app is only 1MB, so this seems extremely low to store pictures.

The 1 MB limit is for Key-Value storage only (and KV storage is inappropriate for images for other reasons, too). If you use the Documents in the Cloud APIs, your app can store a large number of large files, limited only by how much space the user has (or hasn't) paid for. (Though it's wise to use that space judiciously and efficiently, as your potential customers won't be happy if your app alone causes them to blow the storage limits on their account.)

Related

iOS : Is it possible to allocate free disc space just for reading in an iOS app

I am interested to know if it is possible to allocate free disc space just for reading in an iOS app. The background of this question is a security issue.
Say you have an app A running in sandbox that stores user documents in its app private folder. This data uses some disc space that is only reachable from app A. Because of the sandbox an app B cannot access this user documents. If app A deletes the user documents there will be only deleted the inodes that references the documents. The disc space that is used by the documents are already there but nobody links to it and is so marked as free disc space. If app B now allocates the whole free disc space and reads bytewise the whole allocated space, where also the user documents are, app B can access the user documents. Theoretically.
To protect the user documents there are some ideas. The first is the encryption of the documents. By deletion they are still encrypted. But they are also still accessible. The next idea is to override the documents before deletion. But the disc space is a Flash storage what means that at the moment the data will be changed they are moved nondeterministically to other locations in the Flash. That means this does also not help.
I figured out that it is possible to allocate free heap space by using
UnsafeMutableRawPointer.allocate and read then bytewise the allocated space with UnsafeMutableRawPointer.load. I don't know if this is also possible for disc space. In this article I read that there are three options to access the disc space FileHandle, FileManager, and Data. But all of them, so I think, can only read files not bytes of disc space.
In the documentation archive from Apple, I can not find an answer, if this scenario is really possible or not. I hope someone else have a tip where I can find the information that I am looking for or maybe have an answer for my question.
Each file on the file system is encrypted with a unique key; even if a malicious app was to request a disk allocation and attempt to read the free space, it would not obtain any information since it would not posses the necessary decryption keys.
You can read more about this in The iOS security publication from Apple:
File Data Protection
In addition to the hardware encryption features built into iOS devices, Apple uses a technology called Data Protection to further protect data stored in flash memory on the device. Data Protection allows the device to respond to common events such as incoming phone calls, but also enables a high level of encryption for user data. Key system apps, such as Messages, Mail, Calendar, Contacts, Photos, and Health data values use Data Protection by default, and third-party apps installed on iOS 7 or later receive this protection automatically.

What is the maximum database size (50 MB or 100 MB or 150MB ) that can be saved in local datastore in ios by using Parse API

I need to store maximum data in local Datastore by using Parse API in iOS HYDRIDE APPLICATION. Can any one tell me how much (Maximum) of data is store in local datastore according to Parse API.
Thank you,
Madhav
Think about Parse as a business. How does Parse make money? Off of queries and API request limits. If you go over a threshold of API request per second they charge you fees right? Thats how they make money, so more the better to them. So essentially you surpass their 30 per second then you may be subject to fees. Just remember your app can be as large as 2GB, but don't neglect your core audience and force them to download a 2GB app when you can update information as necessary. However, with that being said, any device, computer, regardless of its capacity, has limitations when memory and disk space is taken into consideration. Parse is an online resource, you should use it for that. PFQueryTableViewController is a powerful tool for Parse related executions, you should take advantage of that.
You can also set limits to queries with Parse, which is a good thing for those that like free stuff.
Also, here is a reference to your same question worth reviewing:
What is the maximum stoarge limit for parse local data store in android

Reading/Writing to/from iPhone's Documents folder performance

I have got an iPhone application where I archive permanent data in the documents folder of the application (arrays, dictionaries). I read/write from and to the documents folder quite frequently and I would like to know whether this is considered a bad habit. Wouldn't it be better if I had a singleton class, read and write to arrays there and then, only when the application quits, write this data to the documents folder ? I do not see/feel any performance issues right now on my iPhone 5, but I wanted to know whether this is a bad practise.
FLASH memory has limited write capability - a long time ago it was rated in some increment of thousands. Not sure where it is today.
That said, if your app is using the standard file system APIs, then the system is using the file cache, and you might open a file, read it then change it many times without the file system ever writing to flash. The system may sync to flash occasionally, but that process is opaque - no way to really know when or why iOS does it.
The UNIX APIs allow for syncing the file system cache to the storage system (iOS this is FLASH), but if you are not using that then you are probably not doing much I/O at all given what you say above.
Given the lack of Apple discouraging developers from writing to the file system, I for sure would not worry about this.
But, if you said you were writing gigabytes of image data every few minutes - well - that might be a problem.

Core data storage limit, Cache Limit, RAM limit on iphone

I am making a some complex app, in which every detail is imp. i have some questions
1. how much storage limit we have, if we plan to save big files on core data/cache.
2. Whats the RAM limit on iphone? Actually searching for some table that can give detailed info about IOS devices on this. Because i need to handle memory warnings and defend App crashes.
3. Its better to save images in cache or core data, assume you have a lot of images approx. 200-250.
Thanks
1) I am not aware of any storage limit. Obviously, you will never get 64GB or more - since no device is larger ;-). My wife's facebook app consumes >5GB at the moment... I suppose they did something wrong. The only important point is to fail gracefully (show a dialog, clean some space, ...) if the storage is full.
2) The RAM limit varies depending on the iPhone model and the currently running applications. Also there are some iPods with less memory in market. 30MB should be pretty safe. Total physical memory of the device can be retrieved as described here while retrival of the available RAM can be derived from that question.
3) Maybe this is a good starting point. I would always write image data to the file system and just store the file name inside the database, as suggested here.

iPad local data storage limit

Can anyone tell me what is the maximum size that can be download from the web
and can be stored locally.
The limit is 5 MB.
See also this S.O. post.
You could also have a look at this if you are interested in going beyond that limit.
EDIT: after your comment I see you are not referring to local web storage. Local web storage is a new possibility offered by HTML5 to store key-value pairs. This has got the limitation I was mentioning.
As to your case, I don't think that there is some restrictive limit on the amount of data you can download and store locally (in your Documents directory) in order to access it later. You can check this, where answers range from a minimum of 2GB of flash space to no limit at all. So you can be safe.
If you are referring to the limit in the total amount of data you can download over 3G connections (also called over-the-air download), this is 20MB. You are only allowed to download a larger file when using Wi-Fi.

Resources