-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[camera_avfoundation] Adds support for discovering external camera devices on iOS 17 onwards. #5892
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
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
I was having trouble getting the changelog command working throwing
any insight would be helpful, then I can resolve some of the failing checks |
The error thrown by XCode says that |
See https://github.com/flutter/packages/blob/main/script/tool/README.md#update-changelog-and-version, in particular the last paragraph. If you use a different repo setup than our docs recommend, then you need to modify commands that reference repositories and branches accordingly. |
Our CI currently uses Xcode 14; updating is still an ongoing project. |
I guess the PR is blocked until the CI is updated to xcode 15? |
Landing it is blocked on flutter/flutter#132237, but it can be reviewed in the meantime. |
@bibaswan-bhawal The change makes sense. Does external camera work after this change? (e.g. preview, taking picture/video, etc) |
Yes they do |
packages/camera/camera_avfoundation/example/ios/RunnerTests/AvailableCamerasTest.m
Outdated
Show resolved
Hide resolved
} else if (@available(iOS 13.0, *)) { | ||
XCTAssertTrue([dictionaryResult count] == 4); | ||
} else { | ||
XCTAssertTrue([dictionaryResult count] == 3); |
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.
can you verify the actual camera IDs in the result, rather than just the count?
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.
i may be missing something. why was this resolved?
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.
it is now verifying that the external camera is actually present in the list returned
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.
hmmm, it looks like it's still checking dictionaryResult
's count only. can you point me to the code?
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.
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.
@hellohuanlin Just wanted to make sure my previous message wasn't lost in your inbox
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.
instead of checking the [dictionaryResult count] == 3
, can you manually check the actual items?
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.
Looks like this is the last outstanding comment before this can be merged?
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.
Yes I will work on it today and update the test
packages/camera/camera_avfoundation/example/ios/RunnerTests/AvailableCamerasTest.m
Outdated
Show resolved
Hide resolved
@stuartmorgan does your comment from the other PR (#5957 (comment)) also apply to this PR? |
In theory yes; I realized after writing that though that this specific case is probably not something we need to block on. So I'll file an issue about the need to add API to get notifications about camera availability changes, but I'm okay not blocking this specific change on that. |
|
fixed broken native tests
added clarification on availability of external cameras
Fixed all broken tests |
Modifed comments to better reflect internal vs external cameras in tests
@bibaswan-bhawal Is this ready for re-review? |
@bibaswan-bhawal Please mark as ready for review when you'd like it to be re-reviewed. |
Since this is marked as a draft and hasn't been updated in several months I'm going to close it to clean out our review queue. Please don't hesitate to submit a new PR if you decide to revisit this. Thanks! |
This feature is very useful to us. Will this be merged? If not, will Flutter team implement external UVC cam support in IOS? |
This PR adds support for discovering external cameras in iOS devices with USB-C i.e. iPad.
This should address flutter/flutter#130073
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.