FIROptionsInternal.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 <FirebaseCore/FIROptions.h>
  17. /**
  18. * Keys for the strings in the plist file.
  19. */
  20. extern NSString *const kFIRAPIKey;
  21. extern NSString *const kFIRTrackingID;
  22. extern NSString *const kFIRGoogleAppID;
  23. extern NSString *const kFIRClientID;
  24. extern NSString *const kFIRGCMSenderID;
  25. extern NSString *const kFIRAndroidClientID;
  26. extern NSString *const kFIRDatabaseURL;
  27. extern NSString *const kFIRStorageBucket;
  28. extern NSString *const kFIRBundleID;
  29. extern NSString *const kFIRProjectID;
  30. /**
  31. * Keys for the plist file name
  32. */
  33. extern NSString *const kServiceInfoFileName;
  34. extern NSString *const kServiceInfoFileType;
  35. /**
  36. * This header file exposes the initialization of FIROptions to internal use.
  37. */
  38. @interface FIROptions ()
  39. /**
  40. * resetDefaultOptions and initInternalWithOptionsDictionary: are exposed only for unit tests.
  41. */
  42. + (void)resetDefaultOptions;
  43. /**
  44. * Initializes the options with dictionary. The above strings are the keys of the dictionary.
  45. * This is the designated initializer.
  46. */
  47. - (instancetype)initInternalWithOptionsDictionary:(NSDictionary *)serviceInfoDictionary;
  48. /**
  49. * defaultOptions and defaultOptionsDictionary are exposed in order to be used in FIRApp and
  50. * other first party services.
  51. */
  52. + (FIROptions *)defaultOptions;
  53. + (NSDictionary *)defaultOptionsDictionary;
  54. /**
  55. * Indicates whether or not Analytics collection was explicitly enabled via a plist flag or at
  56. * runtime.
  57. */
  58. @property(nonatomic, readonly) BOOL isAnalyticsCollectionExplicitlySet;
  59. /**
  60. * Whether or not Analytics Collection was enabled. Analytics Collection is enabled unless
  61. * explicitly disabled in GoogleService-Info.plist.
  62. */
  63. @property(nonatomic, readonly) BOOL isAnalyticsCollectionEnabled;
  64. /**
  65. * Whether or not Analytics Collection was completely disabled. If YES, then
  66. * isAnalyticsCollectionEnabled will be NO.
  67. */
  68. @property(nonatomic, readonly) BOOL isAnalyticsCollectionDeactivated;
  69. /**
  70. * The version ID of the client library, e.g. @"1100000".
  71. */
  72. @property(nonatomic, readonly, copy) NSString *libraryVersionID;
  73. /**
  74. * The flag indicating whether this object was constructed with the values in the default plist
  75. * file.
  76. */
  77. @property(nonatomic) BOOL usingOptionsFromDefaultPlist;
  78. /**
  79. * Whether or not Measurement was enabled. Measurement is enabled unless explicitly disabled in
  80. * GoogleService-Info.plist.
  81. */
  82. @property(nonatomic, readonly) BOOL isMeasurementEnabled;
  83. /**
  84. * Whether or not Analytics was enabled in the developer console.
  85. */
  86. @property(nonatomic, readonly) BOOL isAnalyticsEnabled;
  87. /**
  88. * Whether or not SignIn was enabled in the developer console.
  89. */
  90. @property(nonatomic, readonly) BOOL isSignInEnabled;
  91. /**
  92. * Whether or not editing is locked. This should occur after FIROptions has been set on a FIRApp.
  93. */
  94. @property(nonatomic, getter=isEditingLocked) BOOL editingLocked;
  95. @end