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 8327131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:00:01+00:00 2026-06-09T01:00:01+00:00

I am very puzzled on this matter that I can only write image to

  • 0

I am very puzzled on this matter that I can only write image to system album 5 times.

UIImage *image = [UIImage imageNamed:@"icon.png"];
for (int i = 0; i < 6; i++) {
    UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
}

I got this log if the value of i equals to 5:

* -[NSKeyedUnarchiver initForReadingWithData:]: data is NULL

I did not find any related information about 5 times from the API document .
Well… Can I write images to system album continuously more than 5 times? Is it too fast to write to system album ? Is there another way to do it ?

Thank you for your reply.

  • 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-09T01:00:02+00:00Added an answer on June 9, 2026 at 1:00 am

    image is an autoreleased variable. I assume you’re not using ARC. Will it still fail if you retain it first and then release it after the loop?

    EDIT: How about if you put your call in a delayed method, i.e.:

    [self performSelector:@selector(myUIImageWriteToSavedPhotosAlbum:) withObject:image afterDelay:0];
    

    where you’ve also defined:

    - (void) myUIImageWriteToSavedPhotosAlbum:(UIImage *) image {
       UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
    }
    

    Your writes may just need to go through the run loop after each attempt.

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

Sidebar

Related Questions

Very new to python and can't understand why this isn't working. I have a
this seems very simple and im puzzled as to why its not working...I want
This a VERY open question. Basically, I have a computing application that launches test
I'm puzzled by this notation that did spread a lot after the first templating
I am puzzled by this: I have made a very simple example: MainWindow.xaml: <Window
I am very puzzled about this code: var closures = []; function create() {
I am very puzzled over this error. In a previously functional Pylons app (running
This one has always puzzled me, but i'm guessing there is a very sensible
Very similar to this , however, in my case, the value of the label
I've run into this behavior after using JS for a few months. I'm very

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.