Abhinav
Abhinav

Reputation: 38162

What is maximum storage capacity of Core Data?

  1. What is the maximum storage capacity of Core Data?
  2. Is there any capacity limit defined at the app level? Like, out of total available Core Data space, my app can consume only X amount?
  3. What if my app tries to exceed the X?

Upvotes: 11

Views: 7311

Answers (1)

Lily Ballard
Lily Ballard

Reputation: 185681

Core Data has no hard storage capacity, so you're pretty much just limited by the available disk space on the system. On iOS (and most of the time on OS X) Core Data is backed by SQLite, so if there's any restriction, it's in the size of the backing SQLite database. Unsaved data is stored in RAM, and iOS does not support paging out memory, so your unsaved data set is limited by the available RAM on the device. If you try to exceed the RAM, your app will be shut down. If you try to exceed disk space, I imagine the save action will fail with an appropriate NSError.

Upvotes: 19

Related Questions