Comments (7)
Can you please describe how I could reproduce this crash in more details? Or provide a video if it's easier for you.
from imagepickersheetcontroller.
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 present the ImagePickerSheetController on my VC, and it asks for permission to access photos.
- The user denies access to photos (and the "image strip" doesn't appear).
- I then click a button on the IPSC ("pick image from photos), and the proper handler is invoked
- This handler creates and presents a UIAlertController on the same VC, causing the ImagePickerSheetController to be dealloc'ed, and deinit is called. This is where the app crashes.
I have been through the exact same flow pre-swift3, and checked that the ImagePickerSheetController is dealloced correctly - it is.
from imagepickersheetcontroller.
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?
from imagepickersheetcontroller.
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.
from imagepickersheetcontroller.
Still no solution or any update for those issues?
from imagepickersheetcontroller.
Yeah - fairly certain this library is now abandoned. Author is (if I understand correctly) working on a newer, iOS10-like-messages pane now.
from imagepickersheetcontroller.
@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...
from imagepickersheetcontroller.
Related Issues (20)
- Crash. This application is not allowed to access Photo data. HOT 1
- IOS 10: Photo taken from the camera: Secondary Handler does not get called HOT 2
- Sorry, how can I use the swift 3 version? HOT 1
- "Add Comment" HOT 5
- No animation in HOT 1
- First button in actionSheet is animated with scale
- Incompatiable with Xcode 8.0 beta 2 HOT 2
- block main thread in ImagePickerSheetController.cellForItemAtIndexPath HOT 1
- Swift 3 HOT 1
- view of memory leaks HOT 1
- Cocoapods org not update 0.9.2? HOT 4
- crash if display this controller in popover on iOS 9.3.3
- How about the Swift3 Compatibility? HOT 2
- The app crash on Xcode8.0 iOS10 within ImagePickerSheetController. HOT 2
- Swift 3.0 support HOT 1
- [Version Supported] 8.0 HOT 6
- Swift 3.0 branch HOT 1
- Why not merge Swift3.0 to the main branch? HOT 1
- On the Swift3 branch: Setting .maximumSelection = 1 and then attempting to select multiple images => app crashes HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagepickersheetcontroller.