iBooks Fix: Syncing ePub data between Mac and iOS devices

My excitement for iBooks being released on the Mac died when I finally got my hands on it when Mavericks first came out. The fact that it ripped my books out of iTunes and didn’t carryover the metadata that I had added to them, and giving all of the books non descriptive titles within the Finder was my first issue. The second being the fact that I was not able to sync any data (position, bookmarks, notes etc) between the ePubs I currently had on my iOS devices with the Mac version of iBooks.[1] I was confused because this task worked great between my iPhone and my iPad. I spent countless amounts of time opening the book on one device, waiting a minute or two for it to sync, then opening it on my Mac and the book would open to the cover, instead of to the page that it was supposed to be on.

Eventually I gave up trying to get it to work until I was recently using PhoneView to download various items from my iPad one day when it dawned on me that there is a section in PhoneView to access the books that are on the device that you have connected to it.

So I copied an ePub from my iPad I purchased form O’rielly Media about web design to my desktop, that I had been highlighting and taking notes in. My thought process was that this book has some type of data associated with it, and the syncing works between my iPhone and iPad so if I were to use the same file on my Mac then the sync should be fixed. I then wondered what would happen if I put the book in a place that I could get at it from all of my devices. I moved it to my local Dropbox folder waited for it to upload and then I opened the file in iBooks on my Macbook, and sure enough the highlights and my current position synced perfectly. I open the book on my iMac and verified that all of the same data was accessible on that machine.

The next step was to make sure that this worked with other books so I uploaded a couple of ePubs that I didn’t have loaded on any of my devices to Dropbox and loaded them into iBooks on each of my devices, highlighted some sections, took some notes and once again it worked perfectly.

Syncing ePubs with iBooks on all devices:

  • Put the ePub in a central location that you can load it into iBooks from such as Dropbox
  • Do not change the name of the book if you have already loaded the book on one of your devices. The book needs to have the same attributes on all of your devices in order for it to recognize that there is data available for it to be syncing.
  • Load the book into iBooks on all of your devices. For iOS if you are using DropBox you will need to have the Dropbox app installed you can select the book and then hit the share icon, and tap on the Open In… button.
  • Happy Syncing

  1. Even the iCloud reset article that I wrote didn’t fix the sync issues  ↩

Forcing iCloud To Reset Syncing On All Devices

Update:

If you have upgraded to iCloud Drive you will not be able to force iCloud to sync using the method described below. From research I am seeing that the best way to force a sync is to reboot and it should refresh iCloud, and or to create a new document. I am still trying to figure out if there are other ways to force iCloud Drive to sync.

Note: Solution is below if you would like to skip the backstory.

I have heard the frustrations over how iCloud syncs and how much of a nightmare it is for developers to implement it into their apps. There are many developers who have created their own sync solution as a result of not being able to get their apps to work with iCloud syncing. There are also stories of people loosing their data while using iCloud.

I personally have never had a problem with syncing data from the apps that use iCloud to sync until my wife started having problems with 1Password a couple of weeks ago, which I detailed here.[1] Even though that was my wife’s data I am I.T. person for our house and I had to deal with the frustration of syncing not working.

Fast forward a couple of weeks later and I decided that I wanted to upgrade my laptop to a MacBook Air and prepare my MacBook Pro to sell it to fund the purchase of my new computer. I ordered the Air before selling the Pro because I wanted to make sure that I transferred all of the data over to the new computer before I wiped my Pro. I turned on my Air and went through the set up process signing into my iCloud account and turning on all of the features of the service.

The first app that I installed was 1Password[2] as a lot of my password are long passwords using the built in generator I would have preferred to have that installed on my machine before I proceeded to install anything else. I opened up 1Password, clicked that I am an existing user and it asked me where my data was. I selected iCloud and the window stated that it could not find any existing data in iCloud. I have an iPhone, iPad, iMac, and a MacBook Pro that I have never had a problem with my 1Password syncing between, so I was confused as to why it wasn’t finding the data now. Since having dealt with my wife’s 1Password issues a couple of weeks ago I thought I would have this fixed in no time. That would prove to be an incorrect statement.

My first move was to check my Mobile Documents folder, and I examined the folder that contains the 1Password data called 2BUA8C4S2C.com.agilebits.onepassword, and there were 24 files in it and the size was 867kb. I checked my iMac and noticed that it had 32 files in it and was 6.6mb in size. Another thing that I noticed was that my Mobile Documents overall folder size on my Air was 401mb, but on my iMac it was 557MB. I went into System Preferences -> iCloud and unchecked Documents & Data and selected Delete From Mac. Restarted the computer went to ~/Library and dragged the Mobile Documents.xxxxxx[3] to the trash. Restarted and re-enabled Documents & Data and waited quite awhile to make sure that all of the data had time to download. Upon opening 1Password I was greeted with the same window stating that my data could not be found. I uninstalled 1password, removing it’s associated preference files, and reinstalled only to receive the same error. Fed up with trying to make it work I ran the 1Password DiagnosticTool and sent their support an email.

The next night I hadn’t heard back from AgileBits so I decided to call up Apple. In my mind I concluded that the problem was with iCloud and not 1Password. The gentleman who answered the phone asked me why I had called and I let him know that I was having an issue with data not syncing with iCloud on my new computer. I said that I have it working with all of my current devices but it seems like not all of my documents are downloading to the Air. When he found out that the issue was with 1Password he said that there was nothing that he could because Apple does not support the syncing of third party apps with iCloud. He said that the developer must not have coded their application correctly and that it is an issue I need to take up with them.[4] I was instantly livid but kept my cool saying sternly You mean to tell me that this application works flawlessly on four other devices yet it won’t sync to this brand new computer, because it is an app problem? Everything points to this being an issue with iCloud not syncing properly. His reply was that he can understand my frustration and see how I would think that it would be iCloud. I was told that if I was having an issue with my Apple apps syncing with iCloud then he would be able to help me.

After not getting an answer from Apple I decided to open up Byword[2] since it uses iCloud to sync as well, and over half of my documents were missing. I opened up Safari, went to their website and sent an email to their support team. Within an hour I received an email from their support team that said:

Try logging in at http://icloud.com, go to Account Settings , Advanced and perform Reset Documents & Data. Does that fix the syncing issue?
Reset Documents & Data will not delete any of documents or data. It will simply reset the syncing information on all your devices that the sync process starts with a clean slate on all them.

I had not tried that because I didn’t know that the setting even existed. However it worked perfectly as described. It worked so well in fact that it fixed sync issues with apps that I didn’t even know I had a problem with, because my Mobile Documents was now 805MB now instead of the original 557MB that I thought it was. The conclusion that I have made is that it was a problem with iCloud syncing all along so below I have provided a couple of screen shots detailing how to force iCloud to re-sync to all of your devices.

Force iCloud Sync

Go to icloud.com and log in with your Apple ID.

From the iCloud home screen click on your name in the upper right hand corner.

Within the drop down menu click on Account Settings.

Click the Advanced row

Select the option to Reset Documents & Data. You will be taken to one more screen that tells you:

Reset and merge all documents and data on iCloud with what is currently on your devices. No documents or data will be deleted. More Details.

Click Reset Documents & Data again.

After that you will want to restart every device that is associated with your Apple ID and that has iCloud sync enabled. Any problems that you have had with applications syncing should now be fixed.

This option should be built into the iCloud Preference Pane, and the iCloud Settings for iOS instead of being an obscure setting on the web version of iCloud. When I called AppleCare the Advisor should have at least told me about this option[5] rather than trying to say that the developers at AgileBits must not know how to program.


  1. I actually take that back. I have had problems with Apple’s notes not syncing correctly, and disappearing. So much so that I use Simplenote now.  ↩

  2. Disclosure: Link is an affiliate link to the iTunes store.  ↩

  3. The xxxxx will be a series of numbers and be shown like Mobile Documents.92991882  ↩

  4. My first thought was you are really going to throw a developer under the bus like that? Developers are dropping the Appstore left and right, so it really isn’t in their best interest to be making comments like that.  ↩

  5. He may not have even known about it, but he should.  ↩

1Password iCloud Syncing Problem Fix

2014-10-21 Update: This guide is for those who have NOT moved to iCloud Drive. I still have not fully investigated where the data has moved once iCloud Drive has been activated.

Recently I discovered that my wife's 1Password information was not syncing correctly with iCloud. I had just updated the password to our Airport and wanted to make sure that her info in 1Password had the new password. I shared the new login with her via iMessage and clicked the link on her Macbook which brought the data into 1Password. I opened up 1Password on her iPhone to copy the new password and set up her wifi for her, and the old router information was in still in her database on her phone. I closed the app, reopened it and checked again; still the same old info. I tried her iPad and got the same results.

What followed next was hours of frustration trying to get all her devices to sync seamlessly. I exported the data from 1Password on her Macbook to her desktop so I had a copy of the data and then removed every trace of 1Password from her computer, stopped syncing the data to iCloud from her devices and deleted the iOS apps from her iPhone and iPad. On her computer I went into the local iCloud folder (~/Library/Mobile Documents) and deleted the two folders that had looked like this

1Password data files located in the ~/Library/Mobile Documents/ Folder

I restarted her computer reinstalled 1Password and imported the data that I had on her desktop. Went into the Preferences, Sync, and chose iCloud Sync. Made sure that the folders in the screenshot above were in the Mobile Documents folder indicating to me that the documents were in the process of being pushed up to iCloud.

I reinstalled the 1Password iOS apps and had to go through the initial setup again. I selected that I am an existing user, chose that I would like to sync with iCloud, and the next screen said that it was looking for existing data, and returned a screen that stated that Data Was Not Found.

At this point I was at a loss for words. I turned to trying to find the answer on the web, and followed the advice, multiple times, that was given on AgileBits Forums:

  • Please ensure that you are logged in with the same iCloud account on all computers and devices.
  • Please ensure that Documents and Data is enabled on all computers and devices.
  • On your iOS devices, open 1Password 4 for iOS, tap Settings > Sync > Sync Service and tap 'Disable Sync’.
  • On the Mac, open 1Password 4 for Mac, and click the 1Password menu, then Preferences. Click Sync, and click Change syncing.
  • Check the box to remove the data from iCloud and confirm that you want to disable sync.
  • Restart the Mac and iOS devices.
  • On the Mac, go back to the Sync preferences, and enable iCloud.
  • Wait about 20 minutes to give iCloud time to run the initial sync to all devices.
  • Go back into the iOS app and re-enable iCloud sync. It should work this time.

The above solution did not work. I had wasted most of my Saturday trying to figure this out, and finally threw in the towel. The next day I tried the above solution again and it did not work. Fed up I contacted AgileBits support team and after multiple back and forth emails I believe that I had stumped them. I appreciated all of their support, but I finally figured out how to get it working again.

At some point in between emails I had decided to go into the iCloud System Preferences and turn off only Documents & Data and I happened to have the Mobile Documents folder open, and noticed that there was a change to the folder name. It went from being named Mobile Documents to Mobile Documents.92991882.

This is what your local iCloud folder looks like when you turn of Documents & Data in the iCloud Preferences

I turned Documents & Data back on and I noticed that the folder changed back to just Mobile Documents. I decided to take all of my previous attempts into account and pieced together the following solution:

Fixing 1Password iCloud Sync Issues:

Macbook Air:

Open 1Password Preference -> Sync -> Change Syncing and check the box that says Delete data from iCloud, and click Disable Sync button. Accept the warning that states that it will delete your data. Quit 1 Password.

Open System Preferences iCloud -> Uncheck Documents & Data -> Click Delete from Mac button

(You may have to restart in between these steps. I did, but am not sure if that is what helped it)

On your iOS devices, now is a good time to go to the iCloud settings -> Documents & Data -> Click the Toggle Switch at the top of the screen, and confirm by clicking Turn Off Documents. Restart Your Devices

In the Finder Menu Bar click Go. Select Go to Folder -> Enter ~/Library/ and click Go Look for the Mobile Documents folder that now has what looks like a file extension at the end of it. Should look like Mobile Documents.92994182 Drag this folder to the trash.

Open System Preferences iCloud -> Re check Documents & Data

This will cause iCloud to re-sync your iCloud folder locally to your Mac.

iOS Devices:

Your devices should have restarted by now.

Go into Settings, Documents & Data and Toggle the Switch back to On.

Open 1Password and follow the setup screen as an existing user, and 1Password will find existing data in iCloud.

I have verified that everything syncs between devices by creating a login on one device and watching it appear on the other two. Hope this helps anyone who is having an issue with their 1Password data not syncing.