Saturday 7 May 2016

Treating Painfully Chapped Lips


  1. Exfoliate. Dry your lips. Take some granulated sugar and rub your lips with the sugar. This is a pleasant way of removing dry flaky skin.
  2. When you're done, wash away the sugar with a little water and pat your lips dry with a towel.
  3. Treat and protect. Apply an (extremely) small amount of coconut oil. Coconut oil is solid at room temperature; a tiny amount goes a long way.
  4. For the first day, reapply as necessary. You should see a significant improvement in 24 hours.
  5. Afterwards, as a general rule, reapply as infrequently as possible, waiting until you really need it. Applying too often seems to make things worse.

Friday 6 May 2016

Fixing Two Issues with iCloud sync not working with iBooks on iOS 9

Scenario One. You're busy creating an ePub. You make some changes and reload the book onto your iPad so you can view the changes. But when you try to open the book in iBooks, it barfs out an error message along the lines of, "Failed to load book because the requested resource is missing," and immediately closes the book.

What happened? You created a number of chapters, say chapter1.xhtml, chapter2.xhtml, and chapter3.xhtml. You flipped through the chapters until you were at chapter3.xhtml. Then you closed the eBook on your iPad and did some more work. In the course of your work you either deleted or renamed chapter3.xhtml. Even when you delete an eBook, your iPad remembers your place from last time you closed the book. So when you reload the book and try to open it, iBooks looks for the "missing" chapter, can't find it, has an existential crisis, and quits.

The solution. If you can remember the name of the file you renamed or deleted, create an empty file with the same name, reload the book on your iPad, and navigate away from the offending section of the book. If that doesn't work, try the fix for Scenario Two below.

Scenario Two. You're busy creating an ePub. You make some changes and reload the book onto your iPad so you can view the changes. But when you try to open the book in iBooks, you can't see any of the changes. You see an older version of the ePub.

What happened? I'm not 100% sure. Looks like under some circumstances even when you delete a book, iCloud keeps a local copy. Then when you try to load a new version of the book that it thinks is the same as the old version, it can't be arsed to actually load the new version and simply brings the old local copy back from the grave.

The solution.
  1. Change both a) the ePub filename; and b) the title of the book in the .opf file. (Yes, you have to do both or the workaround won't work.)
  2. Import the book into iBooks on Mac OS X as usual and sync to your iPad.
  3. Open the book and make sure the changes are present.
Oops, did you already use the final title of the book? Then you're screwed; you'll never be able to use it again without reverting to that earlier version. The only workaround: change the title to something you can live with, e.g. capitalize every word in the title, even prepositions (assuming you hadn't already done that; if so, do the opposite)

In terms of best practices, I'd suggest that until Apple fixes these issues (HA!) the best workaround is to constantly update the filename and book title. So if your book is called "Fubar," enter the title as "Fubar v.1" in the .opf file and call the file "foo.v.1.epub". Then whenever you make changes to the book, increment the version number in the title and the filename by 1 and reload onto your iPad. Hey, at least it works ...