lbrndnr / ImagePickerSheetController

ImagePickerSheetController replicates the custom photo action sheet in iMessage.
http://laurinbrandner.ch
MIT License
1.45k stars 211 forks source link

On the Swift3 branch: Denying access to photo library, and presenting an alertController on top of presented image picker sheet => crash #97

Closed andreasemento closed 1 week ago

andreasemento commented 8 years ago

The app crashes in the ImagePickerSheetController deinit method. screen shot 2016-11-18 at 14 03 18

BalestraPatrick commented 8 years ago

Can you please describe how I could reproduce this crash in more details? Or provide a video if it's easier for you.

andreasemento commented 8 years ago

Sure thing, here's a bit more information. I have reproduced the crash on a devicerunning iOS10 and simulator running both iOS9 and iOS10

Step by step, this is what happens.

I have been through the exact same flow pre-swift3, and checked that the ImagePickerSheetController is dealloced correctly - it is.

BalestraPatrick commented 8 years ago

The issue here is that we try to access the user photos even if we're not allowed to. IMO, we shouldn't even show on screen the IPSC when we don't have the permission. My solution would be to implement an UIAlertController that says "Please allows this app to access your Photos.". When the "OK" button is pressed, the IPSC is automatically dismissed so that the user can't interact with it. What do you think about this option?

Any thoughts on your side @lbrndnr?

andreasemento commented 8 years ago

Hmm, I think this depends on what the user puts in the two buttons. I appreciate that it most probably will be "image from photos" and "take picture" (camera) - but it could be stuff like "select image from dropbox", or "record voice message" instead. In these cases, the sheet controller should still be presented - but without the image strip methinks.

kevinlee85 commented 7 years ago

Still no solution or any update for those issues?

scottcc commented 7 years ago

Yeah - fairly certain this library is now abandoned. Author is (if I understand correctly) working on a newer, iOS10-like-messages pane now.

lbrndnr commented 7 years ago

@kevinlee85 @scottcc Yes, that's the plan. I'm very busy with uni though so I haven't had time to work on it in a while...