Rebuilding iCloud Bookmarks

Q.  I have switched on iCloud bookmarks syncing on my Macs and/or iOS devices (iPhone, iPad, etc.).  But changes that I make don’t “stick”.  New bookmarks don't always propagate to other devices, or after a few minutes, bookmarks that I've placed in folders get moved into the loose BOOKMARKS, deleted bookmarks reappear, duplicates appear, or new bookmarks get deleted.  How can I fix this?

THE PROBLEM

iCloud syncs bookmarks changes by sending
transactions of changes.  For example, when you add a new bookmark or folder on your Mac, a transaction is sent to the cloud indicating the name of the item, what folder its in, etc.  Like reconciling a bank statement, however, if a one transaction gets skipped for some reason, future transactions wont make sense.  For example, say that a folder named News is on your iPhone but missing in the cloud.  What does iCloud do if you add a bookmark to News?  Or what if you add a new bookmark under a bookmark which has been deleted on another device?

The only practical fix is to remove all items from all devices except one, and then re-populate them from the one device whose bookmarks you accept as the truth.  Unfortunately, iCloud does not offer users any means to do this.  Switching iCloud syncing
off and back on seems like it should offer an option to do this, but it does not.  The only way to resolve this problem is to manually remove all bookmarks and folders from all devices, then restore upon the clean slate.

POSSIBLE CAUSES

•  Although this is rare nowadays, iCloud can develop this problem all by itself on a bad day.

•  You may have used primitive or older bookmarks management applications such as BookmarkApp or Xmarks for Safari, which were never engineered for compatibility with iCloud, as our apps are.  

•  You or a script modified or replaced Safari’s
Bookmarks.plist file.  You cannot get away with that any more, even if you do it while System Preferences > iCloud > Safari checkbox is switched off.  Though you may examine Safari’s bookmarks and see the expected results immediately after such an operation, your bookmarks are in fact corrupt because iCloud did not get the transactions.  You will eventually see bookmarks moving around, disappearing, etc.

•  You may have a Sync Loop.

Note that the cause of this problem may have occurred months or years ago, because the problem will not clear up by itself, unless you happen to delete all of the offending items on all of your devices.  The only sure fix is to remove all items…

THE FIX

Before beginning to fix, ensure that any possible causes, as explained above, have been removed.

Step 1.  If practical, get all of your devices iCloud-synced-Safari devices (macOS, iOS, PCs running Safari for Windows) in the same room.

Step 2.  If you have been using Smarky, Synkmark, or BookMacster, make sure that you have Paused or un-configured Syncing in all .bmco documents on all of your Macs.  After doing so, verify by checking that, in the main menu, application menu (BookMacster
, Synkmark, or Smarky), the Stop all syncing now menu item is disabled and indicates Nothing to stop.

Step 3.  If you have not already done so, on a Mac, get all of your desired bookmarks into Smarky, Synkmark or Markster, or a BookMacster document.  How you do this depends on where are the desired bookmarks.  If Safari has the bookmarks you want, import from Safari by clicking in the main  menu: File > Import from > Safari.  Read the instructions which  appear and, depending where are the bookmarks you want, consider whether  you want to do a Normal import, or combine bookmarks with an Overlay.  In case you have lost bookmarks recently which you want to recover, other methods are explained in this article.  (If you do not have Smarky, Synkmark or BookMacster, you can use a Netscape-style bookmarks.html file and Safaris File > Import Bookmarks function.)

Step 4.  If desired, for extra extra safety, in Safari on the Mac, click in the menu: FIle > Export Bookmarks.  This will create a .html file which is a little cumbersome to restore from, but unless something else goes wrong you should not 

Step 5.  Ensure that iCloud > Safari syncing is switched
on in all devices whose bookmarks you want synced.

Step 6.  In all such devices, delete all bookmarks and folders in Safari.  (Read this entire step before proceeding.)

Start with your Mac(s) because it’s easier.  For Macs, activate Safari and click in the menu: 
Bookmarks ▸ Edit Bookmarks or Show All Bookmarks, then in the window which appears, delete all bookmarks and all folders.  Also, delete all Reading List items.  To do that, in Safari on a Mac, click in the menu: View > Show Reading List Sidebar.  then perform a secondary click (aka right click or control click) and in the contextual menu which apears, click Clear All Items….

(If you have a lot of bookmarks, and BookMacster, there is faster way…  In BookMacster, click in the menu: File > 
New Collection, select Safari, but don’t import any bookmarks; create a empty document.  Then, File > Export to all (Safari).  Exporting the empty document will delete all in Safari.  When done, File > Close and Delete the empty document.)

After your (first) Mac is clean, wait 20 minutes, then quit and re-launch Safari on each of your other devices.  (Re-launching Safari usually, but not always, immediately pulls in recent changes from iCloud.)  Delete any items which remain.  For iOS devices, click the "open book" icon near the top left.  Navigate through all of the folders and Reading List.  If any items remain, swipe each to the left and tap Delete.

Step 7.  Wait at least 20 minutes, then inspect Safari bookmarks on all devices.  If any have reappered, delete and wait another 20.

Step 8.  Activate Smarky, Synkmark, Markster, or your BookMacster document.  Click the
Content tab.

Step 9.  Reorganize your bookmarks until all is like you want it to appear in Safari.  In particular, you may want to use the menu command 
Bookmarks ▸ Find Duplicates, or Bookmarkshelf ▸ Find Duplicates, and then delete duplicates.

Step 10.  On your Mac, if you had paused or unconfigured syncing by Smarky, Synkmark or BookMacster,
Resume or reconfigure syncing, performing an Export when prompted.  Otherwise, just Export by clicking in the menu: File ▸ Export to Safari.

Step 11.  If you enabled Syncing in Smarky, Synkmark or BookMacster, quit Smarky, Synkmark or BookMacster.

Step 12.  Wait at least 20 minutes, again.  Don’t change any bookmarks anywhere.

Step 13.  If quit, relaunch Smarky, Synkmark or BookMacster and then click in the menu, 
File ▸ Import from … Safari.

Step 14.  Verify that the Status Bar at the bottom of the window indicates that either the export was completed with very few or, more likely zero changes: 
+0 Δ0 ↖0 ↕0 -0 or the entry Same-Skip.  The lack of changes indicates that iCloud did not swoop in and change anything during the 20 minutes between your two exports.  Thumbs up!

Step 15.  If you enabled Syncing in Smarky, Synkmark or BookMacster, quit Smarky, Synkmark or BookMacster.  You are done.  Smarky, Synkmark or BookMacster should now be able to sync any future changes without trouble.