HT201313: Keep your photos safely stored and up to date on all your devices

Learn about Keep your photos safely stored and up to date on all your devices
Ninefish

Q: iTunes does not sync recent photos from Photos.app

I have an iMac 27 running 10.10 and iTunes that syncs (problematically) with an iPhone 4 running 1OS7

 

Before Photos.app iPhoto kept the multiple albums synced immediately with the phone and an iPad. Now most recent smart albums don't update correctly.

 

I have an smart album of images taken in the last 7 days, currently it contains 2 images, iTunes shows it as having 55 images within it: none of which are taken within the last 7 days.

 

All of the smart albums I sync with the phone have accurate image counts, or contain the same images as the corresponding albums on the Photos application on my iMac.

 

I've tried deleting, and re-syncing.

I've tried adding new albums and new smart albums and these don't show up in iTunes.

I've reselected the Photos library, and I think this might have worked for a short while, but hasn't forced an update of smart albums since.


Any ideas folks?

iMac (27-inch Mid 2011), OS X Yosemite (10.10.3)

Posted on Jun 16, 2015 1:02 AM

Close

Q: iTunes does not sync recent photos from Photos.app

  • All replies
  • Helpful answers

  • by léonie,Helpful

    léonie léonie Jun 16, 2015 3:34 AM in response to Ninefish
    Level 10 (105,761 points)
    iLife
    Jun 16, 2015 3:34 AM in response to Ninefish

    Have you updated to the latest version of iTunes?  If not, try updating.

     

    Some times it helps to delete the iPod Photo Cache folder, from the photo library, if albums sync incorrectly.

     

    See this support document:  About the iPod Photo Cache folder - Apple Support

     

    Do any of your smart albums sync correctly at all?  There may be a bug with syncing Smart albums from Photos, since Photos does not support to sync smart albums using iCloud Photos Library.

     

  • by Ninefish,

    Ninefish Ninefish Jun 16, 2015 11:44 PM in response to léonie
    Level 1 (0 points)
    Jun 16, 2015 11:44 PM in response to léonie

    Thanks Léonie, I think that's helped me solve the issue for now, but there's a few extra steps…

     

    There's a couple of crucial issues I think.

     

    Delete current photos on the iPhone

    Sync

    (Check the images have gone)

    Quit iTunes

    Quit Photos

    Find and delete the iPod Photo Cache folder: see how here

    Then relaunch iTunes and re add the albums to sync

    Sync iPhone

     

    Without the quit iTunes process the Photos database isn't re-read, or recompiled ready to sync again

     

    It's a bit grim that this long process needs to be done (frequently) for something that potentially should be much easier.

  • by léonie,Solvedanswer

    léonie léonie Jun 17, 2015 12:26 AM in response to Ninefish
    Level 10 (105,761 points)
    iLife
    Jun 17, 2015 12:26 AM in response to Ninefish

    (Check the images have gone)

    Quit iTunes

    Quit Photos

    Actually, there is still one step missing in your long list.

    The application processes may be cached to be resumed, when you quit an application. It has been this way since MacOS X 10.7 (Lion). To be sure that Photos and iTunes will clear the cached data and  read the modified Photos library and recreate the iPod Photos Cache the only way is to restart the Mac.  You were lucky, if it worked without restarting the Mac. Sometimes quitting will suffice, sometimes not.

    Quitting an application does not necessarily quit it. It is just a hint for MacOS X, that we currently don't need the app running.

  • by R C-R,

    R C-R R C-R Jun 17, 2015 5:13 AM in response to léonie
    Level 6 (17,633 points)
    Jun 17, 2015 5:13 AM in response to léonie

    léonie wrote:

    Quitting an application does not necessarily quit it. It is just a hint for MacOS X, that we currently don't need the app running.

    I could be wrong about this but I think that isn't quite true. As explained here, the resume feature introduced in Lion just automatically reopens any documents that were left open the last time the app was in use, & that can be disabled globally in System Preferences > General by checking the "Close windows when quitting an app" option. It is true that the OS X memory manager will leave parts of the app in memory when you quit it until & unless that memory is needed for something else, but that doesn't have anything to do with cashes.

     

    What I think is happening with Photos is while the app itself does quit when you tell it to, there are several other supporting processes that continue to run (which you can see in Activity Monitor by filtering the process list on the word "photo" as shown below) & the caches associated with one or more of them sometimes is not updated. All of these processes, at least on my system, are user ones, which suggests that logging out & back into the user account would accomplish the same thing as restarting the Mac. This has in fact worked for me, but I don't know if it would for anyone else.

    Activity Monitor photos procs.jpg

  • by léonie,

    léonie léonie Jun 17, 2015 5:38 AM in response to R C-R
    Level 10 (105,761 points)
    iLife
    Jun 17, 2015 5:38 AM in response to R C-R

    I did not mean the annoying resume feature that will reopen windows, after restart, but the resuming of application processes after an automatic termination as described in this Ars Technica review for Lion:  http://arstechnica.com/apple/2011/07/mac-os-x-10-7/8/#process-model, see:

     

    You read that right. Lion will quit your running applications behind your back if it decides it needs the resources, and if you don't appear to be using them. The heuristic for determining whether an application is "in use" is very conservative: it must not be the active application, it must have no visible, non-minimized windows—and, of course, it must explicitly support Automatic Termination.

    Logging on and off (or simply force quitting the Finder) used to suffice during Lion and Mountain Lion, but since Mavericks and the introduction of the sandbox I have to restart the system when changing System preferences or deleting application preferences files. Apples Support documents have added the restart recommendation to the trouble shooting guides for trashing preferences files (for example https://support.apple.com/en-us/HT201289)  and the system preferences will prompt you to restart the mac, when you change global settings like the system language.

  • by R C-R,Helpful

    R C-R R C-R Jun 17, 2015 6:06 AM in response to léonie
    Level 6 (17,633 points)
    Jun 17, 2015 6:06 AM in response to léonie

    léonie wrote:

    I did not mean the annoying resume feature that will reopen windows, after restart, but the resuming of application processes after an automatic termination as described in this Ars Technica review for Lion ...

    I am aware of that but I think it applies only after an automatic termination, not when a user manually quits an app.

    Logging on and off (or simply force quitting the Finder) used to suffice during Lion and Mountain Lion, but since Mavericks and the introduction of the sandbox I have to restart the system when changing System preferences or deleting application preferences files. Apples Support documents have added the restart recommendation to the trouble shooting guides for trashing preferences files (for example https://support.apple.com/en-us/HT201289)  and the system preferences will prompt you to restart the mac, when you change global settings like the system language.

    That is because Mavericks & later OS versions cache many preference settings for better performance, particularly system level ones, so unless you do something to force an immediate update the 'stale' cached version may continue to be used. See for example http://manytricks.com/blog/?p=3049 for a discussion of the issue & some ways to do that that do not require a restart. I have also read (in an article I cannot find now, of course) that just running the Terminal defaults read command on the appropriate preference file will work as well.

     

    Anyway, this applies only to preference (plist) files, so it doesn't seem likely that it is a contributing factor to the sync issue. My money is still on the supporting processes theory, particularly since the name of some of them imply they are involved in syncing, even when the Photos app itself is not running.

  • by R C-R,

    R C-R R C-R Jun 17, 2015 6:33 AM in response to R C-R
    Level 6 (17,633 points)
    Jun 17, 2015 6:33 AM in response to R C-R

    Too late for an Edit: I still can't find the article about using the defaults command I was thinking about, but I did find several others like this one that says (more or less) that the only safe way to see or change preference settings other than using whatever the app provides in its own preference window in Mavericks or later is to use the defaults command, although some other method should work if it is known to be "cfprefsd aware." That's the daemon that takes care of syncing preferences cached in memory with those on disk.

  • by léonie,

    léonie léonie Jun 17, 2015 6:49 AM in response to R C-R
    Level 10 (105,761 points)
    iLife
    Jun 17, 2015 6:49 AM in response to R C-R
    Anyway, this applies only to preference (plist) files, so it doesn't seem likely that it is a contributing factor to the sync issue.

    The preferences files are the culprit in many sync issues because the photo applications are misusing them to cache the current state, the path to the last active library, and many settings that would better be stored the photo libraries, but for some reasons are stored globally. The Media Browser is reading the preferences files - you can test that by deleting the preferences before using the media browser.

  • by R C-R,

    R C-R R C-R Jun 17, 2015 10:45 AM in response to léonie
    Level 6 (17,633 points)
    Jun 17, 2015 10:45 AM in response to léonie

    léonie wrote:

    The preferences files are the culprit in many sync issues because the photo applications are misusing them to cache the current state, the path to the last active library, and many settings that would better be stored the photo libraries, but for some reasons are stored globally.

    I think the reasons for this are because the app & several of the related services need access to various of these preference settings globally (per user). Obviously, it would not be very efficient to store the path to the last active library in the library itself -- that would require updating what could be many different libraries on several different drives every time the active one changed -- & the same goes for anything in any of the other processes shown in my screen shot that might need that or other library state info.

    The Media Browser is reading the preferences files - you can test that by deleting the preferences before using the media browser.

    Are you sure it is reading the files & not the versions cached in memory? As some of those articles I mentioned discuss, in Mavericks & beyond deleting or modifying preference files in the traditional ways using Finder may not touch the memory cached versions, which may still be used & written back to disk by the cfprefsd daemon.

  • by Ninefish,

    Ninefish Ninefish Jun 17, 2015 2:15 PM in response to R C-R
    Level 1 (0 points)
    Jun 17, 2015 2:15 PM in response to R C-R

    Thanks everyone, that got deep quickly  :-)

     

    I really appreciate all that insight, the topmost issue is probably resolved (if only to be retweaked later when it happens again), but the fallout (syncing with multiple devices, screensavers and AppleTVs) continues. I really appreciate some of the deep dives as they'll help me troubleshoot the issues here

     

    Cheers