While Swift itself is open source (thanks Apple!), "The Swift Programming Language" book is not. Version 5.6 beta is copyright 2022 by Apple and all rights are reserved (full license below).
This makes it problematic to use substantial excerpts (beyond fair use) for even non-commercial educational content.
By contrast, Apple Education's "Swift Fundamentals" and "Swift Data Collections" books include slide content for educators which is licensed by Apple Inc. under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license (Creative Commons — Attribution-NonCommercial-ShareAlike 4.0 International — CC BY-NC-SA 4.0).
I've opened FB9892954 with Apple to suggest a more lenient license. I personally think the non-commercial attribution share-alike license would be perfect.
I'm posting here in the hopes that people with authority over documentation at Apple may notice and license The Swift Book more leniently going forward. Ideally before 5.6 gets fully released in (presumably) June 2022.
Full current license from the last page of "The Swift Programming Language (5.6 beta)":
Copyright © 2022 Apple Inc.
All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Inc., with the following exceptions: Any person is hereby authorized to store documentation on a single computer or device for personal use only and to print copies of documentation for personal use provided that the documentation contains Apple’s copyright notice.
No licenses, express or implied, are granted with respect to any of the technology described in this document. Apple retains all intellectual property rights associated with the technology described in this document. This document is intended to assist application developers to develop applications only for Apple-branded products.”