What does "Allows External Storage" checkbox in the Attribute Inspector do?

For a bit of context, I store binary files of about 50KB in my Core Data. I noticed that enabling the "Allows External Storage" option doesn't seem to make any difference.

Additionally, how does this setting work with CloudKit when using NSPersistentCloudKitContainer?

Does this setting affect how the data is loaded into memory when accessed in Core Data in the app?

Thank you very much!

Answered by DTS Engineer in 790141022

Checking the “Allows External Storage” option allows Core Data to store the attribute data in external files when the data size is over a certain limit.

When the attribute data size is over the limit (2MB or so but can change), Core Data creates a hidden folder under the parent folder of your store, and save the external data files there.

In your case, you don't see the feature coming to play because your data size isn't big enough (50KB). You should be able to observe the feature working by trying with a bigger file (several MB).

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Checking the “Allows External Storage” option allows Core Data to store the attribute data in external files when the data size is over a certain limit.

When the attribute data size is over the limit (2MB or so but can change), Core Data creates a hidden folder under the parent folder of your store, and save the external data files there.

In your case, you don't see the feature coming to play because your data size isn't big enough (50KB). You should be able to observe the feature working by trying with a bigger file (several MB).

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

What does "Allows External Storage" checkbox in the Attribute Inspector do?
 
 
Q