Beginning RxSwift - Part 10: Challenge: Create | Ray Wenderlich Videos

Put your new skills to work by creating a reactive algorithm to deal hands of blackjack.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4743-beginning-rxswift/lessons/10

I’m getting problems with the lookup of the symbols for RxSwift in the playground for lesson 6 and lesson 8. This is the error for lesson 8:

Playground execution failed:

error: Couldn't lookup symbols:
  __T07RxSwift14PublishSubjectCMa
  __T07RxSwift10DisposeBagCACycfC
  __T07RxSwift14PublishSubjectCACyxGycfC
  __T07RxSwift10DisposeBagCMa

Hi @nightfox50, this is due to an issue with Xcode and CocoaPods. Here are some suggestions and I hope one of them resolves the issue for you. First, check that you have a simulator selected and not an actual device for your active scheme. If that doesn’t work, check out these threads for some possible other resolutions or alternative approaches…

Hello,

I’ve called deal function multiple times, one time, the points is over 21 so, it return with Error Busted. But it still continue to run the below deal function. I thought, once publishSubject emitted by Error, it should terminate. May I know why the function continue to run after returning with Error.

      deal(1)
      deal(2)
      deal(3)
      deal(4)
      deal(5)

---- PublishSubject ----

deal for card count = 1
dealHand: [("πŸƒ—", 7)] -> cards πŸƒ— with points 7

deal for card count = 2
dealHand: [(β€œπŸƒ“β€, 3), (β€œπŸ‚·β€, 7)] β†’ cards πŸƒ“πŸ‚· with points 10

deal for card count = 3
busted: [("πŸƒ", 10), ("πŸƒ…", 5), ("πŸ‚·", 7)]
**error busted**

deal for card count = 4
busted: [(β€œπŸƒ”β€, 4), (β€œπŸ‚±β€, 11), (β€œπŸƒŽβ€, 10), (β€œπŸ‚Ήβ€, 9)]

deal for card count = 5
busted: [("πŸ‚·", 7), ("πŸƒŠ", 10), ("πŸƒ—", 7), ("πŸ‚΄", 4), ("πŸƒ…", 5)]