iBooks GUID Problem When Duplicating iBooks Author Documents

norton to iabaMy wife embarked on creating a textbook for Major British Writers at Abilene Christian University last summer. In the process she ran into a problem after duplicating iBooks Author (IBA) files to break up the book. When her students attempted to download and install the books, they found they could only have one of them on their iPads at a time. I’m writing this post to document what causes this and how I fixed it.

A Short History of the Problem.

If you think about it this was a prime textbook to move to digital. Every student has had to buy the Norton Anthology, a massive 4 inch thick tome that contains works written hundreds of years ago and now in the public domain. So gathering these works into a digital format should almost eliminate the cost of the book, and save the student having to carry around this 10 lb book everywhere.

As she was working on it, after gathering many of the works, she felt the content was too long for just one iBook. She decided to break it into four books, broken down by the era of the works ie. Renaissance, Neoclassical, Old English, Middle English.

You would think this would be a simple process, but it isn’t. You can’t cut and paste entire pages and sections from one iBooks Author document to another. Even cutting and pasting individual parts doesn’t move all the data and template information.

Her solution was to duplicate her original document and then delete the parts she didn’t want for each book. This gave her all the template layout she’d done, and all the content she added and formatted.

The Symptoms

This seemed to work fine. She edited the now four books, published them directly from iBooks Author to her iPad with no problem. Then to distribute them to her class she exported .ibooks documents and put them on a server. The students connected directly from their iPads in Safari and downloaded them. She wasn’t distributing via iTunes yet because the books are still works in progress.

Then the problem showed up.

The students downloaded the first book fine, but when they attempted to add a second book, iBooks on their iPad told them that book was already installed on their iPad. It was seeing both books as the same, even though they had different titles and content.

She tried changing every setting she could find in iBooks Author but nothing mattered.

The Problem

After her description I started having an idea what the problem was. It seemed to me Apple was using something internal to the file to uniquely identify a book. Similar to what they do with applications, and I guessed it was the same kind of identifier.

I expected the iBooks files to actually be bundles like applications and many other document types are. But it turns out they aren’t. I’m still not actually sure what file type they are, but BBEdit knows. I dropped the IBA file on BBEdit, expecting to wade through the binary format to find the expected identifier. BBEdit displayed the file as a collection of subfiles. Most were media files – jpegs, pdfs, etc – for the things included in the book. But down in the middle of the list of files was one called “index.xml”.

Viewing index.xml, I found what I was looking for. A GUID tag with the recognizable 32 character string of numbers and letters. All four of her IBA files had the same GUID.

I also opened the .ibooks file and there were a couple of places this GUID number appeared, but I decided they weren’t the place to do the edits, because when she makes changes and generates a new .ibooks file, they would get blown away.

The Solution

Once I knew the problem the solution was pretty easy.

1. Generate a new GUID.

If you have the Xcode developer tools installed, open the terminal and type “uuidgen” and hit return. You’ll get a new UUID.

uuidgen terminal

2. Open your .iba file in BBEdit and find the index.xml file.
bbedit index ss
Once you select this file from the list, you will get 2 lines of XML displayed on the right. Turn on “Soft Wrap Text” so you can more easily see the XML.

3. Look for the XML tag with GUID in it.

There should be a line that looks something like this:

<sl:textbook sl:in-toc-upgraded=”true” sl:GUID=”A8C59273-86AC-43D7-BCE2-A6916B805302″>

4. Replace the GUID with your new one.

Do I really need to explain how to copy and paste?

Then save the file.

That’s it. Now your IBA file has a new non-duplicate GUID for the book. You can re-export to generate a new .ibooks file and there shouldn’t be a conflict.

One Comment

  1. Davide says:

    Fantastic, this saved me in deployement of the same iBook in two language for my clients, THANKS A LOT!

Comments are closed.