dotnet / dotnet/macios

[CoreSpotlight] Strongly type the protection-class delegate parameter before Xcode 27 GA

Open
#26,273 0 comments 0 reactions 0 assignees View on GitHub
api-bindings
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

The Xcode 27 CoreSpotlight API `-[CSSearchableIndexDelegate searchableItemsForIdentifiers:protectionClass:searchableItemsHandler:]` declares its `protectionClass` parameter as `NSFileProtectionType` (an `NSString`-backed typed enum).

The Xcode 27 Beta 4 binding must temporarily expose this parameter as `NSString` because bgen currently rejects parameter-level `[BindAs]` inside `[Protocol]` / `[Model]` types with BI1050. The complete generator and registrar support is being developed in #26195. Binding it as `string` or as a bare `NSFileProtectionType` would either lose the native typed-enum shape or generate incorrect protocol marshaling.

Before Xcode 27 reaches GA:

- Land #26195 (including static, dynamic, and managed-static registrar coverage).
- Change the CoreSpotlight protocol parameter to `[BindAs (typeof (NSFileProtectionType))] NSString protectionClass`.
- Verify the generated `ICSSearchableIndexDelegate`, model, extension, and `CSIndexExtensionRequestHandler` surfaces expose `NSFileProtectionType`.
- Run bgen registrar callback tests, xtro, cecil, and all platform introspection tests.

Native selector: `searchableItemsForIdentifiers:protectionClass:searchableItemsHandler:`
Availability: iOS 27.0, macOS 27.0, Mac Catalyst 27.0; unavailable on tvOS.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the generator and registrar work in #26195, including its static, dynamic, and managed-static registrar coverage. Then inspect the CoreSpotlight protocol around searchableItemsForIdentifiers:protectionClass:searchableItemsHandler: and verify the generated interface, model, extension, and CSIndexExtensionRequestHandler surfaces, followed by bgen registrar callback tests, xtro, cecil, and platform introspection tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.