XCUIApplication+FBUIInterruptions.m 813 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import "XCUIApplication+FBUIInterruptions.h"
  10. #import "FBReflectionUtils.h"
  11. #import "XCUIApplication.h"
  12. @implementation XCUIApplication (FBUIInterruptions)
  13. - (BOOL)fb_doesNotHandleUIInterruptions
  14. {
  15. return YES;
  16. }
  17. + (void)fb_disableUIInterruptionsHandling
  18. {
  19. static dispatch_once_t onceToken;
  20. dispatch_once(&onceToken, ^{
  21. FBReplaceMethod([self class],
  22. @selector(doesNotHandleUIInterruptions),
  23. @selector(fb_doesNotHandleUIInterruptions));
  24. });
  25. }
  26. @end