On Jun 18, 2012, at 5:08 PM, William Squires wrote: > I know iOS will give your app the didReceiveMemoryWarning:, but what about > if you try to use all the available space? (i.e. your iDevice is stuffed with > music, videos, apps, photos, and so on) Should the app just catch an > NSException?
Fundamentally, you'll get errors from file operations that fail due to insufficient disk space. The errors depend on the API; e.g. for POSIX calls you'll see ENOSPC. However, running out of disk space is a pretty bad situation for the OS as a whole, so generally it doesn't let things get that far. As disk space runs out it'll start notifying the user, and it might also start freezing apps (OS X does this.) In the worst case, you can pretty much lock up the whole device if space runs out. If your app has the potential to create large files, it would be polite to preflight disk space and stop writing if the free space gets below a few hundred megabytes. —Jens
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com