Skip to content
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

[ios][camera] Fix legacy camera getAvailablePictureSizes #27642

Merged
merged 2 commits into from Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/expo-camera/CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@
- Ensure `mute` prop is passed to native so it is correctly initialiased even when not provided from JS. ([#27546](https://github.com/expo/expo/pull/27546) by [@alanjhughes](https://github.com/alanjhughes))
- On `iOS`, fix camera orientation on initial render. ([#27545](https://github.com/expo/expo/pull/27545) by [@alanjhughes](https://github.com/alanjhughes))
- On `iOS`, fix an issue where the configuration can be interuppted when the dev menu is presented on intial launch. ([#27572](https://github.com/expo/expo/pull/27572) by [@alanjhughes](https://github.com/alanjhughes))
- On `iOS`, fix `getAvailablePictureSizes` in the legacy package. ([#27642](https://github.com/expo/expo/pull/27642) by [@alanjhughes](https://github.com/alanjhughes))

### 💡 Others

Expand Down
4 changes: 3 additions & 1 deletion packages/expo-camera/ios/CameraViewModule.swift
Expand Up @@ -201,7 +201,9 @@ public final class CameraViewModule: Module {

AsyncFunction("getAvailablePictureSizes") { (_: String?, _: Int) in
// Argument types must be compatible with Android which receives the ratio and view tag.
return pictureSizesDict.keys
return pictureSizesDict.map { k, _ in
Copy link
Member

Choose a reason for hiding this comment

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

That's why we need more tests. It seems pretty easy to detect.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Definitely. Not sure how that got through for so long

k
}
}

AsyncFunction("getAvailableVideoCodecsAsync") { () -> [String] in
Expand Down