[Photos/PhotosUI] Update bindings up to Xcode 27.0 Beta 4 - #26283
Conversation
Bind the Xcode 27 Photos asset metadata, rating, adjustment, persistent-change, HDR, cloud identifier, and desktop upload-job APIs. Add PhotosUI picker metadata and search support together with shared-album creation, customization, and posting controllers. Include the nullable archival cloud identifier factory, runtime conformance handling, coverage, and updated xtro/Cecil baselines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8359fed7-09e1-447e-8379-fcb69bac3872
There was a problem hiding this comment.
Pull request overview
Updates the Photos/PhotosUI managed bindings to match APIs available through Xcode 27.0 Beta 4, adds minimal runtime coverage for the new PHCloudIdentifier archival factory, and cleans up xtro todo debt now resolved by the new bindings.
Changes:
- Added new Photos enums/types/properties/methods (ratings, adjustments state, playback variation, extended metadata, HDR options, persistent changes observers, synced-cloud-identifier mapping, and macOS/Mac Catalyst upload-job surface).
- Added PhotosUI picker metadata/search APIs plus shared-album creation/customization/posting controllers and related enums/delegates.
- Added
PHCloudIdentifier.Create (string archivalStringValue)+ a runtime test, updated introspection/Cecil allowlists, and removed resolved xtro-sharpie todo files.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-Photos.todo | Removed resolved Photos xtro todo entries for tvOS. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-PhotosUI.todo | Removed resolved PhotosUI xtro todo entries for macOS. |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-Photos.todo | Removed resolved Photos xtro todo entries for macOS. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-PhotosUI.todo | Removed resolved PhotosUI xtro todo entries for Mac Catalyst. |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Photos.todo | Removed resolved Photos xtro todo entries for Mac Catalyst. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-PhotosUI.todo | Removed resolved PhotosUI xtro todo entries for iOS. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo | Removed resolved Photos xtro todo entries for iOS. |
| tests/monotouch-test/Photos/CloudIdentifierTest.cs | Added runtime test coverage for PHCloudIdentifier.Create returning null for invalid archival strings. |
| tests/introspection/ApiProtocolTest.cs | Skips protocol conformance checks for PHPickerSearchText due to Xcode 27 header/runtime mismatch. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Updated Cecil documentation known-failure list for newly introduced Photos/PhotosUI API surface. |
| tests/cecil-tests/ApiAvailabilityTest.cs | Added a known-failure entry for a platform-mismatched obsolete attribute in Photos. |
| src/PhotosUI/PHEnums.cs | Added PHPickerMetadataOptions and PHSharedAlbumCreationSharingPolicy enums. |
| src/photosui.cs | Added picker metadata/search bindings and shared-album creation/customization/posting controller bindings and delegates. |
| src/Photos/PHCloudIdentifier.cs | Added nullable archival-string factory PHCloudIdentifier.Create with proper OS platform annotations. |
| src/Photos/Enums.cs | Added missing Photos enums/values (e.g., PHAssetRating, PHOriginalResourceChoice, PHAssetPlaybackVariation, RootFolder, PhotoAnimation). |
| src/photos.cs | Added new Photos selectors/properties (asset rating/metadata, HDR prefs, persistent changes observer, synced ID mapping, etc.) and updated deprecations. |
| src/frameworks.sources | Included new Photos/PHCloudIdentifier.cs in Photos sources list. |
The Xcode 27 headers declare PHLivePhotoRequestOptions.preferHDR for macOS 14 and Mac Catalyst 17, but those runtimes do not implement the getter or setter. Keep selector validation enabled from macOS 15 and Mac Catalyst 18, where CI confirms both selectors exist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8359fed7-09e1-447e-8379-fcb69bac3872
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Model PHLivePhotoRequestOptions.PreferHdr using the macOS 15 and Mac Catalyst 18 runtime availability instead of selector-test exceptions. Remove the legacy upload-job creation API from macOS, document the malformed native availability in xtro, and drop the resulting Cecil known failure. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8359fed7-09e1-447e-8379-fcb69bac3872
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #11a1165] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 200 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Summary
PHCloudIdentifierfactory and runtime coverage, then remove all resolved Photos/PhotosUI xtro todo filesValidation
make worldCloudIdentifierTest: 1/1 passed on iOS, tvOS, macOS, and Mac Catalyst