Crash at PHPhotoLibrary presentLimitedLibraryPickerFromViewController line unrecognised selector send to instance

Viewed 338

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?

1 Answers

Quick searching finds:

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

Add PhotosUI.framework to your target:

enter image description here

Related