FIRConfiguration.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FIRAnalyticsConfiguration.h"
  18. #import "FIRCoreSwiftNameSupport.h"
  19. #import "FIRLoggerLevel.h"
  20. /**
  21. * The log levels used by FIRConfiguration.
  22. */
  23. typedef NS_ENUM(NSInteger, FIRLogLevel) {
  24. /** Error */
  25. kFIRLogLevelError __deprecated = 0,
  26. /** Warning */
  27. kFIRLogLevelWarning __deprecated,
  28. /** Info */
  29. kFIRLogLevelInfo __deprecated,
  30. /** Debug */
  31. kFIRLogLevelDebug __deprecated,
  32. /** Assert */
  33. kFIRLogLevelAssert __deprecated,
  34. /** Max */
  35. kFIRLogLevelMax __deprecated = kFIRLogLevelAssert
  36. } DEPRECATED_MSG_ATTRIBUTE(
  37. "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
  38. NS_ASSUME_NONNULL_BEGIN
  39. /**
  40. * This interface provides global level properties that the developer can tweak, and the singleton
  41. * of the Firebase Analytics configuration class.
  42. */
  43. FIR_SWIFT_NAME(FirebaseConfiguration)
  44. @interface FIRConfiguration : NSObject
  45. #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  46. /** Returns the shared configuration object. */
  47. @property(class, nonatomic, readonly) FIRConfiguration *sharedInstance FIR_SWIFT_NAME(shared);
  48. #else
  49. /** Returns the shared configuration object. */
  50. + (FIRConfiguration *)sharedInstance FIR_SWIFT_NAME(shared());
  51. #endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  52. /** The configuration class for Firebase Analytics. */
  53. @property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration;
  54. /** Global log level. Defaults to kFIRLogLevelError. */
  55. @property(nonatomic, readwrite, assign) FIRLogLevel logLevel DEPRECATED_MSG_ATTRIBUTE(
  56. "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
  57. /**
  58. * Sets the logging level for internal Firebase logging. Firebase will only log messages
  59. * that are logged at or below loggerLevel. The messages are logged both to the Xcode
  60. * console and to the device's log. Note that if an app is running from AppStore, it will
  61. * never log above FIRLoggerLevelNotice even if loggerLevel is set to a higher (more verbose)
  62. * setting.
  63. *
  64. * @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice.
  65. */
  66. - (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
  67. @end
  68. NS_ASSUME_NONNULL_END