I’ve spent quite a bit of my spare time on iCalFix - a tool that spends its time fixing some misbehaviors of iCal.
At its core, this is an InputManager. And not only are those getting deprecated by Apple, it also turns out that a single bad InputManager can affect others - I’ve spent weeks chasing down issues caused by other InputManagers that were a bit more shoddy. I was trying to phase out iCalFix, but there’s quite a vocal community by now.
So I started looking into alternatives. One of them are Apple’s SyncServices - an easy way to either keep different information sources in sync, or to annotate existing data. (In a nutshell, I pretend I have all the event iCal has, but I also have additional data)
After reading the SyncServices developer docsI was ready to go - but too lazy to start an entire ObjectiveC project. So instead, I figured to give Leopards Ruby/Cocoa integration a try. And to make things a little bit easier, I found a Ruby library (harmonize/svn repository) that even takes the grunt work out of SyncService programming.
With all that infrastructure in place, it turned out to be extremely easy to work on a SyncService - just find contacts.rb in the harmonize library, and go from there. Within 30 minutes, I had an application that listed all changes to my contacts since the last run. And so far, I’ve learned three major lessons:
- In order to update the truth database, you need not only pull changes, but let SyncServices know you accepted them.
-clientAcceptedChangesForRecordWithIdentifier:is your friend here. - If you change the truth database, commit your records.
-clientCommittedAcceptedChangeswill do that. If you don’t, changes are not recorded. - SyncServices is unable to restart a sync process that’s a script. (Filed as bug #5851503)
The biggest “Aha!” of them all was RubyCocoa, though. If you need to prototype an idea, that’s a way faster approach than ObjectiveC. I see a lot of Ruby in my future…
If you just want to play, here is my harmonize gem
Hi!
I’m the author of Harmonize… I’m glad to hear that it’s working for you! Particularly since I haven’t touched it in two years
I’m curious if your gem is just a package of the repository or if there are changes involved. If you changed it, would you mind submitting a patch? I’d like to revitalize the project if possible.
If it’s just a package of the repository, then I’ll get off my butt and release an official gem so people can gem install it.
Feel free to email me directly if you want to chat about Harmonize, I’d love to hear more about what you’re doing.
Cheers, Ben
No changes on my part - just a happy user!