Spotlight Search Integration for iOS Apps

Spotlight Search Integration for iOS Apps Instead of navigating through an app's interface, users increasingly search for content directly from the system Spotlight search. Integrating Spotlight Search with CoreSpotlight and NSUserActivity makes your content discoverable, boosting repeat visits b

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Spotlight Search Integration for iOS Apps
Medium
~2-3 days

Our competencies:

Frequently Asked Questions

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    895
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    782
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1216
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1079
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    1002
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    597

Spotlight Search Integration for iOS Apps

Instead of navigating through an app's interface, users increasingly search for content directly from the system Spotlight search. Integrating Spotlight Search with CoreSpotlight and NSUserActivity makes your content discoverable, boosting repeat visits by 30%. Over 7 years we have implemented indexing for 15+ iOS projects — from startups to enterprise — and know how to correctly configure CoreSpotlight, NSUserActivity, and Siri Shortcuts.

We share practical experience: how using batch indexing reduces catalog update time from 5 minutes to 40 seconds for 10,000 products, how to avoid common mistakes with domainIdentifier, and how to set up deep links that work even in iOS multi-window mode.

What Problems Spotlight Search Integration Solves

Spotlight Search addresses three key tasks: quick access to content, increased engagement, and system integration. Users find products, articles, or contacts directly from the home screen without opening the app. Conversion to repeat visits increases by 20–30%. NSUserActivity and Siri Suggestions prompt users to continue recent actions, increasing session time. Deep links from Spotlight, Universal Links, and Handoff allow seamless return to the app.

Typical Indexing Mistakes

  • Missing domainIdentifier — all elements mix together, making deletion by type difficult.
  • Indexing items one by one on each load — causes frequent reindexing and battery drain.
  • Not handling NSUserActivity in multi-window mode — the deep link may fail in scene(_:willConnectTo:options:) or scene(_:continue:).

How We Do It: Tech Stack and Configs

We use three APIs depending on content type:

API Purpose When to Use
CSSearchableIndex Persistent content index (articles, products) On data load from backend
NSUserActivity Current activities (viewed pages) In viewDidAppear / viewDidDisappear
AppIntents + CoreSpotlight Siri Shortcuts and voice search iOS 16+, for quick commands

Case Study: Catalog with 10,000 Products

For a client running an e‑commerce store with a catalog of 10,000 products, we used batch indexing via CSSearchableIndex.default().indexSearchableItems(_:), sending 100 items at a time with a pause between batches. For each product we created a CSSearchableItem with uniqueIdentifier = "product-\(product.id)" and domainIdentifier = "products". After each server sync we updated only changed records using fetchLastClientState() and beginBatch()/endBatch(). The result: full reindexing time dropped from 5 minutes to 40 seconds — roughly 15 times faster than one-by-one. Batch indexing also reduces battery load and provides atomic updates.

What to Do If a Deep Link from Spotlight Fails

Deep links from Spotlight are handled via NSUserActivity. Ensure that uniqueIdentifier matches the one passed in application(_:continue:restorationHandler:). In SwiftUI use the .onContinueUserActivity modifier. Here is a minimal implementation:

func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { guard userActivity.activityType == CSSearchableItemActionType, let identifier = userActivity.userInfo?[CSSearchableItemActivityIdentifier] as? String else { return } // Navigate to content with identifier } 

Check that activityType is set to CSSearchableItemActionType and that uniqueIdentifier is correct with no extra characters. In multi‑window mode, ensure handling is also implemented in the UISceneDelegate.

Our Work Process

  1. Analysis — study content structure and indexing requirements (data types, depth, need for Handoff).
  2. Design — choose API, design uniqueIdentifier and domainIdentifier scheme, define index update logic.
  3. Implementation — implement indexing, deep link handling, support for multi‑scene launch.
  4. Testing — verify all scenarios: search, transition, index deletion, parallel operation of multiple scenes.
  5. Deployment — publish to App Store, set up error monitoring via Crashlytics.

What’s Included

  • Indexing of main content via CSSearchableIndex.
  • Adding NSUserActivity for recent actions.
  • Handoff and Siri Suggestions support.
  • Deep link handling from Spotlight and Universal Links.
  • Removal of outdated entries when content is deleted.
  • Documentation on indexing and instructions for content managers.

Estimated Timelines

  • Basic indexing — 1 to 2 weeks. Includes indexing one content type and deep link handling.
  • Full integration — 3 to 5 weeks. Includes batch indexing, NSUserActivity, Siri Shortcuts support, and index updates.
  • Pricing is calculated individually based on catalog size and deep link scheme complexity. Contact us for a free project assessment.

Why Batch Indexing Is More Efficient

For large volumes, use the transaction model:

CSSearchableIndex.default().fetchLastClientState { state, error in let batch = CSSearchableIndex.default() batch.beginBatch() // Add items batch.indexSearchableItems(items) batch.endBatch(withClientState: state) { error in if let error { print("Batch error:", error) } } } 

This approach is roughly 15 times faster than one‑by‑one indexing and updates the index atomically.

Parameter One‑by‑one indexing Batch indexing
Speed ~5 minutes per 10,000 ~40 seconds
Battery load High Low
Atomicity No Yes

Why Removing Outdated Content Matters

If you do not delete removed products or articles from Spotlight, users will follow a link and see an empty screen. This reduces trust in the app. Delete items via deleteSearchableItems(withIdentifiers:) or deleteSearchableItems(withDomainIdentifiers:) immediately after removing from the database.

Additional Recommendations

  • Do not index private data (personal messages, passwords) without explicit consent — Apple checks this during review.
  • Use isEligibleForPrediction = true for Siri Suggestions to have the app suggested in Siri.
  • Respect limits: maximum item size 64 KB, no more than 1000 items per indexSearchableItems call.

Request a consultation — we will assess your project for free and suggest the optimal solution. Contact us to discuss integration details.

Core Spotlight