1

My app had a crash sometimes when taking a photo:

[output capturePhotoWithSettings:avsettings delegate:self];

and the crash info:

Fatal Exception: NSInvalidArgumentException
*** -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] You are not authorized to use custom shutter sounds

crash device: iPhone7 plus

operation system: iOS 12.1.1,no jailbroken

So what is the cause of this, and how can I fix it?

ZyusAn
  • 369
  • 1
  • 4
  • 13
  • I had it recently in my app that allows to take pictures and record video on the same screen. The crash is thrown when a user rapidly hits "take a photo" and "take a video" buttons. Probably something asynchronous is going on in the background on the iOS side and you need to do some `deobunce`-ing. – Jerzy Kiler Apr 19 '22 at 09:35

0 Answers0