gpt4 book ai didi

core-data - 核心数据: "Store in External Record File" vs "Allows External Storage"

转载 作者:行者123 更新时间:2023-12-02 21:35:14 27 4
gpt4 key购买 nike

我实际上有一些与 iOS 上的 Core Data 实体属性设置相关的问题:

  1. “存储在外部记录文件中”仅适用于 Spotlight 集成吗?
  2. “存储在外部记录文件中”仅适用于 Mac 操作系统吗?
  3. 在iOS模拟器上,“外部记录文件”到底存储在哪里?

不要将这些问题与二进制数据属性设置“允许外部存储”混淆。据我所知,该设置会将>1MB 的数据放在存储之外。

  1. 在 iOS 模拟器上,“允许外部存储”存储在哪里?

预先感谢您的帮助!

最佳答案

这在 Core Data Spotlight Integration Programming Guide配置模型部分中有详细描述。 :

To enable Spotlight indexing, you need to specify which properties of which entities should be indexed and which—if any—of those properties should be added to the external record.

In Configuration inspector, for each of the properties that you want to be indexed, select:

Index in Spotlight (Optional) Store in external record file Provided that at least one property for an entity has the “Index in Spotlight” flag set, then whenever a change to an instance of that entity is committed to the persistent store, the corresponding external record file is updated (minimally the last modification date changed). This means that the Spotlight importer will run and so the Spotlight index will be updated with new data.

If you only choose “Index in Spotlight,” Core Data just creates a zero-length file for the corresponding record. If you also select “Store in External Record”, the property is added to the contents of the external record. Simple types, such as strings, dates, and numbers, are exported directly; relationships are stored as UUIDs.

AFAICT:

  1. 不太适用

关于core-data - 核心数据: "Store in External Record File" vs "Allows External Storage",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13090515/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com