Skip to content

[Photos] Update bindings up to Xcode 27.0 Beta 5 - #26434

Open
dalexsoto wants to merge 3 commits into
xcode27.0from
dev/alex/xc27-Photos
Open

[Photos] Update bindings up to Xcode 27.0 Beta 5#26434
dalexsoto wants to merge 3 commits into
xcode27.0from
dev/alex/xc27-Photos

Conversation

@dalexsoto

@dalexsoto dalexsoto commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

  • bind PHAssetResourceUploadJobOptions and the new PHPhotoLibrary upload-job configuration APIs introduced in Xcode 27 beta 5
  • add PHAssetResource.Filename, correct PHAsset.AddedDate nullability, and deprecate PHAssetResource.OriginalFilename
  • restore SetUploadJobExtensionEnabled to its header-declared iOS-only availability and deprecate it in favor of the new enable/disable APIs
  • remove the resolved Photos xtro todo files and update the cecil documentation baseline

Intentional beta API break

Xcode 27 beta 4 briefly declared SetUploadJobExtensionEnabled available on macOS and Mac Catalyst, but beta 5 reverted it to the same iOS-only shape used by the Xcode 26 bindings. The API diff for current PR / commit check 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

  • fresh pre-change and post-change make world
  • clean xtro generation/classification: sanity passed for iOS, tvOS, macOS, and Mac Catalyst
  • clean cecil run: 112 passed, 4 skipped
  • iOS 27 simulator introspection: 44 passed
  • tvOS 27 simulator introspection: 43 passed
  • macOS introspection: 32 passed, 2 ignored because the host is macOS 26.6 while the SDK is 27.0
  • Mac Catalyst: the full run reached the known unrelated headless TCC crash in CoreLocationUI.CLLocationButton; every remaining fixture passed when run individually
  • filtered app-size tests: 16 skipped as expected on beta Xcode

The 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.

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
@dalexsoto
dalexsoto requested a review from rolfbjarne as a code owner August 12, 2026 00:47
@dalexsoto dalexsoto added this to the xcode27 milestone Aug 12, 2026
Copilot AI lite review requested due to automatic review settings August 12, 2026 00:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: PHAssetResourceUploadJobOptions and PHPhotoLibrary upload-job extension configuration (enable/disable/options).
  • Added PHAssetResource.Filename, corrected PHAsset.AddedDate nullability, and deprecated PHAssetResource.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.

@vs-mobiletools-engineering-service2

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
@dalexsoto

dalexsoto commented Aug 12, 2026

Copy link
Copy Markdown
Member Author

Superseded by 6d64785c3b. The compatibility shim was removed because the macOS and Mac Catalyst variants existed only in Xcode 27 beta 4 and never shipped in the stable Xcode 26 bindings. The beta 5 header-correct removal is intentional; the previous-beta API-diff check is expected to fail, the stable comparison remains clean, and no API-diff suppression is added.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@dalexsoto dalexsoto added the ready-to-review This PR is ready to review/merge. label Aug 12, 2026
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
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

❗ API diff for current PR / commit (Breaking changes)

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 6d64785c3bca0c18276bd8fe58071bb763f4a6fa [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [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
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 19 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
⚠️ Tests on macOS Golden Gate (27): Tests skipped, incorrect beta version. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 6d64785c3bca0c18276bd8fe58071bb763f4a6fa [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants