What's New / Apple Intelligence, ML & Evaluation

What's new in VisualIntelligence

+8 NewiOS · macOS

Visual Intelligence lets an app contribute semantic content to the system's visual search, so the system can surface and act on items the app knows about.

8 new APIs, no deprecations or removals. The addition is the SemanticContentDescriptor struct, which describes content an app contributes to visual search. It carries the associated types Specification, UnwrappedType, and ValueType.

New

8
extension

SemanticContentDescriptor

NewiOSmacOS
extension SemanticContentDescriptor : IntentValueConvertible
Declaration
extension SemanticContentDescriptor : IntentValueConvertible {
}
struct

SemanticContentDescriptor

NewmacOS
public struct SemanticContentDescriptor : Sendable
Declaration
public struct SemanticContentDescriptor : Sendable {

    public let labels: [String]

    /// The pixel buffer of the scene from Visual Intelligence.
    public var pixelBuffer: CVReadOnlyPixelBuffer? { get }
}
extension

SemanticContentDescriptor

NewmacOS
extension SemanticContentDescriptor
Declaration
extension SemanticContentDescriptor {

    /// A string that uniquely identifies this type.
    public static var persistentIdentifier: String { get }

    public static var defaultResolverSpecification: some ResolverSpecification { get }

    /// A short, localized, human-readable name for the type.
    public static var typeDisplayRepresentation: TypeDisplayRepresentation { get }

    /// The visual elements to display when presenting an instance of the type.
    public var displayRepresentation: DisplayRepresentation { get }

    @available(macOS 27.0, iOS 26.0, macCatalyst 27.0, *)
    public typealias Specification = some ResolverSpecification

    @available(macOS 27.0, iOS 26.0, macCatalyst 27.0, *)
    public typealias UnwrappedType = SemanticContentDescriptor

    @available(macOS 27.0, iOS 26.0, macCatalyst 27.0, *)
    public typealias ValueType = SemanticContentDescriptor
}
extension

SemanticContentDescriptor

NewmacOS
extension SemanticContentDescriptor : Codable
Declaration
extension SemanticContentDescriptor : Codable {

    /// Encodes this value into the given encoder.
    ///
    /// If the value fails to encode anything, `encoder` will encode an empty
    /// keyed container in its place.
    ///
    /// This function throws an error if any values are invalid for the given
    /// encoder's format.
    ///
    /// - Parameter encoder: The encoder to write data to.
    public func encode(to encoder: any Encoder) throws

    /// Creates a new instance by decoding from the given decoder.
    ///
    /// This initializer throws an error if reading from the decoder fails, or
    /// if the data read is corrupted or otherwise invalid.
    ///
    /// - Parameter decoder: The decoder to read data from.
    public init(from decoder: any Decoder) throws
}
extension

SemanticContentDescriptor

NewmacOS
extension SemanticContentDescriptor : CustomStringConvertible
Declaration
extension SemanticContentDescriptor : CustomStringConvertible {

    /// A textual representation of this instance.
    ///
    /// Calling this property directly is discouraged. Instead, convert an
    /// instance of any type to a string by using the `String(describing:)`
    /// initializer. This initializer works with any type, and uses the custom
    /// `description` property for types that conform to
    /// `CustomStringConvertible`:
    ///
    ///     struct Point: CustomStringConvertible {
    ///         let x: Int, y: Int
    ///
    ///         var description: String {
    ///             return "(\(x), \(y))"
    ///         }
    ///     }
    ///
    ///     let p = Point(x: 21, y: 30)
    ///     let s = String(describing: p)
    ///     print(s)
    ///     // Prints "(21, 30)"
    ///
    /// The conversion of `p` to a string in the assignment to `s` uses the
    /// `Point` type's `description` property.
    public var description: String { get }
}
typealias

SemanticContentDescriptor.Specification

NewmacOS
public typealias Specification = some ResolverSpecification
typealias

SemanticContentDescriptor.UnwrappedType

NewmacOS
public typealias UnwrappedType = SemanticContentDescriptor
typealias

SemanticContentDescriptor.ValueType

NewmacOS
public typealias ValueType = SemanticContentDescriptor

No APIs match your filter.

← More in Apple Intelligence, ML & Evaluation