iPhone to iCal Sync Problems

I recently had a problem with iCal syncing to my iPhone: Calendars would sync fine from the Mac to the iPhone, but any event entered on the phone would not sync to the Mac. Moreover, calendars deleted from iCal on the Mac — calendars that no longer existed — would still be available for syncing in iTunes. Clearly there was a problem with cached data of some sort, somewhere. But where?

After a lot of trial and error, and hunting around — I tried resetting iTunes preferences, iCal preferences, and anything else that might present an easy fix — I finally figured out where all this data gets mashed up. There are two folders in your home account that are responsible for syncing the databases between your iPhone and your Mac. The first one, as far as I can tell, just contains a backup of your iPhone data. It is:
~/Library/Application Support/MobileSync

The second is where all the syncing action happens:
~/Library/Application Support/SyncServices

To fix my problem, I renamed these two folders. They'll get recreated the next time you sync your iPhone and you can keep these in case anything goes wrong. Then start up iTunes and reset all the items under the Info tab for your iPhone. (Fortunately, items under the other tabs seem to have been left alone, at least in my case. YMMV.) I still couldn't see my calendars in iTunes at this point, but I went ahead and just hit the Sync button. And it worked.

Everything now appears properly in iTunes. New calendars show up; deleted ones disappear. And syncing calendars between my iPhone and my Mac works perfectly now.

UPDATE:
Reader Ferdinand points out that Apple strongly discourages the removal of the SyncServices folder. Instead they recommend resetting your SyncServices with the instructions in this article for Mac OS X 10.5 or this one for 10.4. I'm quite happy I didn't have any problems, but if you need to mess with your sync services, I strongly recommend following Apple's advice over my own.

Leopard Beefs

So I really like Leopard. It's nifty, but not without it's problems. I thought I'd take a minute to post some of the issues I've had with the new OS.

So far I've only had a few complaints. Actually, my initial experiences were quite positive. I did an Archive and Install, preserving user and network settings, on my work machine, a Quad-Core Intel Xeon tower. I left all my old preferences in place and used my old home account data. All this went off almost completely without a hitch. The only snag, oddly, was my Final Cut Pro Studio suite, which needed to be re-serialized. Beyond that, smooth sailing.

Upgrade Woes
That upgrade went so well I decided to do the same to my aging PowerMac 2.7 GHz G5, and for the first time since I bought it that machine felt slow. Dog slow. Problematically slow. This was cause for concern. But what finally convinced me that there were major problems was what Leopard did to my iPhone. Oh, the horror!

Addresses
On the first iPhone sync with Leopard, all my addresses got completely borked. Each address was there, yet the name field was blank and there was a lot of information that didn't make the transfer. Fortunately I had a backup, and I was able to get back up and running. Oddly, the second sync worked perfectly, and only the latest contact info on my phone was lost.

Photos
Importing photos from the iPhone to iPhoto was also problematic on the upgraded Mac. The import took an extremely long time, and the imported photos suffered from strange color shifts and banding. They were unusable.

At this point I decided to do a fresh install. This worked much better, and my computer has been running much faster and handling iPhone syncs much more reliably. As part of the fresh install process, I also started with a fresh home account, which may have helped as well. But this was not the only source of problems, as I verified their existence on a clean account as well. Still, better safe than sorry, I figure.

In any case, for whatever reason, older hardware seems to like a fresh install. Things have been working reliably now for a few weeks. I'm happy.

AFP and MPD
My other beef with Leopard has to do with AFP mounts in the Finder. The way the Mac OS has always dealt with such mounts in the past is that when you mount a shared drive, you authenticate as a user with access to the resource and the drive mounts as though the authenticated user had mounted it, even if that user is different that the one who's logged in. So, for example, I could be logged in as SystemsBoy, but authenticate to a server as JimminyCricket. The server will show me the available shares for JimminyCricket, not SystemsBoy, even if they have different access privileges to that server. If I unmount the share, I can then reconnect to the server, this time authenticating as SystemsBoy, and then I see the shares available to SystemsBoy. This is actually more useful than it sounds. I have numerous identities that I use on my network. This allows me, for instance, to be logged into a machine as a non-admin user, but still connect to a server as an admin user and have admin access to those resources.

In my initial experiences with Leopard, however, the behavior had changed in a way that was potentially sucky. In Leopard, when I'd connect to a share I'd authenticate as a user, just as in the past. And the share treated me like the authenticated user, just as in the past. But once authentication had taken place, Leopard remembered the user credentials even after ejecting the mount. At this point, when attempting to re-log in as a different user, the Finder would refuse to forget the previous login identity and authentication would be bypassed. The server would simply remount as the originally logged in user.

This behavior could be a convenience for users who only use a single identity on client and server. But for those of us with MPD (that's Multiple Personality Disorder, smart guy) it's a real problem. We'd now find ourselves unable change our login identity on a server without a reboot, or until some period of time has expired. Crap!

Now, I have to say, this was happening to me without fail a few weeks ago, and it was really annoying. But now, for some odd reason, the behavior seems to have reverted back to it's old self, asking for authentication each time I request a server. It's really quite strange. I know this was a problem, because I noted it in my log of Leopard issues, but I'll be damned if I can reproduce it today. I suppose it's something to watch out for, but I'm glad to see that it seems to have cured itself. In any case, clearly there are bugs in Leopard, however inconsistent and occasional they might be.

~/Library
Leopard is a bit of a hard ass when it comes to your Library folder. The Library folder is where all the user's settings are stored, and Leopard takes steps to insure that it's always there. In fact, it disallows you from renaming or moving the folder. Try to rename it and it simply won't highlight; try to move it and you can only copy. This is both a blessing and a curse, I suppose. I mean, from an admin standpoint, I never really have to worry again about users removing their ~/Library folders. But then again, I never really did anyway. Conversely, it requires a trip to the Terminal to move a user's Library folder and test any problems therein, which is a fairly common troubleshooting step. I guess we break even here, but I think I preferred the old way of doing things. It just made my life easier.

Uh... So far that's it. Compared to my Tiger Beefs from a couple years back, that's nothin'. Hell, compared to any new software release that's frickin' amazing.

I'll say it again: Leopard is a pretty damn sweet release.

UPDATE:
I continue to have AFP problems on my Intel machine. They're different from those detailed above, but no less annoying. Earlier, I attempted to connect to a server and the process hung. I had to force quit the Finder to get out of it. And just a few minutes ago I connected to a server and copied a group of files over to my local system using a "command-c" copy, only to be denied for permissions reasons. Dragging and dropping the same batch of folders worked properly. And now, after ejecting and reconnecting to the same share, both styles of copying the same, exact folder work just fine. So clearly there are some AFP bugs that need to be worked out in Leopard. Nothing life-threatening, but surely annoying.

Self-Management

It seems I only have time for these brief posts. Tons in the pipe; time for none. Life must be... I dunno... Good or somethin'...

Anyway, I just updated my iPhone to the latest 1.1.3 firmware. You know, the one with all the goodies. It's pretty damn hot, I must say. The most useful thing will be the ability to send text to multiple folks. But the faux GPS is pretty damn cool too.

The other thing I updated was my iTunes, wherein I discovered this little nugget:


iTunes 7.6: Manually manage music and videos
(click image for larger view)

Looks like you can finally drag and drop music right into your iPhone and create iPhone-specific playlists — ones that live right on the phone and nowhere else. At this point I'm so used to the old way of doing things that I'm not sure what to do with this feature. But something tells me this new found freedom will be a boon at some point in the very near future.

Just as soon as I have some time to use it.

Web Programming and MacFUSE

I'm not a web programmer by any means. But a component of the department I work in deals with the web from an artistic standpoint, and a subset of that group does, in fact, do programming. We have web programming classes.

Recently, one of the teachers of one of those classes made the charge that our approach to web programming is old and outmoded. Whether this is true or not is not really the issue. I've been looking for new ways to think about the systems end of that workflow because, well, that's my job, and because it's an inherently interesting challenge to me. How can we make our web development environment more user-friendly?

One general suggestion has been to make the experience more "OS-like." And one step in this direction is to have the web server mount on the Desktop, allowing the developer to work on her site as if it were local. That is, rather than firing up one of the popular SFTP clients and transferring files back and forth from the local machine to the server, the developer could mount her site — or actually, the share her site lives on — directly on the local filesystem. I have two options here: MacFUSE and NFS. I'm testing both currently. So far I've had a couple minor hiccups with MacFUSE's sshfs.app, but it looks to be a fairly smart and user-friendly implementation that web developers here might benefit from. And the NFS approach would work well also, though only from inside the network.

I'm curious what other Lab Admins are doing with regards to web development in their environments. How have you facilitated ease-of-use for a process that's inherently complicated? Or have you? Also, I'm curious if anyone is using MacFUSE — specifically the sshfs component — and what experiences you might have had with it, either positive or negative.

If any of you fine readers have any thoughts on this I would really love to hear them. I've been querying students, staff and faculty for ideas, but haven't come up with much. Maybe things here are perfect, but somehow I doubt it. And, as always, I really just want to make things better.

Please sound off in the comments if you're so inclined.

Safari Remembers

The new Safari 3 is out for both Leopard and Tiger (it's included in Mac OS X v.10.4.11). It's pretty nice, I have to say. It now works with Blogger's HTML editor dealio, which is excellent (though slightly buggy at present). The find function now kicks some serious — and, more importantly, some Firefox — ass. Safari now handles tabs intelligently, letting you not only rearrange them in a window, but also letting you tear them off or drop them into existing windows. All extremely slick. Oh, and it's really pretty and fast as Hell. Seriously, it's smokin'.

But perhaps my favorite improvement to Safari 3 is that window placement is now remembered properly. You see, Safari of yore (of Tiger, actually) would remember the placement of the last window opened, rather than the placement of what I'd call the "base" window, or the first window opened. So, after using Safari, if you'd opened any windows other than your first window — even if you then closed them — the next time you opened Safari you'd get a blank window where the last open one had been. Or sometimes in seemingly random spots. I complained about this a long time ago, and it never got fixed to my liking. It was part of the reason I ended up switching to Firefox — I'm rather anal about my window placement and I like my browser pinned to the upper right hand corner, but in Safari it was always moving. Argh!
Well, Safari 3 fixes this. Sort of. Actually, I'm running Safari 3 in both Tiger and Leopard. The behavior remains unchanged in Tiger, but in Leopard, all is as I like it. So perhaps this is a fix in Leopard and not so much a Safari fix.
Either way, it's just one more reason I like Leopard and can't wait to be done with Tiger.
Can't. Frickin'. Wait.
That said, will I switch back to Safari once I've successfully transitioned to Leopard? Only time will tell. But somehow, I doubt it.