Skip to content

[AVFoundation] Update bindings for Xcode 27 beta 3#25986

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

[AVFoundation] Update bindings for Xcode 27 beta 3#25986
dalexsoto wants to merge 4 commits into
xcode27.0from
dev/alex/xc27-avfoundation

Conversation

@dalexsoto

Copy link
Copy Markdown
Member

Xcode 27 beta 3 removed the busy/isBusy property from AVProVideoStorage (which had been bound against beta 2) and replaced it with a set of "busy reasons" plus a capacity-replenish method:

  • Remove the now-nonexistent Busy/isBusy property.
  • Add the AVProVideoStorageBusyReason smart enum (NS_TYPED_ENUM) with its three constants (AdjustingCapacity, Replenishing, Capturing).
  • Bind busyReasons as WeakBusyReasons (raw NSSet<NSString>) plus a strongly-typed HashSet<AVProVideoStorageBusyReason> BusyReasons accessor, matching the sibling AVExternalStorageDevice.ReasonsNotRecommendedForCaptureUse.
  • Bind replenishCapacityWithCompletionHandler: as an [Async] ReplenishCapacity method.

Resolves the AVProVideoStorage entries in the {iOS,tvOS,macOS, MacCatalyst}-AVFoundation.todo files (now emptied and removed) and regenerates the cecil documentation known-failures baseline.

Xcode 27 beta 3 removed the `busy`/`isBusy` property from
`AVProVideoStorage` (which had been bound against beta 2) and replaced it
with a set of "busy reasons" plus a capacity-replenish method:

* Remove the now-nonexistent `Busy`/`isBusy` property.
* Add the `AVProVideoStorageBusyReason` smart enum (NS_TYPED_ENUM) with
  its three constants (AdjustingCapacity, Replenishing, Capturing).
* Bind `busyReasons` as `WeakBusyReasons` (raw `NSSet<NSString>`) plus a
  strongly-typed `HashSet<AVProVideoStorageBusyReason> BusyReasons`
  accessor, matching the sibling
  `AVExternalStorageDevice.ReasonsNotRecommendedForCaptureUse`.
* Bind `replenishCapacityWithCompletionHandler:` as an `[Async]`
  `ReplenishCapacity` method.

Resolves the AVProVideoStorage entries in the {iOS,tvOS,macOS,
MacCatalyst}-AVFoundation.todo files (now emptied and removed) and
regenerates the cecil documentation known-failures baseline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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 AVFoundation bindings to match Xcode 27 beta 3 by removing an API that was present in beta 2 and binding the replacement “busy reasons” + capacity replenishment API for AVProVideoStorage.

Changes:

  • Removed the now-nissing busy / isBusy binding and introduced AVProVideoStorageBusyReason as an NS_TYPED_ENUM smart enum.
  • Added busyReasons bindings as WeakBusyReasons (NSSet<NSString>) plus a strongly-typed BusyReasons (HashSet<AVProVideoStorageBusyReason>) wrapper, matching the established pattern used by AVExternalStorageDevice.
  • Added [Async] binding for replenishCapacityWithCompletionHandler: and updated xtro + documentation known-failures baselines accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/xtro-sharpie/api-annotations-dotnet/tvOS-AVFoundation.todo Removes resolved xtro entries for newly-bound AVProVideoStorage APIs.
tests/xtro-sharpie/api-annotations-dotnet/macOS-AVFoundation.todo Removes resolved xtro entries for newly-bound AVProVideoStorage APIs.
tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-AVFoundation.todo Removes resolved xtro entries for newly-bound AVProVideoStorage APIs.
tests/xtro-sharpie/api-annotations-dotnet/iOS-AVFoundation.todo Removes resolved xtro entries for newly-bound AVProVideoStorage APIs.
tests/cecil-tests/Documentation.KnownFailures.txt Updates documentation baseline entries for the new smart-enum fields, properties, and async method.
src/AVFoundation/Enums.cs Adds AVProVideoStorageBusyReason smart enum with Xcode 27 availability.
src/avfoundation.cs Updates AVProVideoStorage to bind busyReasons + replenishCapacityWithCompletionHandler: and removes the obsolete busy property.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #86bd019] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 86bd0194349ab5454f2b7bf193acb33fde472f9c [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #86bd019] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 86bd0194349ab5454f2b7bf193acb33fde472f9c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #86bd019] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 86bd0194349ab5454f2b7bf193acb33fde472f9c [PR build]

Comment thread src/avfoundation.cs Outdated
bool Busy { [Bind ("isBusy")] get; }
[Export ("replenishCapacityWithCompletionHandler:")]
[Async]
void ReplenishCapacity ([NullAllowed] Action<nint, NSError> completionHandler);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note to self, change this to delegate and add nullability.... I wonder why copilot ignored this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should have been detected by xtro too :/ I've asked my Copilot to take a look at why not.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nvm, xtro did catch it 😄

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah it did, I am unsure why it wasn't looked at 😅 I am still fine tuning the instructions

@vs-mobiletools-engineering-service2

This comment has been minimized.

Comment thread src/avfoundation.cs Outdated
bool Busy { [Bind ("isBusy")] get; }
[Export ("replenishCapacityWithCompletionHandler:")]
[Async]
void ReplenishCapacity ([NullAllowed] Action<nint, NSError> completionHandler);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should have been detected by xtro too :/ I've asked my Copilot to take a look at why not.

…pacity.

Address PR review feedback: bind the
`replenishCapacityWithCompletionHandler:` completion handler as a named
delegate instead of `Action<nint, NSError>` so the nullable `NSError`
block parameter can be annotated with `[NullAllowed]`, matching the
native `void (^)(NSInteger, NSError * _Nullable)` signature.

This resolves the xtro `!missing-null-allowed!` warning on the block's
error parameter (which `Action<>` cannot express) and follows the
sibling `AVAssetWritingPlannerCompletionHandler` pattern. The cecil
documentation known-failures baseline is regenerated accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dalexsoto dalexsoto requested a review from rolfbjarne July 9, 2026 16:34
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@dalexsoto dalexsoto enabled auto-merge (squash) July 9, 2026 20:21
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [CI Build #9f3bb3d] Prepare .NET Release succeeded ✅

📦 Published NuGet packages (32 packages)

iOS

  • Microsoft.iOS.Ref.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Runtime.ios-arm64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Runtime.ios.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Runtime.iossimulator-arm64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Runtime.iossimulator-x64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Sdk.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Templates.27.0.10203-xcode27.0.nupkg
  • Microsoft.iOS.Windows.Sdk.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.NET.Sdk.iOS.Manifest-10.0.400-preview.0.27.0.10203-xcode27.0.nupkg

MacCatalyst

  • Microsoft.MacCatalyst.Ref.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.MacCatalyst.Runtime.maccatalyst-arm64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.MacCatalyst.Runtime.maccatalyst-x64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.MacCatalyst.Runtime.maccatalyst.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.MacCatalyst.Sdk.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.MacCatalyst.Templates.27.0.10203-xcode27.0.nupkg
  • Microsoft.NET.Sdk.MacCatalyst.Manifest-10.0.400-preview.0.27.0.10203-xcode27.0.nupkg

macOS

  • Microsoft.macOS.Ref.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.macOS.Runtime.osx-arm64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.macOS.Runtime.osx-x64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.macOS.Runtime.osx.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.macOS.Sdk.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.macOS.Templates.27.0.10203-xcode27.0.nupkg
  • Microsoft.NET.Sdk.macOS.Manifest-10.0.400-preview.0.27.0.10203-xcode27.0.nupkg

tvOS

  • Microsoft.NET.Sdk.tvOS.Manifest-10.0.400-preview.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Ref.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Runtime.tvos-arm64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Runtime.tvos.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Runtime.tvossimulator-arm64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Runtime.tvossimulator-x64.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Sdk.net10.0_27.0.27.0.10203-xcode27.0.nupkg
  • Microsoft.tvOS.Templates.27.0.10203-xcode27.0.nupkg

Other

  • Sharpie.Bind.Tool.27.0.0.203-xcode27.0.nupkg

Pipeline on Agent
Hash: 9f3bb3d3a5b10d7367aace19f4b00c323309c658 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 Failed to compute test summaries on VSTS: test results 🔥

Failed to compute test summaries: Unable to understand the test result '# ⚠️ arm64 - Mac Golden Gate (27): Tests skipped, incorrect beta version' for test 'Tests on macOS Golden Gate (27)'.

Pipeline on Agent
Merge 1fb9a16 into 9f3bb3d

1 similar comment
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 Failed to compute test summaries on VSTS: test results 🔥

Failed to compute test summaries: Unable to understand the test result '# ⚠️ arm64 - Mac Golden Gate (27): Tests skipped, incorrect beta version' for test 'Tests on macOS Golden Gate (27)'.

Pipeline on Agent
Merge 1fb9a16 into 9f3bb3d

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@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: 4fcdf6d0432bc51e56e932030268c472ce5c7862 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #4fcdf6d] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 191 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. [attempt 3] 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 18 tests passed. [attempt 3] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 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: 4fcdf6d0432bc51e56e932030268c472ce5c7862 [PR build]

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants