FIRConfiguration.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 "FIRLoggerLevel.h"
  19. /**
  20. * The log levels used by FIRConfiguration.
  21. */
  22. typedef NS_ENUM(NSInteger, FIRLogLevel) {
  23. /** Error */
  24. kFIRLogLevelError __deprecated = 0,
  25. /** Warning */
  26. kFIRLogLevelWarning __deprecated,
  27. /** Info */
  28. kFIRLogLevelInfo __deprecated,
  29. /** Debug */
  30. kFIRLogLevelDebug __deprecated,
  31. /** Assert */
  32. kFIRLogLevelAssert __deprecated,
  33. /** Max */
  34. kFIRLogLevelMax __deprecated = kFIRLogLevelAssert
  35. } DEPRECATED_MSG_ATTRIBUTE(
  36. "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
  37. NS_ASSUME_NONNULL_BEGIN
  38. /**
  39. * This interface provides global level properties that the developer can tweak, and the singleton
  40. * of the Firebase Analytics configuration class.
  41. */
  42. NS_SWIFT_NAME(FirebaseConfiguration)
  43. @interface FIRConfiguration : NSObject
  44. #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  45. /** Returns the shared configuration object. */
  46. @property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared);
  47. #else
  48. /** Returns the shared configuration object. */
  49. + (FIRConfiguration *)sharedInstance NS_SWIFT_NAME(shared());
  50. #endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
  51. /** The configuration class for Firebase Analytics. */
  52. @property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration;
  53. /** Global log level. Defaults to kFIRLogLevelError. */
  54. @property(nonatomic, readwrite, assign) FIRLogLevel logLevel DEPRECATED_MSG_ATTRIBUTE(
  55. "Use -FIRDebugEnabled and -FIRDebugDisabled or setLoggerLevel. See FIRApp.h for more details.");
  56. /**
  57. * Sets the logging level for internal Firebase logging. Firebase will only log messages
  58. * that are logged at or below loggerLevel. The messages are logged both to the Xcode
  59. * console and to the device's log. Note that if an app is running from AppStore, it will
  60. * never log above FIRLoggerLevelNotice even if loggerLevel is set to a higher (more verbose)
  61. * setting.
  62. *
  63. * @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice.
  64. */
  65. - (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
  66. @end
  67. NS_ASSUME_NONNULL_END