Monday, May 18, 2015

Fix for when iMessage on Mac OSX no longer displays SMS/iMessage photos

Thanks to Ralph Johns for the info on the fix!  Here's a quick and dirty script that can help fix iMessage if it stops displaying jpeg files in Mac OSX (Yosemite*):


$cat fix_imessage.sh
#!/bin/bash

# Set file/paths to check
file_attach='~/Library/Messages/Attachments'
file_symlnk='~/Library/Containers/com.apple.iChat/Data/Library/Messages/Attachments'
target_symlnk='../../../../../Messages/Attachments'

#Start checking
echo Checking $file_attach...
if [ -d $file_attach ]
then
        echo $file_attach is already a folder.
fi

if [ -f $file_attach ]
    then
        echo $file_attach is an unexpected file. Fixing...
        echo Renaming Attachments to Attachments.old...
        mv $file_attach $file_attach".old"
        echo "Creating new Attachments folder..."
        mkdir -m770 $file_attach
fi

echo Checking symlink dependencies...
if [ -h $file_symlnk ]
    then
        echo $file_symlnk symlink ok.
    else
        echo $file_symlnk symlink broken.  Fixing...
        mv $file_symlnk $file_symlnk".old"
        ln -sf $target_symlnk  $file_symlnk
fi

echo Done.
echo Exiting.
exit



*NOTE:  Only tested on OSX Yosemite.  May or may not work on other versions of OSX.

No comments:

Post a Comment