Errata for Combine: Asynchronous Programming with Swift 1st Edition

Wow, thanks for the valuable feedback! It really helps improve the book for all readers :+1:t3:

No problem. Happy to help and will be ready to look into future releases as soon as possible when they become available.

Thank you so much for your feedback! Early access editions are an awesome time to get this feedback address and every piece of your feedback will make the book even better! @swiftlearnerforlife
:smile_cat:

No problem. Any idea when your next release will be? Getting slightly blocked on the best way to make api calls with Combine so really looking forward to the networking chapter!

We’re not ready to publicly announce the release date - the most I can say is it won’t be too much longer! :]

2 Likes

page 58, last paragraph of Solution section doesn’t seem to belong there.

FYI - sharing the names of the chapters will be immensely helpful for Errata of all sorts. Thanks!

Page 66: The output from the map key paths example contains one more item than present in the example above.

Page 67: The example output does not match example code. Example code does not prefix the strings with “[name] wrote:”

Page 90: 2. Use the last(where:) operator to find the last emitted even value.

Page 106: The prepend(Output…) code and description of what is happening don’t match

Page 120: switchToLatest example needs import of UIKit too

Hey all!
I’m happy to say all of your notes have been applied to the last EA 3 release !

Please, keep sending us your feedback before the final release — you’ve all been an amazing help for polishing this book so we can deliver to best book to you, and other readers :slight_smile:

Thank you from the entire book team.

would be helpful to use the v0.2.0 numbering in comments like this because I don’t see the “EA 3” on the PDF anywhere. (thanks for versioning the PDFs clearly!)

Same point as Errata for Combine: Asynchronous Programming with Swift 1st Edition - #15 by gilroykilroy I think, but with specific reference due to freak4pc comment:

In the Challenge portion of Chapter 2 right above “Key points” (page 58 on my screen for v0.2.0), this text seems likely to have been from something entirely different since neither “CurrentValueSubject” or “loggedOut” are used in the challenge code and the line in question is printed out because “example( of: String … )” prints out the string passed in.

The first line printed is because you used a CurrentValueSubject with an initial

value of loggedOut.

Will I get an email when the Combine book is published? (v1) (I have purchased)

Yup, you’re supposed to get an e-mail once the full release is out :slight_smile: You can also follow @rwenderlich on Twitter to get the latest news on that.

@dad great catch! Will have that fixed for the final release.

Happy for more feedback from everyone as we approach the final release of the book! :]

Hi @dad, thanks for pointing this out. I did remove this remnant when it was first reported, but I’m not sure why that change didn’t make it into the last release. However, I just double-checked and it’s definitely not there in the current version, for the next release. Thanks again and I hope you’re enjoying the book so far!

1 Like

@freak4pc Just to let you know: I did not get an email saying that v0.3.0 was released and I would have expected to (it was at v0.2.0 when I purchased). Could have just been a crazy timing thing, but thought I’d let you know.

Hey, I finished reading v0.3 and so far it is great. Congrats!

I did catch some small typos here and there, but the one I can remember is in Chapter 6 (page 147) when talking about debounce and throttle. Specifically the timing example typingHelloWorld. The last element finishes at 2.5 seconds; however 2 pages later (in the debounce printout), the code finishes at 2.7 and 3.7 (instead of 2.5 and 3.5). Also 2.1 is repeated twice (instead of being 2.0 and 2.1). The same thing happens with the throttle printout.

I know the explanation is a bit confusing, but please check the code and it should be clear. The example is great to figure out the difference between the two functions. I quite liked it! I would have loved a side-by-side comparison, though. Something similar to this:

Table

It is just a suggestion, since I found myself going back and forth through the different pages. In any case, keep up the good work.

v0.3 Chapter 2, page 54

This happens because the subject previously sent a completion event that the second subscriber did receive but the first subscriber did not because it was no longer subscribed

Looks like it should be:

This happens because the subject previously sent a completion event that the first subscriber did receive but the second subscriber did not because it was no longer subscribed

P48
You also add a subscriptions set in which you’ll store the subscriptions to the future in the example

This never happens

P63
Type erasure enables prevents callers from being able to access additional details of the underlying type

Type erasure prevents callers from being able to access additional details of the underlying type

Chapter 7
Starter Playground is the same as Finish Playground i.e all the code has been filled in.

Chapter 8 – project doesn’t work if you try and resave photos due to the cancel subscription call in viewWillDisappear. To replicate - go back to PhotosViewController a second time and try and save more photos.
( Is storing each subscriber in subscriptions not sufficient and doesn’t the subscriber get removed once photosViewController is dismissed and deinitialized ???)

P209
A random p is included after
Websocket tasks to connect to websockets.

Hi @dehesa,

Thanks for taking the time to write down your notes and make this very nice table. While it’s too late to change this edition of the book we may definitely consider something similar to highlight the differences between throttle and debounce. It is a nice visual cheat sheet that will help beginners. Congrats for coming up with this!

Regarding the timing issues, there may be some slight discrepancy (delay) due to scheduling on a queue: delivery at a precise time is not guaranteed when using DispatchQueue.asyncAfter (note the after part of the call). This is something I’ll make a note about in the next edition of the book, thanks for catching it!

v0.3
P73
There is an inconsistency between the code and the shown output.
I think the following line is missing:

publisher.send(Coordinate(x: 0, y: 5))

1 Like