Rxswift: RxExample UIImagePickerController crash on checkSelectorIsObservable

Created on 25 Nov 2017  路  3Comments  路  Source: ReactiveX/RxSwift

Short description of the issue:

I tried to use the source code under RxExample for UIImagePickerController. Every time I try to subscribe to either didFinishPickingMediaWithInfo or didCancel the app crashes. It looks like the delegate is not responding to the delegate methods.

It crashes in DelegateProxy.checkSelectorIsObservable with This class doesn't respond to selector in line 175.

Expected outcome:

That it doesn't crash.

What actually happens:

The app crashes when trying to verify that the delegate responds to the selector

Self contained code example that reproduces the issue:

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

4.0.0

Platform/Environment

  • [x] iOS
  • [ ] macOS
  • [ ] tvOS
  • [ ] watchOS
  • [ ] playgrounds

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • [x] easy, 100% repro
  • [ ] sometimes, 10%-100%
  • [ ] hard, 2% - 10%
  • [ ] extremely hard, %0 - 2%

Xcode version:

Version 9.1 (9B55)

Installation method:

  • [x] CocoaPods
  • [ ] Carthage
  • [ ] Git submodules

I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)

  • [x] yes (which ones)
  • [ ] no

7 & 8

Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)

  • [ ] just starting
  • [ ] I have a small code base
  • [x] I have a significant code base

Most helpful comment

well, the following code was missing on my end

RxImagePickerDelegateProxy.register { RxImagePickerDelegateProxy(imagePicker: $0) }

All 3 comments

Apparently the delegate is of the wrong type. In my app it's of type RxNavigationControllerDelegateProxy and in the Example app it's of type RxImagePickerDelegateProxy. Still not sure why this is happening.

well, the following code was missing on my end

RxImagePickerDelegateProxy.register { RxImagePickerDelegateProxy(imagePicker: $0) }

Just note: the code above should be added at AppDelegate at didFinishLaunchingWithOptions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmial picture dmial  路  3Comments

retsohuang picture retsohuang  路  3Comments

acecilia picture acecilia  路  3Comments

RafaelPlantard picture RafaelPlantard  路  3Comments

gregpardo picture gregpardo  路  4Comments