UIImagePickerController crashes app | Swift3, Xcode8
Add this key to your info.plist
,
Key : Privacy - Photo Library Usage Description [ NSPhotoLibraryUsageDescription ]
String Value : We need access to your camera roll and photo library, so that we can do operations on it. [ Customise it in your own way]
That's it, Clean & Run
the project.
UIImagePickerController crashes on iOS10
I solved the crash by updating to the latest Xcode version.
The problem has been discussed here as well: https://github.com/Leanplum/Leanplum-iOS-SDK/issues/12
UIImagePickerController in Swift 3
I think you need to add privacy - key
for camara and photo library in your info.plist
file as from xcode 8
. for example,
Key : Privacy - Media Library Usage Description
Value : YES
Key : Privacy - Photo Library Usage Description
Value : YES
Key : Privacy - Camara Usage Description
Value : YES
here value is string
not Boolean
.
so try this.
Check Apple documentation for more details!
Reference : this so post
Xcode 8 UIImagePickerController frozen
I figure this out.This is caused by using the wrong delegate method.the one I was using has been DEPRECATED.
We should use this one
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info;
and the image information is in the info dictionary.You can get the image in this way
UIImage *image = [info objectForKey:@"UIImagePickerControllerOriginalImage"];
Crash when pushing to another controller after `didFinishPickingMediaWithInfo`
The primary cause of your issue is that you are trying to access the outlets of the view controller too soon. The view controller's views and outlets are not created and assigned immediately after instantiating the view controller.
It's also poor design to attempt to directly access the views of a view controller from code outside of that view controller. The proper solution, in this case, is to add a UIImage
property that you can set. Then let the view controller update its own image view based on the value of that image property at the proper time (such as in viewDidLoad
).
iOS 10 - App crashes To access photo library or device camera via UIImagePickerController
In iOS 10. You have to set privacy Setting for Camera & Photo Library.
Camera :
Key : Privacy - Camera Usage Description
Value : $(PRODUCT_NAME) camera use
Photo Library:
Key : Privacy - Photo Library Usage Description
Value : $(PRODUCT_NAME) photo use
Related Topics
Astoryboard.Instantiateviewcontrollerwithidentifier("Myid") Returns Nil But Not Nil in Lldb
How to Save an Array to .Plist in the App's Mainbundle in Swift
Autolayout Complains About Constraints for 2 Uitextfields with No Borders
Maximum Height of iOS 8 Today Extension
Add a Button on Right View of Uitextfield in Such Way That, Text Should Not Overlap the Button
How to Send Post Parameters in Swift
Change Lock Screen Background Audio Controls Text
Html5 Video Autoplay on Iphone
iPhone 6 and 6 Plus Responsive Breakpoints
Mobile Safari Position:Fixed Z-Index Glitch When Scrolling
CSS Gradient Not Working on iOS
Class Is Implemented in Both. One of the Two Will Be Used
Detect "Allow Notifications" Is On/Off for iOS8
How to Verify That I am Running on a Given Gcd Queue Without Using Dispatch_Get_Current_Queue()
Cfbundleversion Must Be Higher Than Previous Version