Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ALAssetsLibrary saveImage:toAlbum:completion:failure:]: unrecognized selector sent to instance #31

Open
auriga-dev opened this issue May 13, 2015 · 4 comments

Comments

@auriga-dev
Copy link

Hi there, I'm using XCode 6.3 and Swift 1.2 and when runing the code:
ALAssetsLibrary().saveImage(screenshot, toAlbum: "myAlbum", completion:nil, failure:nil)

I get the error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ALAssetsLibrary saveImage:toAlbum:completion:failure:]: unrecognized selector sent to instance

I use a bridging header to link the Objective C code with Swift

In the build phases I added the MobileCoreService and the AssetsLibrary framework

Any help would be much appreciated

@Kjuly
Copy link
Owner

Kjuly commented May 14, 2015

Have u imported the .h file appropriately to ur Swift project?

@auriga-dev
Copy link
Author

Yes I did with a Bridging header file and inside I have:

#import "ALAssetsLibrary-CustomPhotoAlbum/ALAssetsLibrary+CustomPhotoAlbum.h"

@auriga-dev
Copy link
Author

Can you make a quick demo on Swift?

@Kjuly
Copy link
Owner

Kjuly commented May 20, 2015

@auriga-dev sorry, i rarely use Swift for developing, it might take some time for doing this, and busy these days. I'm appreciate if someone else can help to do this, thx in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants