How to decide which one is most suitable among CoreSpotlight framework & NSUserActivity for Search Programming.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
CoreSpotlight
NSUserActivity
In addition to @sash 's answer, you may want to watch WWDC 2015 Session 709 Introducing App Search
The same
userActivity
inapplication(_:continueUserActivity:restorationHandler:)
hasactivityType == CSSearchableItemActionType
CSSearchableItemAttributeSet
to describe attributeThe differences
CoreSpotlight
CSSearchableItem.attributeSet
NSUserActivity
contentAttributes
eligibleForPublicIndexing
More about
NSUserActivity
becomeCurrent
is for Handoff to start the broadcasting processeligibleForHandoff = false
andeligibleForSearch = true
to get the nearly same effect asCoreSpotlight
NSUserActivity
objects around until the index work finishesDesigned to work together
More resources