FMPhotoPicker icon indicating copy to clipboard operation
FMPhotoPicker copied to clipboard

SDK crashes while showing warning

Open amsubhanTV opened this issue 4 years ago • 2 comments

When a user selects more than max allowed images, the app crashes while fetching rootViewController to present warning at line 28 in FMWarningView.swift. See screenshot for reference: Screenshot 2021-11-03 at 3 33 37 PM

amsubhanTV avatar Nov 03 '21 10:11 amsubhanTV

here the steps you can reporduces.

set max image: 5 now select more than five 5 in picker and thin will crash

naveedmcs avatar Feb 21 '22 11:02 naveedmcs

here is the solution

comment this line // let rootVC = (UIApplication.shared.delegate?.window??.rootViewController)! // update line number 30 with this below line
self.containerView = UIView(frame: UIScreen.main.bounds)

naveedmcs avatar Feb 21 '22 12:02 naveedmcs