iCal Removing and Preventing Duplicate Apple MobileMe Synchronizing Calendar Appointment Schedule Event Entries With Archiving Using BusyCal

Technology > Apple

Apple iCal Calendar Schedule Appointment IconProblem Summary. Sometimes duplicate entries will unexplainably appear in the Apple iCal calendar application. This page explains why this might happen, how to clean up the problem, and how to prevent the problem.

Problem Cause. Duplicate entries may be caused by any of the following.

  • file corruption in the local synchronization database files or problems with the MobileMe synchronization files
  • synchronization latency resulting in changed entries to be perceived by the MobileMe synchronization database as multiple entries
  • very large application databases such as calendars with many events may lead to the above two items

Understanding MobileMe Synchronization. Independent of MobileMe, your computer locally stores synchronization information so that the iCal program (for example) can have a mirror image of the information on  your mobile devices. This is useful for people who don’t have MobileMe and synchronize using direct cable connections. If you subscribe to the MobileMe service, you can choose to also have synchronization information stored on the MobileMe server. This is perhaps the preferred method of synchronization for those who want to ensure synchronization between mobile devices while away from your desktop or notebook computer. Devices can be configured to automatically receive new or updated information (emails, appointments, contacts) from the MobileMe synchronization server (called PUSH notification). This ensures that changes made are instantly propagated out to all devices.

busymac-busycal-calendar-appointment-schedule-icon
BusyCal from BusyMac.com is an excellent iCal alternative that reads your iCal data file to display your calendar in a better format with more calendaring tools.

Duplicate Removal. You can delete duplicate iCal entries using a free utility such as iCal Dupe Deleter available on Apple’s website.

Calendar Archiving. For improved iCal reliability and faster performance consider using BusyCal from BusyMac.com to create an archive of all old appointments. The BusyCal software is an amazing program that reads your iCal data and presents it better with more useful tools to manage your appointments. It’s free for 30 days, or $50 to buy. With BusyCal you can view a list of all calendar entries over a decade (for example) then click, select, drag, and move them into an archive calendar. Do this each year to maintain a small calendar file. Note that any reoccurring entries will be moved into your archive and won’t show up in the current calendar. So, keeping two to three years in your current calendar might be helpful for people who use repeating events.

Duplicate Prevention. If iCal duplicates keep reappearing, then it may be necessary to follow these instructions to delete your synchronization information and start fresh.

  1. Important. These instructions are written for people who are regularly synchronizing their contacts, calendar items, and bookmarks with their main computer through MobileMe rather than using a USB cable connection. These instructions assume that your primary desktop or notebook computer contains the most up-to-date and complete set of information. If you have been traveling, and haven’t synchronized with MobileMe or directly with your computer, and you have much new and modified information on your mobile device, then you will need to make sure you synchronize with your computer through MobileMe or with a USB cable. Sometimes doing this will require merging data which can create duplicates. If this happens, use a duplicate removal utility like the one mentioned above, to clean things up.
  2. Backup. Before continuing, it is important to synchronize and get the most up-to-date and complete information, and then backup your data as follows.
    1. For iCal, from the File menu, choose Export > iCal Archive.
    2. For Address Book, from the File menu, choose Export > Address Book Archive.
    3. For Safari bookmarks, from the File menu, choose Export Bookmarks.
  3. Menu Bar Controls. For the remaining steps, it will be useful to have the Synchronization status icon in the menu bar. To enable this, go to the Apple menu (click the Apple icon) in the upper left corner of the screen and choose System Preferences. Then click the MobileMe icon (third row down far left icon). Click on the Sync tab and make sure you have a check mark next to the Show status in menu bar option. Exit the MobileMe preferences window by clicking the red button (upper left of window). You will now notice two arrows that form a circle in the menu bar (the icons in the upper right of your screen). If you click on these arrows, a drop-down menu will appear with synchronization information and options. If you press the Option key on the keyboard and while holding that key you click on the Synchronization icon, then more options will appear in the drop-down menu including Sync Diagnostics and an option to Reset Sync Services.
  4. Sync Diagnostics. If you choose the Sync Diagnostics (visible when holding the option key while clicking on the Synchronization icon in the menu bar), this will create a report indicating the status of your MobileMe data. However, the resulting report may be huge, and the report may attempt to send itself through Apple Mail. If this happens, and the report is 1GB in size (for example) it will cause your system to slow down to a crawl and the Mail program will take forever to respond. So, you might want to skip this step.
  5. Erase MobileMe Device Sync Data. To ensure that conflicting or corrupted information isn’t being uploaded to the MobileMe synchronization server, delete all MobileMe account information from your mobile devices. This is done under settings. First turn off synchronization for each application individually as applicable (Mail, Contacts, Calendars, Safari Bookmarks, and Notes). Then delete the MobileMe account. Then turn off the device and turn it back on again to ensure that all data is completely erased locally as well as on the MobileMe server.
  6. Erase Local Sync Data. If necessary, you can Reset Sync Data by holding the option key while clicking on the Synchronization icon in the menu bar. This will delete and refresh the local synchronization information on your computer. It may still be necessary to clean out the sync data on MobileMe.
  7. Erase MobileMe Sync Data. To erase MobileMe sync data, go to MobileMe in System Preferences. Click on the Sync tab to view sync options. Click on Advanced. You will see one or more computers listed as being synchronized using the current MobileMe account. Click on each one and then click the Stop Syncing Computer option that appears. This will delete that information from MobileMe.
  8. Configure Devices. Now configure all of your devices again to synchronize with the MobileMe service. Start with your desktop computer which presumably (according to step #1) has all of your current Calendar, Contacts, Notes, and Safari Bookmarks. Be sure to allow enough time initially for the computer to fully repopulate the MobileMe online synchronization system before synchronizing other devices. Having the synchronization setting configured for Automatic will ensure that changes in the calendar will be pushed to the server immediately.

Conclusion. By following the above steps, you should have cleared out all synchronization data. If any files were corrupted, they should now be starting clean from your local application data. The problem may resurface due to the problem causes listed at the top of this page.

Commentary. Below is a commentary from Gregory Johnson about this issue.

“One day I started having a problem with duplicate entries in my iCal calendar. I thought the problem may be caused by one or more of my multiple devices synchronizing improperly. I finally turned off everything except my iPhone. The problem persisted. I then deleted all synchronization information (as described further down on this page), and that seemed to fix the problem, but occasionally it happens again.

It seems to happen when I create an appointment, and then make a change to it shortly after. Or, if multiple devices are synchronizing, and a change is made before all devices have fully synchronized. When synchronizing with MobileMe, it seems that there’s a hidden central repository for all calendar items.

I’ve occasionally had the horrible experience of the MobileMe synchronization erasing items from the calendar because it thinks they don’t belong there. Sometimes duplicates are created.

These problems may happen more frequently during weekday business hours at times when high usage puts a strain on the main system.” ~ Gregory Johnson

Additional Instructions. The following creative solution is from MacBob1 from the Apple iCal discussion forum on this topic.

To fix the duplication problem, do the following: (needless to say, proceed at your own risk and backup).

1. First, go to MobileMe settings within system preferences and log out of MobileMe.
2. Attempt logging back into MM within system preferences by entering a false user id and false password (this will return a invalid login response but it will clear out any bad metadata).
3. Go to iCal and clean up everything you can, delete duplicates and any other problem items. Get it looking like you want.
4. (Temporarily) remove any subscribed calendars
5. Once iCal looks like it should, perform a backup.
6. Now, export a .ics backup file for each of your cleaned up calendars (File > Export > Export).
7. Delete all the calendars from iCal (after you have successfully exported backups).
8. In Finder, go to your home directory > library > calendars
9. Delete the Calendar Cache file. If you feel comfortable with it, go ahead and delete everything else in this directory. These are the calendars within iCal. (If you have exported backups of what you want, this should not be an issue).
10. Return to system preferences and go to Accounts
11. Create a new administrator level account (call it test or whatever you like)
12. Log out of your primary user account and log into this new test account
13. Launch iCal.
14. Verify that you should have two blank calendars, home & work.
15. Go to system preferences and launch MobileMe settings
16. Login to MobileMe
17. Go to the sync tab, and for now, choose sync manually (adjust this to automatically or whatever you like after the fix is in).
You should get a prompt to sync using data from either iCal on your Mac or from Mobile Me. Select “from Mac (iCal).” Because you are in this new user account with blank calendars in iCal, this will remove any and all calendars currently on MobileMe. You can verify this by logging into me.com after the sync is completed.
18. Once verified that your MobileMe calendars are cleared, return to Mobile Me system preferences and log out of MobileMe.
19. Now, log out of this test level user account and log back in to your primary account.
20. Launch iCal and import your .ics backups and verify that your iCal looks the way you want it.
21. Go to system preferences (yet again), and log into MobileMe. This time, go to “advanced settings” and reset sync history. When prompted, replace info on MobileMe with data “from this computer”.
22. Log back into me.com and verify that your MobileMe calendar should look good now and include the correct calendar items.
23. Re-subscribe to any caldav calendars you need (see notes about subcription calendars at bottom)

At this point, my problems were solved and I’ve been in good shape since.
Update: After I fixed my my issues, the duplication problem started to re-occur once I tried syncing “subscribed” calendars to my iPhone and iPad. Corrected this quickly… TIP: do not sync “subscribed” calendars on your devices by selecting them from the calendar sync section under the info tab in your iphone/ipad sync settings within iTunes. These will be pushed through MobileMe already and would otherwise create a duplication problem as you would be essentially syncing them through multiple methods (from your computer in addition to the cloud).

By Greg Johnson

Greg Johnson is a freelance writer in Iowa City and also the founder and Director of the ResourcesForLife.com website. He also manages IowaCityWebDesignArtist.com and many other topic specific websites. Learn more at AboutGregJohnson.com