apple-dev-mcp
Version:
Complete Apple development guidance: Human Interface Guidelines (design) + Technical Documentation for iOS, macOS, watchOS, tvOS, and visionOS
15 lines (14 loc) • 4.63 kB
Markdown
---
title: Searching
platform: universal
category: navigation
url: https://developer.apple.com/design/human-interface-guidelines/searching
quality_score: 0.39
content_length: 4249
last_updated: 2025-07-20T03:43:43.145Z
keywords: ["searching","universal","navigation","controls","system","selection"]
has_code_examples: false
has_images: false
is_fallback: false
---
June 9, 2025 Updated best practices with general guidance from Search fields, and reorganized guidance for systemwide search. Searching People use various search techniques to find content on their device, within an app, and within a document or file. To search for content within an app, people generally expect to use a search field. When it makes sense, you can personalize the search experience by using what you know about how people interact with your app. For example, you might display recent searches, search suggestions, completions, or corrections based on terms people searched earlier in your app. In some cases, people appreciate the ability to scope a search or filter the results. For example, people might want to search for items by specifying attributes like creation date, file size, or file type. For guidance, see Scope controls and tokens. You can also help people find content within an open document or file by implementing ways to find content in a window or page in your i OS, i Pad OS, or mac OS app. In i OS, i Pad OS, and mac OS, Spotlight helps people find content across all apps in the system and on the web. When you index and provide information about your app’s content, people can use Spotlight to find content your app contains without opening it first. For guidance, see Systemwide search. Best practices If search is important, consider making it a primary action. For example, in the Apple TV, Photos, and Phone apps in i OS, search occupies a distinct tab in the tab bar. In the Notes app, a search field is in the toolbar, making search clearly visible and easily accessible. Aim to make your app’s content searchable through a single location. People appreciate having one clearly identified location they can use to find anything in your app that they are looking for. For apps with clearly distinct sections, it may still be useful to offer a local search. For example, search acts as a filter on the current view when searching your Recents and Contacts in the i OS Phone app. Use placeholder text to indicate what content is searchable. For example, the Apple TV app includes the placeholder text Shows, Movies, and More. Clearly display the current scope of a search. Use a descriptive placeholder text, a scope control, or a title to help reinforce what someone is currently searching. For example, in the Mail app there is always a clear reference to the mailbox someone is searching. Provide suggestions to make searching easier. When you display a personʼs recent searches or offer search suggestions both before and while they’re typing, you can help people search faster and type less. For developer guidance, see search Suggestions(\_:).Take privacy into consideration before displaying search history. People might not appreciate having their search history appear where others might see it. Depending on the context, consider providing other ways to narrow the search instead. If you do show search history, provide a way for people to clear it if they want. Systemwide search Make your app’s content searchable in Spotlight. You can share content with Spotlight by making it indexable and specifying descriptive attributes known as metadata. Spotlight extracts, stores, and organizes this information to allow for fast, comprehensive searches. Define metadata for custom file types you handle. Supply a Spotlight File Importer plug-in that describes the types of metadata your file format contains. For developer guidance, see CSImport Extension. Use Spotlight to offer advanced file-search capabilities within the context of your app. For example, you might include a button that instantly initiates a Spotlight search based on the current selection. You might then display a custom view that presents the search results or a filtered subset of them. Prefer using the system-provided open and save views. The system-provided open and save views generally include a built-in search field that people can use to search and filter the entire system. For related guidance, see File management. Implement a Quick Look generator if your app produces custom file types. A Quick Look generator helps Spotlight and other apps show previews of your documents. For developer guidance, see Quick Look.