-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash while trying to forward method from RxApplicationDelegateProxy #11
Comments
Thanks for opening the issue. I'll try to reproduce the issue. |
This issues #6 Also, should not be a case in ObjectiveC, since we could cast UIApplication.sharedApplication.delegate to (id) and as a user of it - I should not worry how Proxy handles forwarding. |
From the other side, ObjectiveC side of RxCocoa setter is working:
So my screenshots could be easily misleading since xcode bug of showing bridgeable variables to be nil |
Implementing
Fixes an issue, but I am not sure if this solution stable should be done here or like issue in RxCocoa |
I did not have time to setup a new Objective-C project yet but I tried your scenario with one of my Swift projects. Everything is working fine when your AppDelegate is a Swift class. The issue seems to be related to having a Objective-C AppDelegate. I think we should open a new issue at RxCocoa. |
@zulkis Thanks! |
Any update on this? I'm having the same issue in a mixed Objective C/Swift project, AppDelegate being ObjC. Thanks |
@kanstraktar Unfortunately this issue seems to be caused by something inside RxSwift. There is an open PR (ReactiveX/RxSwift#1503) with a fix but there seems to be some uncertainty why the fix is needed . Have you tried the suggested fix? Maybe you can provide some additional info there? |
I'll close this issue as this has not seen any feedback for over a year. Thank you guys for your feedback! |
It was easy recreate this crash if you have objective-c app with code like this in app delegate
Now any calls sharedDelegate in objective-c will return proxy and crash when you try access to any property of AppDelegate.
|
I implemented UNUserNotificationCenterDelegate protocol in my AppDelegate,
then use UIApplication.shared.rx.appState.map...etc
Then after getting push from system RxApplicationDelegateProxy crashed with unrecognized selector at [RxAppState.RxApplicationDelegateProxy userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]
After a bit of debugging it seems that forward delegate in RxCocoa's DelegateProxy is nil
The text was updated successfully, but these errors were encountered: