Friday 30 January 2015

How stop an iOS app from being upgraded by iTunes

So there's that app that you like the current version and newer ones just suck but iTunes doesn't make it easy to stop arbitrary apps from being upgraded. The problem with trying stop an old app from being upgraded is that it's all or nothing - you can either switch off automatic updates or you have to manually select the apps you want to upgrade every time.

The way to stop this is to change the permissions on the app so that it's can't be deleted (nor upgraded) by iTunes - first locate the app (e.g. /Users/test/Music/iTunes/Mobile\ Applications/Twitter\ 2.19.ipa ) Then you set the immutable flag on the app from the Terminal:

chflags uchg /Users/test/Music/iTunes/Mobile\ Applications/Twitter\ 2.19.ipa

When iTunes tries to update the app it tries to delete and replace it with the newer version but it fails ('Saying the original file can't be found'). But you can ignore that warning.

If you want to upgrade it at another point you'll need to just delete it and rerun iTunes so that it fetches the new version.


Note: That apps are unique to your user ID so you can't just copy an app (an .ipa file) from someone else an install it on your device, though you can with if you have older copies of an app for your device installed with that user ID.

Update:27nov15: Unfortunately it's not clear that this technique does stop iTunes from upgrading the apps in all situations;(

Update:23feb16: If this doesn't work you can copy the desired version of the app ipa file elsewhere and then delete the app from iTunes and then copy in the older version and sync again.

Thursday 15 January 2015

iTunes stopped syncing with iPhone?

The other day - as had happened a few times before - when I plugged my iPhone/iPad into my Mac iTunes failed to automatically start. Indeed iTunes didn't even seem recognise that my iPhone was plugged in - neither when directly plugged into USB nor when trying to 'sync over WiFi'. Another odd symptom was that my iPhone suddenly started to ask if I wanted to Trust this computer (that I have always synced to the past). A reboot had usually fixed this in the past but that's a pain so I snooped around for other answers - The usbmuxd daemon seemed to be complaining about weird stuff in the logs so I figured lets try and kill it! And low and behold that fixed the problem - usbmuxd restarted (probably care of launchd) and all was well again - iTunes saw my devices and wanted to talk to them again - a handy quick fix.

Here's the command line way to kill it - to be safe quit iTunes and unplug your iPhone beforehand:
sudo killall usbmuxd