-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Could not cast value of type 'DetoxAppDelegateProxy' (0x1043b7118) to 'AppDelegate' (0x104142a68). #165
Comments
I need more info. Please provide a demo project that replicates this. Thanks |
@pvinis Hello. Still waiting for that demo project. Thanks |
Hmm, this seems to be the issue discussed elsewhere about Swift. |
@LeoNatan Yep, I am hitting this as well. Unfortunately this is a closed source app so I can't show it. This is the full stack trace:
We use Swift heavily, and it's interesting that I see a reference to the |
Oh, I bet this is the line that's failing: let appDelegate = UIApplication.shared.delegate as! AppDelegate I'm guessing detox injects a different delegate class or something? I'm not too advanced with Swift. Any pointers on what I should debug next? I'll keep looking, and if I can't figure it out I'll try to make a demo project. |
I am able to get it work if I comment out these lines! So the question is: how can we get access to the app delegate in Swift? |
I think I have an idea why it happens and will be able to provide a fix soon. |
my app is also a mix of swift and objc. @jlongster how did you get that stacktrace? |
Alright guys, I pushed a fix for this issue. Apologies it took a while. Should be available in the next release of Detox. |
…ObjC runtime to dynamically subclass the delegate class with own functionality. Closes #165 Add Swift example project for testing.
this error appears on the simulator system log, during the detox init.
then the init just times out.
The text was updated successfully, but these errors were encountered: