[AVFoundation] Update bindings for Xcode 27 beta 3#25986
Conversation
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>
There was a problem hiding this comment.
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/isBusybinding and introducedAVProVideoStorageBusyReasonas an NS_TYPED_ENUM smart enum. - Added
busyReasonsbindings asWeakBusyReasons(NSSet<NSString>) plus a strongly-typedBusyReasons(HashSet<AVProVideoStorageBusyReason>) wrapper, matching the established pattern used byAVExternalStorageDevice. - Added
[Async]binding forreplenishCapacityWithCompletionHandler: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. |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #86bd019] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #86bd019] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #86bd019] Build passed (Build macOS tests) ✅Pipeline on Agent |
| bool Busy { [Bind ("isBusy")] get; } | ||
| [Export ("replenishCapacityWithCompletionHandler:")] | ||
| [Async] | ||
| void ReplenishCapacity ([NullAllowed] Action<nint, NSError> completionHandler); |
There was a problem hiding this comment.
note to self, change this to delegate and add nullability.... I wonder why copilot ignored this
There was a problem hiding this comment.
This should have been detected by xtro too :/ I've asked my Copilot to take a look at why not.
There was a problem hiding this comment.
Yeah it did, I am unsure why it wasn't looked at 😅 I am still fine tuning the instructions
This comment has been minimized.
This comment has been minimized.
| bool Busy { [Bind ("isBusy")] get; } | ||
| [Export ("replenishCapacityWithCompletionHandler:")] | ||
| [Async] | ||
| void ReplenishCapacity ([NullAllowed] Action<nint, NSError> completionHandler); |
There was a problem hiding this comment.
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>
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.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #9f3bb3d] Prepare .NET Release succeeded ✅📦 Published NuGet packages (32 packages)iOS
MacCatalyst
macOS
tvOS
Other
Pipeline on Agent |
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
❗ 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 |
This comment has been minimized.
This comment has been minimized.
🚀 [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 macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Xcode 27 beta 3 removed the
busy/isBusyproperty fromAVProVideoStorage(which had been bound against beta 2) and replaced it with a set of "busy reasons" plus a capacity-replenish method:Busy/isBusyproperty.AVProVideoStorageBusyReasonsmart enum (NS_TYPED_ENUM) with its three constants (AdjustingCapacity, Replenishing, Capturing).busyReasonsasWeakBusyReasons(rawNSSet<NSString>) plus a strongly-typedHashSet<AVProVideoStorageBusyReason> BusyReasonsaccessor, matching the siblingAVExternalStorageDevice.ReasonsNotRecommendedForCaptureUse.replenishCapacityWithCompletionHandler:as an[Async]ReplenishCapacitymethod.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.