Showing posts with label Versioning. Show all posts
Showing posts with label Versioning. Show all posts

Tuesday, November 27, 2012

Versioning in iBooks (part 2)

Yesterday, after confirming that the new version of The Monarch Butterfly Book had not yet gone live, I called Apple's iBookstore support line—(877) 206-2092 in the US, see end of post for other countries' numbers—and asked what was going on. The guy was very helpful, told me that everyone had been on vacation between November 16 and November 25th, due to the Thanksgiving holiday (about which he and I both decided we were envious), but that they were back yesterday and should get to it shortly.

He also checked that I had the "What's New" material already included, which I guessed indicated that was a sticking point in many updated versions. (Remember to use the latest version of iTunes Producer to include the What's New information.)

And finally, he said he'd escalate my issue so that it would get solved as soon as possible. I almost, in the interest of science, told him not to escalate it, so that I could see and report on the real process, but sorry, dear reader, in the end, I did not.

About 12 hours later, I got the email from Apple confirming that the new version had gone live.

And this morning, I opened iBooks on my iPad and iPhone to see how those changes would be announced. What I saw was that iBooks adds a number to the Store button to indicate how many updates a reader has available, but doesn't indicate which book is affected:

iBooks updates

iBooks versioning on iPad

When the reader presses the Store link in iBooks on the iPad, they will see Update buttons next to the corresponding books:

iBooks versioning on iPad

On iBooks on the iPhone, going to the Store will display an Updates link:

iBooks versioning on iPhone

And when your reader follows the Update link, they'll see which books can be updated:

iBooks versioning on iPhone What's New?

At that point, and only on the iPhone as far as I could tell, the reader can click the What's New arrow to see what has changed in the new version:

iBooks versioning on iPhone

Once they click the Update button, the new version downloads to their device, and initially will be displayed with the blue "New" banner:

iBooks versioning: New banner

Once the reader has looked at the book, they won't be able to tell which version they have. I couldn't figure out any way to get information about a book's version from within iBooks on the iPad at all, or on any device once the update was downloaded. This is a serious shortfalling for what I believe is a very valuable feature.

The only way for the reader to see the versioning information of an existing book, including what has changed from version to version, is to go to the iBookstore, look up the book, scroll down to the bottom of the Book Description or Details area, and check the What's New section.

iBooks Versioning

The reader can also get a full rundown on the differences from one version to the next by clicking Version History. I think it's rather confusing to use a header like "Version 3.0" when what they mean is that the changes listed are for the EPUB3 version of the book. It is only below that you see the version number that I gave the book: 1.1.

Therefore, you might want to add version info to one of the pages of your book (the copyright page perhaps?) if you want readers to be able to tell which version they have. (I'll do this next time.)

iBooks Versioning info

So, still some wrinkles to be ironed out, but I continue to think that versioning is a brilliant idea. Now I have to update some of my other books so I can see what happens with notes and bookmarks (which aren't allowed in a Fixed Layout book like this one.

There were two major errors that were fixed in this version of The Monarch Butterfly book: some arrows that were in the wrong place on page 24, and something much more important, which I'll discuss in my next post, about JPEGs and PNGs.

You can buy The Monarch Butterfly Book on the iBookstore (and thus be notified as described above about new versions), or directly from me (via Kagi) (in which case I'll notify you personally about new versions to this book as well as any new books via email).



Here are the iBookstore support telephone numbers:

Australia: 1300 307 504 (Note that this is a low tariff number.)
France: 0805 540 117
Germany: 0800 664 5307
Italy: 800 915 902
Netherlands: 0800 0201 578
Spain: 900 812 687
U.K.: 0800 975 0615
U.S.: +1 (877) 206-2092
Toll-free from U.S. and Canada.

Friday, November 16, 2012

Versioning in iBooks 3 (part 1)

Another promising new feature announced by Tim Cook about iBooks 3 is the ability to make updates to an ebook, and then make those updates available to readers who have already bought the book. There were a few minor errors in my Monarch Butterfly book so I decided I would use it as a guinea pig to test versioning.

The first thing to note is that versioning only exists for EPUB 3 documents. They can be flowing or fixed layout, but they have to be EPUB 3.

So, my first task was to update the Monarch Butterfly fixed layout book to EPUB 3.

Changes to the OPF file

I began with the OPF file, adding version="3.0" to the initial package element and adding the namespaces that Apple recommends.

I updated the title of my book to indicate the version number, though I'm not sure this is necessary (or desired).

I added the required modification date and time:

<meta property="dcterms:modified">2012-11-06T12:00:00Z</meta>

Pay special attention to the time format: CCYY-MM-DDTHH:MM:SSZ. I tried putting just the year, and EpubCheck gave me an error. Note that both the T and the Z are required.

To make sure my fonts are recognized, Apple now requires this line instead of the com.apple.ibooks.metadata.plist file:

<meta property="ibooks:specified-fonts">true</meta>

And then comes the part where Apple lets you specify the version of your book. You are allowed two dots and three components (so 1.2.1) and up to four numbers per component (which seems excessive, frankly). And these aren't decimal numbers: trailing 0's count to keep them ordered; 1.10 is later than 1.9.

<meta property="ibooks:version">1.1</meta><!--controls versioning in iBooks3-->

Then, since my book is fixed layout, I had to add the EPUB 3 specific metadata:

<meta property="rendition:layout">pre-paginated</meta>
<meta property="rendition:spread">auto</meta>
<meta property="rendition:orientation">auto</meta>


Because my books' pages include Javascript, I had to add properties="scripted" to each of the pages which links to a Javascript file, even if it didn't use Javascript in that particular page.

<item id="milkweed" href="milkweed.xhtml" media-type="application/xhtml+xml" properties="scripted" />

And then I removed the guide section, which is no longer required by Apple (and was already deprecated in the EPUB 3 spec).

</spine>
<!--new to 1.1 guide is removed -->
</package>


New TOC file

EPUB 3 requires a new XHTML-based TOC file, which is a lot easier to write than the old toc.ncx format, since it's just formed by an ol list with links to the various TOC entries. For a Fixed Layout book, for which you want iBooks to create its graphic TOC (made of the covers of the books), just create a single entry to the first page, or cover in my case:

<nav id="toc" epub:type="toc">
<h1 class="chapter">Table of Contents</h1>
<ol>
<li><a href="title.xhtml">The Monarch Butterfly Book</a></li>
</ol>
</nav>


Then, as a replacement to the guide section, add a landmarks section, which works very similarly:

<nav epub:type="landmarks">
<h1>Guide</h1>
<ol>
<li><a epub:type="ibooks:reader-start-page" href="title.xhtml">The Monarch Butterfly Book</a></li>
<li><a epub:type="cover" href="title.xhtml">Cover</a></li>
<li><a epub:type="bodymatter" href="milkweed.xhtml">First page</a></li>
</ol>
</nav>


Finally, declare the new toc.xhtml file in the OPF file, paying special attention to the properties attribute:

<item id="toc" href="toc.xhtml" media-type="application/xhtml+xml" properties="nav"/><!--new in 1.1-->

That's it for the OPF file.

Changes to the XHTML files

In each of the XHTML files, I had to change the meta tag where I declared the character set. It was:

<meta content="text/html; charset=UTF-8" />

and it should be:

<meta charset="UTF-8"/>

I also had a few documents that somehow still had extraneous DOCTYPE elements. I got rid of those and made sure that each XHTML document started like this:

<?xml version="1.0" ?>
<html xmlns:epub="http://www.idpf.org/2007/ops" xmlns="http://www.w3.org/1999/xhtml">
<head>


There were also a few places I had erroneously used character entities, things like &copy; to show the © symbol. Now that I had the proper character set declaration, that was no longer necessary (or allowed). So I simply removed the character entities and replaced them with the characters themselves, typed in directly.

<p>Copyright ©2012 by Elizabeth Castro...

As far as content, I also fixed the error on page 24, which had the blinking arrows in the wrong place:

Wrong arrow placement

And put them where they go:

Correct placement of arrows

I also changed the Javascript so that the arrows would blink more slowly. People seem to have had difficulty finding the captions. It's actually a tricky problem. I want the photos to be displayed without distractions, but I want to offer clues. I haven't quite found the perfect solution yet.

Validating

Once of all of the changes were made, I used EpubCheck to make sure I had done it all correctly. I used the latest version: EpubCheck3RC.

Uploading the new file to the iBookstore

Finally, I uploaded it to Apple's iBookstore with iTunes Producer. When you make changes to a book that already exists, you only have to change the parts in iBooks Producer that are different, and it will only update those pieces of your package. So, I updated the description and then on the Assets page, I clicked the Choose button under Publication, and selected the new updated EPUB file. This screenshot is actually after I've done that. iTunes Producer doesn't give a lot of feedback.

Upload new file in iTunes Producer

And then I got the error I was suspecting:

Versioning error

I was expecting it because Apple says that you have to say what changed in a "Version_whats_new" XML file. I hadn't been able to find where that was.

It turns out I had downloaded the latest version of iTunes Producer, but I hadn't installed it. Once I did that, I was able to add the What's new information on the Book page:

iTunes Producer: What's New

Then I delivered the package again (no need to upload the book files again), and it went through without a hitch.

What I am most interested to see now is how it notifies me (and all of you who have purchased the book through the iBookstore) about the new changes. The new description went live almost immediately, but when I go to iTunes Connect, it tells me that the EPUB 3 version is under review.

iTunes Connect-3

And indeed, I don't see that little update icon that Tim Cook promised. Though I'm left with questions: When does iBooks check? Does versioning only work in iBooks 3? Do I have to open and close the app to force a check?

Update versioning, not yet

When I go to the Purchased section of the iBookstore, I also see that it shows that the book was already downloaded and I have no opportunity to update it. I assume that when the changes go live, this button will change.

Already downloaded

If you haven't bought the book yet, you'll be able to tell if you have the new version by checking page 24 and clicking the info arrow to see where those arrows show up.

And I'll keep you posted about how long it takes to go live. It seems like a really important feature to me. I would have liked to add a note or bookmark to see if those are maintained, but fixed layout format doesn't allow them. I'll have to update one of my other books...

More of my books