From cae81b6e38acad01fa74f9de14c64b3cb8b3e888 Mon Sep 17 00:00:00 2001 From: Alan Hughes <30924086+alanjhughes@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:44:12 +0000 Subject: [PATCH] [ios][camera] Fix legacy camera getAvailablePictureSizes (#27642) --- packages/expo-camera/CHANGELOG.md | 1 + packages/expo-camera/ios/CameraViewModule.swift | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/expo-camera/CHANGELOG.md b/packages/expo-camera/CHANGELOG.md index 0fd5a2abf5ab8..bdbdf7519238d 100644 --- a/packages/expo-camera/CHANGELOG.md +++ b/packages/expo-camera/CHANGELOG.md @@ -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 diff --git a/packages/expo-camera/ios/CameraViewModule.swift b/packages/expo-camera/ios/CameraViewModule.swift index 4a3fdc1c557aa..ac92f4f260c0f 100644 --- a/packages/expo-camera/ios/CameraViewModule.swift +++ b/packages/expo-camera/ios/CameraViewModule.swift @@ -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 + k + } } AsyncFunction("getAvailableVideoCodecsAsync") { () -> [String] in