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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:29:12+00:00 2026-06-14T12:29:12+00:00

I am writing an application where the user could select several images and ask

  • 0

I am writing an application where the user could select several images and ask them to be saved to the library. I use ALAssetLibrary to create a list of all the images in the gallery for the user to choose from. When the user asks for save, I save the images one at a time to saved photos using [library writeImageToSavedPhotosAlbum:metadata:completionBlock:]. So I first save one image and then in the completion block, save another image and so on.

I expect the ALAssetsLibraryChangedNotification to be called as many times as the number of images to be saved. But it is being called twice as many times. Any clues why this might happen? I have checked that I am actually writing the images only once for every selected image. The notifications occur immediately after I save each image. Once I receive all notifications once for every saved image, I reload the library and load the assets again. The notifications then start come again each time I finish reloading the assets.

Is there a way I can get to know if there are more such notifications coming up so that I can choose to perform the actual processing only after the last one?

  • 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-14T12:29:13+00:00Added an answer on June 14, 2026 at 12:29 pm

    The best solution that I found to go through this was to remove the observer before performing save operations.

    [[NSNotificationCenter defaultCenter] removeObserver:self name:ALAssetsLibraryChangedNotification object:nil];
    

    And then subscribe to the notifications again after everything has been saved.

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

Sidebar

Related Questions

I am writing an application that allows a user to place images on a
I am writing an application , which User can create Topics and others can
I'm writing an application that will create difficult passwords for the user. The user
I'm writing an application that displays a list of objects which the user can
I am writing an iPhone application which requires the user to enter several values
I'm thinking of writing simple application for Windows Mobile devices, where user could simply
I'm writing an application where user can point a position in a Google Maps
I am currently writing an application where the user has, at some point, to
I'm writing an application that gives the user the option to resize an image
I'm writing an application in Visual Basic to tell the user about their PC.

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.