Signal-iOS icon indicating copy to clipboard operation
Signal-iOS copied to clipboard

Volume shutter no longer takes photo on iOS 17.3

Open kalleboo opened this issue 1 year ago • 3 comments

  • [x] I have searched open and closed issues for duplicates
  • [x] I am submitting a bug report for existing functionality that does not work as intended
  • [x] This isn't a feature request or a discussion topic

Bug description

Volume buttons no longer take photos from the camera view.

Steps to reproduce

  • open app, navigate to stories
  • tap the camera icon to open camera view
  • tap volume buttons

Actual result: Volume buttons no longer take a photo, but instead adjust volume

Expected result: Volume buttons should take a photo

Device info

Device: iPhone 15 Pro Max

iOS version: iOS 17.3

Signal version: 6.57.0.13

The implementation of this uses private APIs. There was a report for this on the beta of 17.2 (#5711), but it was not present in the release version of 17.2. It looks to me that this has now actually broken in the public release version of 17.3.

The relevant code is here: https://github.com/signalapp/Signal-iOS/blob/main/Signal/src/util/VolumeButtons.swift

kalleboo avatar Jan 25 '24 18:01 kalleboo

Hi @kalleboo,

This is indeed a big that Apple introduced in iOS 17.3. Please observe how other 3rd party camera apps (WhatsApp, Snapchat) also experience this issue. Due to this I unfortunately can't give out a specific timeline for a resolution.

Miguel-Signal avatar Jan 25 '24 19:01 Miguel-Signal

Hi @Miguel-Signal

FYI it still works in Telegram but their solution uses Objective C swizzling (not sure if it would be possible to integrate it into this project).

Here're related source files, maybe it could help!

https://github.com/TelegramMessenger/Telegram-iOS/blob/b77b6fb670ab9a4fd68dcd6cbf51522496f17e9d/submodules/Utils/VolumeButtons/Sources/VolumeButtons.swift

https://github.com/TelegramMessenger/Telegram-iOS/blob/ae998eb91ef05dfec5c5fa2dfa3c78371992a482/submodules/LegacyComponents/Sources/PGCameraVolumeButtonHandler.m#L61

tplk avatar Mar 05 '24 18:03 tplk

Hi @Miguel-Signal

Apple has released a proper public API to handle these volume button events: https://developer.apple.com/documentation/avkit/avcaptureeventinteraction From a little bit of reverse engineering it also seems that this is also the API that their components are using these days (e.g. UIImagePickerController, etc.).

Apologies for not being able to provide a merge request, but I hope this helps.

bhuemer avatar Mar 16 '24 08:03 bhuemer

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 15 '24 01:06 stale[bot]

This issue has been closed due to inactivity.

stale[bot] avatar Jun 22 '24 11:06 stale[bot]

Thanks for the info, @bhuemer!

I think I'll take a look at this and try to provide a PR in the near future.

tplk avatar Jun 29 '24 07:06 tplk

Awesome @tplk 🤘🏼thanks so much 🫶🏼 this is really a pain in the ass bug 🙈

schmuckistoffl avatar Jul 01 '24 22:07 schmuckistoffl