-
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
Add exception and signal handling for iOS #453
Conversation
First half of #161
Do we need sth similar on Android? |
Probably, yes. On Android, I would assume, the “attach vector” is larger, where you have Java exceptions, in addition to C++ and signals. |
…s as well as ObjC exceptions
Moved the exception handling to |
This will probably be useful for Android as well. |
detox/ios/Detox/DetoxCrashHandler.mm
Outdated
@@ -0,0 +1,153 @@ | |||
// | |||
// DetoxCrashHandler.m |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably You forgot about one m
in extension 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an Objective C file before, but now Objective C++.
# Conflicts: # detox/ios/Detox.xcodeproj/project.pbxproj # detox/ios/Detox/DetoxManager.m
# Conflicts: # detox/ios/Detox/DetoxManager.h # detox/ios/Detox/DetoxManager.m # detox/ios/Detox/TestRunner.m
f8d69a0
to
567ccea
Compare
Initial implementation for iOS + JS is ready. If app crashes it should now throw an error and fail the test, it will also restart the app to get it in working state again. |
My tests are still hanging after upgrading to this version - the app crashes due to a bug in react-native-datepicker 1.7.1 version in "Release" mode. The test still hangs and nothing happens , does this fix works on most scenarios? There is nothing in Detox logs but I get the error in Device logs Detox version : 7.3.3 Error Trace after adding try catch in tests
|
Closes #161 once @rotemmiz adds JS support.