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 takePicture in simulator #30103

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

alanjhughes
Copy link
Collaborator

Why

Close #29987
takePictureForSimulator accepted a CameraViewLegacy type as an argument which caused the wrong type of view to be passed to the AsyncFunction body. Because of this an error was thrown for an invalid number of arguments being passed to the legacy version of takePicture.

How

Conform both new and legacy views to a protocol with the onPictureSaved dispatcher so takePictureForSimulator will accept either type of view

Test Plan

Bare expo on a physical device and simulator ✅

@alanjhughes alanjhughes changed the title [ios][camera] Fix takePicture in simulator [ios][camera] Fix takePicture in simulator Jul 1, 2024
@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 1, 2024
@expo-bot
Copy link
Collaborator

expo-bot commented Jul 1, 2024

The Pull Request introduced fingerprint changes against the base commit: 5cee7ec

Fingerprint diff
[
  {
    "op": "changed",
    "source": {
      "type": "dir",
      "filePath": "../../packages/expo-camera/ios",
      "reasons": [
        "expoAutolinkingIos"
      ],
      "hash": "b002a72d150f4261b3ca2ca8888c905e4507a91e"
    }
  }
]

Generated by PR labeler 🤖

@alanjhughes alanjhughes marked this pull request as ready for review July 1, 2024 14:26
@alanjhughes alanjhughes requested a review from lukmccall as a code owner July 1, 2024 14:26
@alanjhughes alanjhughes requested a review from tsapeta July 1, 2024 14:26
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jul 1, 2024
@alanjhughes alanjhughes merged commit d0e74f1 into main Jul 1, 2024
18 checks passed
@alanjhughes alanjhughes deleted the @alanhughes/camera/take-picture-sim branch July 1, 2024 15:10
@brentvatne brentvatne added the published Changes from the PR have been published to npm label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: fingerprint changed bot: passed checks ExpoBot has nothing to complain about published Changes from the PR have been published to npm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Camera] takePictureAsync got 'Received 1 arguments, but 2 was expected' error
4 participants