RCTRedBoxSetEnabled.m 439 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import "RCTRedBoxSetEnabled.h"
  8. #if RCT_DEV
  9. static BOOL redBoxEnabled = YES;
  10. #else
  11. static BOOL redBoxEnabled = NO;
  12. #endif
  13. void RCTRedBoxSetEnabled(BOOL enabled)
  14. {
  15. redBoxEnabled = enabled;
  16. }
  17. BOOL RCTRedBoxGetEnabled()
  18. {
  19. return redBoxEnabled;
  20. }