-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Vision] Add support for Xcode 15 #19099
[Vision] Add support for Xcode 15 #19099
Conversation
src/vision.cs
Outdated
[return: NullAllowed] | ||
NSDictionary<NSString, NSArray<IMLComputeDeviceProtocol>> GetSupportedComputeDevices([NullAllowed] out NSError error); | ||
|
||
// could this be combined into a Get/Set pair? docs are a bit weird.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would need to use an indexer, since it takes the computeStage: https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/
And indexers do not have names, so you won't be able to diff with another indexer that takes a string. Leaving it in two diff methods is a better approach.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add two api when working with smart enums, one that takes an NSString and the other one that takes the enum . The reason is that we want to expose the nicer apit with the enum and also allow a user to pass a value we might have forgotten.
src/vision.cs
Outdated
[return: NullAllowed] | ||
NSDictionary<NSString, NSArray<IMLComputeDeviceProtocol>> GetSupportedComputeDevices([NullAllowed] out NSError error); | ||
|
||
// could this be combined into a Get/Set pair? docs are a bit weird.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would need to use an indexer, since it takes the computeStage: https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/indexers/
And indexers do not have names, so you won't be able to diff with another indexer that takes a string. Leaving it in two diff methods is a better approach.
src/vision.cs
Outdated
|
||
[TV(17, 0), Mac(14, 0), iOS(17, 0), MacCatalyst(17,0)] | ||
[Export("supportedJointsGroupNamesAndReturnError:")] | ||
[return: NullAllowed] | ||
string[] GetSupportedJointsGroupNames([NullAllowed] out NSError error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Objc returns a string, but is in reality an enum form the one you created: VNAnimalBodyPoseObservationJointsGroupName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed offline with @mandel-macaque and decided to follow what was already being done in the framework and use the BindAs attribute to improve the exposed api
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.
|
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.
This comment has been minimized.
This comment has been minimized.
src/vision.cs
Outdated
} | ||
|
||
[Export ("parentJoint")] | ||
string ParentJoint { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should look at the docs, this sounds like one of the smart enums if not probably NSString is a better choice here.
string ParentJoint { get; } | |
NSString ParentJoint { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, should be a smart enum if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalexsoto @mandel-macaque yep good catch, it does return the enum https://developer.apple.com/documentation/vision/vnhumanbodyrecognizedpoint3d/4173215-parentjoint?language=objc
Co-authored-by: Alex Soto <alex@soto.dev>
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.
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.
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.
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] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes).NET (No breaking changes)❗ API diff vs stable (Breaking changes)Legacy Xamarin (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:).NET (:heavy_exclamation_mark: Breaking changes :heavy_exclamation_mark:)
ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻✅ All tests on macOS M1 - Mac Ventura (13.0) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 235 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
No description provided.