From 9de3f01f8b5b17c15c4d5faa9ed11aed6e07a01c Mon Sep 17 00:00:00 2001 From: Leo Natan Date: Tue, 17 Oct 2017 12:02:18 +0300 Subject: [PATCH] Add fix for Firebase. Closes #270 --- detox/ios/Detox/DetoxAppDelegateProxy.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detox/ios/Detox/DetoxAppDelegateProxy.m b/detox/ios/Detox/DetoxAppDelegateProxy.m index 54759ecc2d..44b70f3f0f 100644 --- a/detox/ios/Detox/DetoxAppDelegateProxy.m +++ b/detox/ios/Detox/DetoxAppDelegateProxy.m @@ -33,7 +33,7 @@ + (void)load void (*orig)(id, SEL, id) = (void*)method_getImplementation(m); method_setImplementation(m, imp_implementationWithBlock(^ (id _self, id origDelegate) { //Only create a dupe class if the provided instance is not already a dupe class. - if([origDelegate respondsToSelector:@selector(__dtx_canaryInTheCoalMine)] == NO) + if(origDelegate != nil && [origDelegate respondsToSelector:@selector(__dtx_canaryInTheCoalMine)] == NO) { NSString* clsName = [NSString stringWithFormat:@"%@(%@)", NSStringFromClass([origDelegate class]), NSStringFromClass([DetoxAppDelegateProxy class])];