-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[camera] Remove OCMock from AvailableCamerasTests, CameraOrientationTests and ThreadSafeEventChannelTests #8363
base: main
Are you sure you want to change the base?
[camera] Remove OCMock from AvailableCamerasTests, CameraOrientationTests and ThreadSafeEventChannelTests #8363
Conversation
#import "./include/camera_avfoundation/FLTCaptureDeviceControlling.h" | ||
|
||
@interface FLTDefaultCaptureDeviceController () | ||
@property(nonatomic, strong) AVCaptureDevice *device; |
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 we directly have AVCaptureDevice
conform to FLTDefaultCaptureDeviceControlling
protocol and save this boilerplate in this file?
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're right, after playing around a bit I found that it is possible do that. I thought in ObjC that would be problematic and wanted to postpone it to the Swift migration (as Swift protocol extensions give much more flexibility). I had to change some other things like abstract AVCaptureInput
creation to make this work, but it should be much cleaner now.
Follow-up on #8342. This should be merged after #8351
AvailableCamerasTests.m
,CameraOrientationTests.m
andThreadSafeEventChannelTests.m
FLTEventChannel
andFLTCameraDeviceDiscovering
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, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.