Swift: Fetching the updated docs as an ebook

Over at DevForums, users post that the 1.2 docs are online but not accessible in an ebook version.

Visit the prerelease website for the Swift Programming Language and you’ll see that the last update is 3/11/15 and the document revision history goes up to 2/9/15. So how do you get this website into an ebook form suitable for your iPad?

This is what I did.

1. Download Used sitesucker to fetch https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/index.html

Make sure the Download Option is set to Get All Files in Same Directory so you don’t inadvertently download all of developer.apple.com.

2. Locate index.html. Navigate into your Downloads folder into developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language. Find the Index.html folder

3. Launch Calibre. Grab a copy if you don’t already have one.

4. Drag index.html into Calibre. Wait for a while. Reading the metadata and adding to library takes time.

5. Select The Swift Programming Language.  Click Convert books. Choose EPUB or Mobi or whatever from the Output format popup. Set the Author to Apple.

6. Optionally add a cover image. If you want one from your existing Swift Language reference, navigate to ~/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books and find the epub by grepping. Within the epub folder is a file called iTunesArtwork. Copy it to your desktop and add a jpeg extension then drag it into the Book Cover well.

7. Click OK. Wait for the book to convert.

8. Retrieve the new epub. Click Path: Click to Open. Your ebook appears in the newly opened folder. It’s big. Many many pages.


  • I was that user who posted the complaint! I’m updating that thread with a link to this article! Thanks!

  • Unfortunately I cannot replicate your success – the resultant epub book is garbled – obviously I configured the process incorrectly. I updated my original post with what I did, including screen shots (https://devforums.apple.com/message/1119607#1119607)

  • Thank you for this, much appreciated. It is fairly ridiculous that we have to jump through all of these hoops…they should update the damn ebook already.