[Photos] Update bindings up to Xcode 27.0 Beta 5 - #26434
Conversation
Bind the new asset-resource upload job options and photo-library configuration APIs introduced in Xcode 27 beta 5 for iOS, macOS, and Mac Catalyst. Update PHAsset and PHAssetResource nullability, filename, and deprecation metadata. Restore the legacy upload-job setter to its header-declared iOS-only availability, remove the resolved Photos xtro todo files, and update the cecil documentation baseline for the new public API surface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91ab847a-8bef-4f4b-9e3d-a617eadca998
There was a problem hiding this comment.
Pull request overview
Updates the Photos bindings to match APIs and availability changes introduced in Xcode 27.0 beta 5, while cleaning up binding-validation baselines (xtro + cecil docs) to reflect the newly added/adjusted APIs.
Changes:
- Added new Photos APIs:
PHAssetResourceUploadJobOptionsandPHPhotoLibraryupload-job extension configuration (enable/disable/options). - Added
PHAssetResource.Filename, correctedPHAsset.AddedDatenullability, and deprecatedPHAssetResource.OriginalFilename. - Removed resolved Photos xtro todo files and updated the cecil documentation known-failures baseline for the new members.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/photos.cs | Adds new Photos bindings and adjusts nullability/deprecation/availability to match Xcode 27 beta 5 headers. |
| tests/cecil-tests/Documentation.KnownFailures.txt | Updates documentation baseline to account for newly introduced Photos APIs. |
| tests/xtro-sharpie/api-annotations-dotnet/iOS-Photos.todo | Removes resolved xtro annotations for Photos on iOS (file removed). |
| tests/xtro-sharpie/api-annotations-dotnet/tvOS-Photos.todo | Removes resolved xtro annotations for Photos on tvOS (file removed). |
| tests/xtro-sharpie/api-annotations-dotnet/macOS-Photos.todo | Removes resolved xtro annotations for Photos on macOS (file removed). |
| tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-Photos.todo | Removes resolved xtro annotations for Photos on Mac Catalyst (file removed). |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
This comment has been minimized.
This comment has been minimized.
Keep the beta 4 macOS and Mac Catalyst API shape for SetUploadJobExtensionEnabled while marking those accidental platform variants unavailable from platform inception. Queue their removal behind XAMCORE_5_0 so the binding matches the beta 5 headers in the next breaking release without failing the current API compatibility gate. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91ab847a-8bef-4f4b-9e3d-a617eadca998
|
Superseded by |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Revert the compatibility shim introduced in 346ef39. XAMCORE_5_0 shims protect API that shipped in a stable release, while the macOS and Mac Catalyst variants of SetUploadJobExtensionEnabled existed only in Xcode 27 beta 4. Match the Xcode 27 beta 5 headers directly and document the beta-to-beta availability correction. The previous-beta API diff is expected to report the two desktop removals, while the stable Xcode 26 comparison remains clean; no API diff suppression is added. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91ab847a-8bef-4f4b-9e3d-a617eadca998
❗ API diff for current PR / commit (Breaking changes)NET (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 |
🚀 [CI Build #6d64785] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 196 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
PHAssetResourceUploadJobOptionsand the newPHPhotoLibraryupload-job configuration APIs introduced in Xcode 27 beta 5PHAssetResource.Filename, correctPHAsset.AddedDatenullability, and deprecatePHAssetResource.OriginalFilenameSetUploadJobExtensionEnabledto its header-declared iOS-only availability and deprecate it in favor of the new enable/disable APIsIntentional beta API break
Xcode 27 beta 4 briefly declared
SetUploadJobExtensionEnabledavailable on macOS and Mac Catalyst, but beta 5 reverted it to the same iOS-only shape used by the Xcode 26 bindings. TheAPI diff for current PR / commitcheck is therefore expected to report CP0002 removals for macOS and Mac Catalyst and fail.This is an intentional break against a previous Xcode 27 beta—not against a stable release. The API comparison against the stable Xcode 26.5 ref packs remains clean. No API-diff suppression is added.
Validation
make worldCoreLocationUI.CLLocationButton; every remaining fixture passed when run individuallyThe new Xcode 27 Photos constructor, selectors, protocols, and signatures were exercised on the iOS 27 simulator. No monotouch tests were added because these are API-definition-only bindings.