Cannot find sample code anywhere

Been searching for a long time now for the sample code. The link in the book leads to the store. There are no links to any sample code. Finally found something on GitHub (is that official?), but it looks different than the book. It surprises how hard it is to find it, to the point I’ve ended up posting here.
There’s no ‘Starter.playground’.
There’s no “Add your code here”.
Cannot really follow the book.

The first code snippet suggest there’s a func called example(of:). It will not compile since there is not such function. Looks like it’s demo(describing:) now? (Again, assuming since I could not find any official post about it).

Would be nice to have somewhere posted, the actual diff, where one could at least go on with the book and not searching the web.

(Maybe this post should be in ‘Errata for Combine…’)

Hi @bauermusic, welcome to the forum community and happy new year! I was able to download the materials for the book by tapping on the “Download Supported Materials”.
Screen Shot 2021-01-02 at 12.51.06 PM

Then it should link you to the Ray Wenderlich Github repository: GitHub - raywenderlich/comb-materials at editions/2.0

This repository should have a green button called “Code” and by tapping on that you would then be able to download a Zip folder containing all of the book’s materials.
Screen Shot 2021-01-02 at 12.52.45 PM

Once the folder is on your computer you can then view the various chapter materials. For example you would see a folder titled “02-publishers-and-subjects” and that folder would have a “Starter.playground” file.

Please let us know if you’re having other difficulties with finding source material.

Best,
Gina

HI Gina,

Thank you for the replay and thanks for the link!
This is what I see in the store page (if I use https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0):
Screen Shot 2021-01-03 at 8.06.48 AM

Maybe this post will help other as well.

Also, just realized I can get there by clicking the ‘Look Inside’. It leads to a page with the materials link.

Hi @bauermusic

Do you own this book? The screenshot you sent is how the page looks for a user that doesn’t own the book (hence why we don’t link to the materials—one shouldn’t need the materials unless one is reading the book…).

It’s possible that if you’re seeing this then it is because there is a problem with your account, and it is incorrectly not recognising that you either own the book or have a subscription that allows you to read it.

sam

Hi Sam,

I bought the book through Amazon (softcover). I thought that could be the issue but I could not find a place for someone who already ‘owns a book’ link. Is there a place (I could have missed) where I set my book credentials?

Ah—I see! Did you try the link to download materials that’s printed inside the book? That should take you to a page that provides download links for print versions.

Apologies if you’ve done this and it didn’t work…

sam

Hmm, so it now works. I must have typed something wrong before, possibly added ‘www’ before ‘store.raywenderlich’…
I’ll go have another bite of my hat then…

Thanks a lot! Actually glad it was a miss on my side.

1 Like