草庐IT

tomAttributeKey

全部标签

ios - 如何使用 CSCus​​tomAttributeKey 从 Spotlight 获取自定义值

我正在尝试从CoreSpotlight取回一些数据,我正在使用自定义属性键存储这些数据。在macOS和iOS上也进行了测试,结果始终相同。我的测试类:importCoreSpotlightclassSpotlightSearch{letdomainId="com.company.some"letoriginalDataKeyName:Stringinit(){self.originalDataKeyName=domainId.replacingOccurrences(of:".",with:"_")+"_originalData"}funcaddToIndex(title:String