View in English

  • Global Nav Open Menu Global Nav Close Menu
  • Apple Developer
Search
Cancel
  • Apple Developer
  • News
  • Discover
  • Design
  • Develop
  • Distribute
  • Support
  • Account
Only search within “”

Quick Links

5 Quick Links
  • Predicate format strings

    Formatting strings for creating predicates.

    • DOCUMENTATION ARTICLE
    • Swift
  • predicateFormat

    • Foundation
    • NSPredicate
    • predicateFormat

    The predicate’s format string.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • predicateFormat

    • AppKit
    • NSBindingOption
    • predicateFormat

    An NSString object containing the predicate pattern string for the predicate bindings. Use $value to refer to the value in the search field.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • predicateWithFormat:

    • Foundation
    • NSPredicate
    • predicateWithFormat:

    Creates and returns a new predicate formed by creating a new string with a specified format and parsing the result.

    • DOCUMENTATION
    • Objective-C
  • Predicate

    • Foundation
    • Predicate

    A logical condition used to test a set of input values for searching or filtering.

    • DOCUMENTATION
    • Swift
  • Predicate(_:)

    • Foundation
    • Predicate(_:)

    • DOCUMENTATION
    • Swift
  • predicate

    • CloudKit
    • CKQuery
    • predicate

    The predicate to use for matching records.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • predicate

    • Foundation
    • NSExpression
    • predicate

    The predicate of a subquery expression.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • predicate

    • AppKit
    • predicate

    See Cocoa Bindings Reference for more information.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • predicate

    • AppKit
    • NSRuleEditor
    • predicate

    The rule editor’s predicate.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • predicate

    • CloudKit
    • CKQuerySubscription
    • predicate

    The matching criteria to apply to records.

    • DOCUMENTATION
    • Swift
    • Objective-C
  • NSLocaleSensitivePredicateOption

    Indicates that strings to be compared using <, <=, =, =>, > should be handled in a locale-aware fashion.

    • DOCUMENTATION ARTICLE
    • Swift
    • Objective-C
  • String Format Specifiers

    Explains how to create, search, concatenate, and draw strings in Cocoa.

  • Predicate Programming Guide

  • Spotlight Importer Schema Format

    Describes the role of metadata importers and how to write them.

  • Media Extension Format Reader- Glossary

    This entitlement is intended for the development of Media Extension format readers for professional video and camera use cases.

    • SUPPORT
  • Time Of Day Data Format

    Specifies the Apple Core Audio Format (CAF) for audio files.

  • Overview of the Mach-O Executable Format

    Guidelines for reducing the size of an application binary.

  • Adding Actions to the Context Menu

    Present custom actions from your File Provider extension in the system’s file browser.

    • DOCUMENTATION ARTICLE
    • Swift
    • Objective-C
  • Apple Core Audio Format Specification 1.0

  • Comparison of NSPredicate and Spotlight Query Strings

    Describes how to specify queries in Cocoa.

  • MPEG-2 Stream Encryption Format for HTTP Live Streaming

  • Format reader property list dictionaries

    Include property list dictionaries to describe a format reader and register the formats it supports.

    • DOCUMENTATION ARTICLE
    • Swift
    • Objective-C
  • Foundation updates

    Learn about important changes to Foundation.

    • DOCUMENTATION ARTICLE
    • Swift
  • Retrieving events and reminders

    Fetch events and reminders from the Calendar database.

    • DOCUMENTATION ARTICLE
    • Objective-C
    • Swift
  • Retrieving events and reminders

    Fetch events and reminders from the Calendar database.

    • DOCUMENTATION ARTICLE
    • Swift
    • Objective-C
  • Executing Activity Summary Queries

    Create and run activity summary queries.

    • DOCUMENTATION ARTICLE
    • Swift
  • Processing status for managed apps

    Process the status that declarative management reports for managed apps.

    • DOCUMENTATION ARTICLE
  • Executing Sample Queries

    Create, run, and sort sample queries.

    • DOCUMENTATION ARTICLE
    • Swift
  • Designing for CloudKit

    Describes how to incorporate iCloud into your app.

  • Creating Predicates

    Describes how to specify queries in Cocoa.

  • File Metadata Query Expression Syntax

    Describes how to add Spotlight searching to your applications.

  • Document Revision History

    Describes how to create an iOS application whose documents are integrated with iCloud storage.

  • Creating the Managed Object Model

    A hands-on guide to creating a command-line utility using low-level features of Core Data.

  • App Extension Keys

    Describes the keys for a bundle's Info.plist file.

  • Avoiding Injection Attacks and XSS

    Describes techniques to use and factors to consider to make your code more secure from attack.

  • Number Formatters

    Explains how to use Cocoa formatters to create and validate text in text fields and other cells.

  • iCloud File Management

    Explains how to create and manage files and directories.

  • iCloud Fundamentals (Key-Value and Document Storage)

    Describes how to incorporate iCloud into your app.

  • Managing the Life Cycle of a Document

    Describes how to create an iOS application whose documents are integrated with iCloud storage.

  • Searching File Metadata with NSMetadataQuery

    Describes how to add Spotlight searching to your applications.

  • Querying an XML Document

    Explains how to use the NSXML classes of Cocoa to process, modify, and query XML data.

  • Synchronization

    Explains how to use threads in Cocoa applications.

  • Using Asset and Location Fields

    Describes how to use APIs and tools to create a CloudKit app.

  • Using Predicates

    Describes how to specify queries in Cocoa.

  • 19:08

    SwiftData: Dive into inheritance and schema migration

    Discover how to use class inheritance to model your data. Learn how to optimize queries and seamlessly migrate your app's data to use inheritance....

    • WWDC25 VIDEO
    • 00:07:14

      The selected segment can be used to drive a predicate that will determine

    • 00:07:26

      We then provide the predicate and sort by the trip startDate

    • 00:11:35

      We last updated the query with the chosen segment via Predicate.

    • 00:11:48

      We start by building a predicate with the searchText provided.

    • 00:11:54

      And if not, we build a compound predicate to see if the trip’s name

    • 00:12:01

      Next, let’s build a compound predicate with the search predicate

    • 00:12:05

      and the class predicate.

    • 00:12:10

      to take the new compound predicate.

  • 25:13

    Meet the HealthKit Medications API

    Discover the new Medications API in HealthKit. Explore an example app that uses the new API, learn how to access medications and doses, and find out...

    • WWDC25 VIDEO
    • 00:08:17

      If the query descriptor is configured with a predicate,

    • 00:08:20

      your app will only receive medications that match that predicate.

    • 00:12:32

      For this query there is no predicate or limit needed,

    • 00:13:44

      I set up a compound predicate,

    • 00:13:55

      To see more details of how I configured this sample predicate,

    • 00:20:49

      I’ll use the same predicate for fetching doses by medication

    • 00:20:54

      but I’ve replaced the predicate for today,

    • 00:21:01

      To see more details of how I configured this predicate,

  • 13:52

    Create a custom data store with SwiftData

    Combine the power of SwiftData's expressive, declarative modeling API with your own persistence backend. Learn how to build a custom data store and...

    • WWDC24 VIDEO
    • 00:00:23

      file format, or persistence backend of your choice.

    • 00:04:55

      to read and write model data to any storage format.

    • 00:09:29

      Currently, this implementation doesn't process the predicate

    • 00:09:36

      The translation of a Predicate or sort comparator can be an involved process,

    • 00:09:52

      when the request contains a predicate or sort descriptor.

    • 00:12:48

      to any storage format or persistence backend.

  • 14:01

    What’s new in SwiftData

    • WWDC24 VIDEO
    • 00:06:03

      I’ve implemented my own custom document format made of JSON files.

    • 00:06:24

      no matter what format the data needs to be persisted with.

    • 00:09:35

      #Predicate facilitates filtering, and can be evaluated during the data queries,

    • 00:09:49

      the searchText can be used to build a predicate

    • 00:09:56

      Building a predicate is easy,

    • 00:10:07

      So I will build a compound predicate to also check

    • 00:10:12

      That was all it took to build a compound predicate,

    • 00:10:59

      I will start by building a predicate.

  • 14:20

    Explore wellbeing APIs in HealthKit

    Learn how to incorporate mental health and wellbeing into your app using HealthKit. There are new APIs for State of Mind, as well as for Depression...

    • WWDC24 VIDEO
    • 00:09:05

      With the Valence predicate, you can fetch samples by how pleasant they are.

    • 00:09:17

      And with the Associations predicate,

    • 00:10:34

      First, I’ll create a query predicate to fetch all samples in a specific date range

    • 00:10:46

      to find samples that match the predicate.

    • 00:11:38

      Here, we use both an association and label predicate

  • 15:35

    Dive deeper into SwiftData

    • WWDC23 VIDEO
    • 00:12:19

      using the new Predicate macro.

    • 00:12:39

      Predicate uses the Models you create

    • 00:12:48

      FetchDescriptor combines the power of the new Foundation Predicate macro

    • 00:15:15

      like never before with FetchDescriptor, predicate, and enumerate.

  • 22:16

    Discover Calendar and EventKit

    Discover how you can bring Calendar into your app and help people better manage their time. Find out how to create new events from your app, fetch...

    • WWDC23 VIDEO
    • 00:15:41

      Then, create a predicate.

    • 00:16:15

      Once you have full access, create a predicate

    • 00:16:22

      The predicate describes which events you want to fetch

    • 00:16:42

      Finally, fetch the events by passing the predicate

  • 29:05

    High Efficiency Image File Format

    Learn the essential details of the new High Efficiency Image File Format (HEIF) and discover which capabilities are used by Apple platforms. Gain...

    • WWDC17 VIDEO
    • 00:00:25

      File format or HEIF and the many

    • 00:00:30

      format standard affords.

    • 00:00:51

      new image format.

    • 00:01:09

      the HEIF file format.

    • 00:03:00

      The new format needs to support

    • 00:03:13

      The new format also needs to be

    • 00:03:42

      The format needs to be friendly

    • 00:04:52

      The new common format needs to

  • 24:25

    What's new in HealthKit

    • WWDC22 VIDEO
    • 00:03:32

      We added a new predicate to make it easy to read sleep samples

    • 00:03:44

      First, I create a predicate

    • 00:03:55

      I create a predicate for my query

    • 00:04:00

      and the sleep stage predicate.

    • 00:04:02

      And with this query predicate, I can now create my query.

    • 00:04:23

      to use the new .allAsleepValues when building your predicate.

    • 00:06:35

      with a predicate to match calorie samples.

    • 00:13:50

      First, I start by creating a predicate using the new

  • 15:48

    Meet Focus filters

    • WWDC22 VIDEO
    • 00:13:08

      This filter predicate works in conjunction

    • 00:13:21

      the filter predicate, the notification is silenced.

    • 00:13:26

      To set the filter predicate from your FocusFilterIntent,

    • 00:13:40

      in this case, I set up the filter predicate

    • 00:14:09

      because the account identifier does not match the predicate

Developer Footer

  • Search
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • App Store
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Fonts
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Open Source
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Sample Code
    • Tutorials
    • Downloads
    • Forums
    • Videos
    Open Menu Close Menu
    • Support Articles
    • Contact Us
    • Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Get the Apple Developer app.
    Copyright © 2025 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines