Fix deprecation warnings.

This commit is contained in:
Brent Simmons 2024-02-24 19:03:20 -08:00
parent 5b1db51fb9
commit 766b5f8869

View File

@ -246,7 +246,7 @@ private extension ActivityManager {
func updateSelectingActivityFeedSearchAttributes(with feed: WebFeed) {
let attributeSet = CSSearchableItemAttributeSet(itemContentType: kUTTypeItem as String)
let attributeSet = CSSearchableItemAttributeSet(contentType: UTType.item)
attributeSet.title = feed.nameForDisplay
attributeSet.keywords = makeKeywords(feed.nameForDisplay)
attributeSet.relatedUniqueIdentifier = ActivityManager.identifier(for: feed)
@ -265,7 +265,7 @@ private extension ActivityManager {
// itself because the relatedUniqueIdentifier on the activity attributeset is populated.
if let attributeSet = activity.contentAttributeSet {
let identifier = attributeSet.relatedUniqueIdentifier
let tempAttributeSet = CSSearchableItemAttributeSet(itemContentType: kUTTypeItem as String)
let tempAttributeSet = CSSearchableItemAttributeSet(contentType: UTType.item)
let searchableItem = CSSearchableItem(uniqueIdentifier: identifier, domainIdentifier: nil, attributeSet: tempAttributeSet)
CSSearchableIndex.default().indexSearchableItems([searchableItem])
}