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

  • Home
  • SEARCH
  • 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 7996103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:37:12+00:00 2026-06-04T14:37:12+00:00

I seem to be having caching issues with the ALAssetLibrary when testing my app

  • 0

I seem to be having caching issues with the ALAssetLibrary when testing my app on the iPhone.

Steps used to produce this issue

  1. Take a photo using the iPhone camera
  2. Access the Camera Roll using ALAssetsLibrary (through ELCImagePicker)

The problem is that when ELCImagePicker displays the list of albums, the thumbnail of the photo taken in step 1 is displayed for the Camera Roll album (which is correct), but when I go into the Camera Roll album, that photo is not there. An error like this is also displayed in the console log:

Cached count is off for 0x2391d0 <x-coredata://D226A7C3-95D5-40B3-BCFB-726E534AB57A/Album/p1> (1357 != 1358) moc=<PLManagedObjectContext: 0x63794c0>

1357 and 1358 appears to be match the photo count before and after I take the photo, and closing the image picker and opening it again doesn’t help. But if I switch to the Photos app, the photo is displayed there. And when I return to my app, the photo is now displayed as well.

I have tried both

UIImageWriteToSavedPhotosAlbum ( UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo );

and ALAssetsLibrary’s

(void)writeImageToSavedPhotosAlbum:(CGImageRef)imageRef orientation:(ALAssetOrientation)orientation completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)completionBlock

but neither works. Any help is greatly appreciated. Thanks!

  • 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-04T14:37:14+00:00Added an answer on June 4, 2026 at 2:37 pm

    You can listen for ALAssetsLibraryChangedNotification notification.

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadAlbumGroups) name:ALAssetsLibraryChangedNotification object:nil];
    

    In reloadAlubmGroups load your album groups from assets library to get updated objects.


    Apple Documentation:

    ALAssetsLibraryChangedNotification

    Sent when the contents of the assets library have changed from under the app that is using the data.
    When you receive this notification, you should discard any cached information and query the assets library again. You should consider invalid any ALAsset, ALAssetsGroup, or ALAssetRepresentation objects you are referencing after finishing processing the notification.

    In iOS v4.0, the notification’s object is nil. In iOS v4.1 and later, the notification object is the library object that posted the notification.

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

Sidebar

Related Questions

I seem to be having an issue with the photo uploading function on a
Seem to be having some issues storing the current date in a core data
We have a cakephp app running on 2.0 and we seem to be having
This may be something common and trivial, but I seem to be having trouble
I seem to be having issues with the selected index on a list box.
I seem to be having an issue with PHP rounding (sort of) numbers by
I seem to be having some problems creating a jquery plugin. I am testing
Seem to be having an issue with the tablesorter plugin and excluding columns for
I seem to be having an issue with SSL whenever trying to use oAuth2
I seem to be having a strange problem which I can't fully understand. This

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.