Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:02:40+00:00 2026-06-13T20:02:40+00:00

This may be very basic, but I’ve done a lot of Googling and can’t

  • 0

This may be very basic, but I’ve done a lot of Googling and can’t seem to figure out what’s wrong. I’m trying to move an image from an iOS app’s sandboxed data folder to the “Camera Roll”.

If I use UIImageWriteToSavedPhotosAlbum(img,nil,nil,nil), it throws no error but also does not save a copy of the image in Photos.

In order to figure out why it’s failing, I attempted to implemented a selector (below), but now it throws an NSInvalidArgumentException with reason “MyTest<…> does not respond to selector image:didFinishSavingWithError:contextInfo:”

Here is my implementation:

@implementation MyTest

- (void)
    image:(UIImage *) image
    didFinishSavingWithError: (NSError *) error
    contextInfo: (void *) contextInfo
{
    //log error or do stuff...
}

+ (void) moveToCameraRoll: (NSString *) path
{
    UIImage *img = [[UIImage imageNamed:path] retain];

    UIImageWriteToSavedPhotosAlbum(img,
                                   self,
                                   @selector(image:didFinishSavingWithError:contextInfo:),
                                   nil);
}

@end

I feel like this is probably extremely basic, but I haven’t been able to find an answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:02:42+00:00Added an answer on June 13, 2026 at 8:02 pm

    Since +moveToCameraRoll: is a class (i.e., static) method, the self reference in the UIImageWriteToSavedPhotosAlbum function is pointing to the MyTest class. The selector you are trying to use is an instance method and thus only instances of MyTest, but not the MyTest class itself, will respond to that selector.

    To fix this, change your image:didFinishSavingWithError:contextInfo: method to a class method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be very basic, but I just can`t figure out what to do,
This may be a very basic oversight on my part, but I can't seem
This may seem like a very basic question, but its been in my head
This may seem like a very basic question, well, it is, but I am
This may seem like a very basic question but I did not seem to
this may seem like a very basic question, but i have difficulty grasping it,
I understand this question may sound very basic but I have been trying to
This may seem to be an academic question, but still I would be very
This may be a very basic question but somehow it got me tricked... when
This may be a very basic question. But it is not very clear to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.