Home > database >  Crash at PHPhotoLibrary presentLimitedLibraryPickerFromViewController line unrecognised selector sen
Crash at PHPhotoLibrary presentLimitedLibraryPickerFromViewController line unrecognised selector sen

Time:02-10

I am trying to present the Limited image picker but i get

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PHPhotoLibrary presentLimitedLibraryPickerFromViewController:] 

I am using

#import <Photos/Photos.h>
#import <PhotosUI/PhotosUI.h>

This line crashes although self is a viewcontroller

   [[PHPhotoLibrary sharedPhotoLibrary] presentLimitedLibraryPickerFromViewController:self];

Any ideas why?

CodePudding user response:

Quick searching finds:

Possibly a "bug" ... possibly faulty documentation...

Add PhotosUI.framework to your target:

enter image description here

  • Related