Using The Swift Programming Language 2.2 from iBooks, i can't seem to copy the text (many lines of code from inside the book) to then test.

Does anybody know why this is happening? In the past I have been able to copy the text from the book however now it is not letting me (it's greyed out).

For example

Cannot Copy and Paste from iBooks

Here is another example of what I mean.

Cannot Copy and Paste from iBooks

  • Welcome to Ask Different. Could you let us know what OS and version of iBooks you are using? there are several on iOS and on Mac so the solution might be easier if you narrow down your setup.
    – bmike
    Commented Feb 2, 2016 at 0:58
  • I can't reproduce the error. In addition to what bmike suggested, can you tell us what device you're using? Have you tested to see if you can copy text from another book?
    – gardenhead
    Commented Feb 2, 2016 at 1:11
  • I am using a Macbook running El Capitan running 10.11.3. iBooks is 1.4. Also if it's any help I seem to have two copies of The Swift Programming Language 2.2, but they are still different (as in they have subtle differences in text and code). Commented Feb 2, 2016 at 2:08
  • Is that a fixed-layout ePub? iBooks has a hard time copying text from some fixed-layout ePubs. Commented Feb 2, 2016 at 6:23
  • I have the same problem on MacOS Sierra 10.12.1, iBooks ver 1.7, Swift 3.0.1. Seems nobody fix this problem...
    – wcf
    Commented Dec 8, 2016 at 7:35

8 Answers 8


Below are steps for copying text from iBooks:

  1. Highlight the passages you wish to copy.
  2. A popup will be opened automatically or you must open a popup using a right click on selected passages.
  3. Select the 'Add Note' option from the popup.
  4. The selected/highlighted text will be shown on the left pane.
  5. Right click on the passages in the left panel and select the 'Copy' option.

I have created a video to show how it works: https://youtu.be/ZQLl_Gl9TMw

Happy coding!

  • While this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Glorfindel
    Commented Jul 28, 2017 at 13:58
  • @Glorfindel, Thank you very much for your suggestions. I heartily Appreciate it. I have updated my answer and Pls let me know if any changes required..Happy Coding..Thanks Again Commented Jul 29, 2017 at 4:21
  • Thanks, this is better now. I hope there's another user around who can improve the grammar (and probably the formatting), I have other duties right now.
    – Glorfindel
    Commented Jul 29, 2017 at 7:45
  • @Glorfindel, I have updated my Grammer. Hope, I think It looks better. Thanks for your suggestions. Commented Jul 29, 2017 at 12:09
  • I have made some changes as well. I tried to cut out the 'fluff' so that it focuses on the actual content of the answer. This is how an ideal Stack Exchange answer would look like (at least to me) so I've upvoted it. (It still has an automatic downvote from the Community ♦ user, because it started out as low-quality. I can't do anything about that.)
    – Glorfindel
    Commented Jul 29, 2017 at 12:14

I was unable to copy code from a sample eBook that I'd downloaded from the iBook store. After purchasing the book, the copy feature worked.

Perhaps this is the source of the reproducibility error.

  • This was the case for me, thanks for pointing this out! Commented Jul 20, 2018 at 18:16

Highlight the passages you wish to copy.

Then go into the show notes area by clicking the show notes icon in the toolbar.

Select the passages you want to copy. Go to edit > copy.


As of January 2018 this is the easiest workaround I've found on iPhone:

  1. Select the text you wish to copy,
  2. Choose Search from popover
    • The text you want is in the search field at the top of the search results screen
  3. Long tap in the search field to open the text selection popover
  4. Choose Select All
  5. Choose Copy

A workaround is to get content from the website. https://docs.swift.org/swift-book/


The only way I found is to use more -> search web and to copy that text from Google search bar.


I believe this may be a copyright issue.

It might have been kindle – I can't remember – but I recall trying to listen to a book using text to speech a while back. At this time, text to speech copied the text to the clipboard. I eventually hit a wall where I couldn't copy text anymore. I believe there may be a limit to how much you're allowed to copy.

Here's an older article talking about this. Granted, this article is old and may be outdated.

Solutions? You need to be careful to research the legality of this, but you might be able to use OCR software to copy stuff – this isn't legal advice, so you need to figure this out yourself.


To copy on iOS or iPadOS, you need to follow these steps:

  1. Tap and hold the first word, until the selection shows up.

    Waiting less than that causes the text to be highlighted instead, which is not what we want.

  2. Drag the finger until you select the entire text that you want to copy.

    As of writing this answer (2022-02-18), there is a limit of 100 characters when searching, so you need to do this multiple times for longer texts.

  3. Tap the selection.

  4. Tap the Search button.

  5. Tap the search field.

  6. Triple-tap the text.

  7. Tap the Cut or Copy button.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .