FIROptionsInternal.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 "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. * Whether or not Analytics Collection was enabled. Analytics Collection is enabled unless
  56. * explicitly disabled in GoogleService-Info.plist.
  57. */
  58. @property(nonatomic, readonly) BOOL isAnalyticsCollectionEnabled;
  59. /**
  60. * Whether or not Analytics Collection was completely disabled. If YES, then
  61. * isAnalyticsCollectionEnabled will be NO.
  62. */
  63. @property(nonatomic, readonly) BOOL isAnalyticsCollectionDeactivated;
  64. /**
  65. * The version ID of the client library, e.g. @"1100000".
  66. */
  67. @property(nonatomic, readonly, copy) NSString *libraryVersionID;
  68. /**
  69. * The flag indicating whether this object was constructed with the values in the default plist
  70. * file.
  71. */
  72. @property(nonatomic) BOOL usingOptionsFromDefaultPlist;
  73. /**
  74. * Whether or not Measurement was enabled. Measurement is enabled unless explicitly disabled in
  75. * GoogleService-Info.plist.
  76. */
  77. @property(nonatomic, readonly) BOOL isMeasurementEnabled;
  78. /**
  79. * Whether or not Analytics was enabled in the developer console.
  80. */
  81. @property(nonatomic, readonly) BOOL isAnalyticsEnabled;
  82. /**
  83. * Whether or not SignIn was enabled in the developer console.
  84. */
  85. @property(nonatomic, readonly) BOOL isSignInEnabled;
  86. /**
  87. * Whether or not editing is locked. This should occur after FIROptions has been set on a FIRApp.
  88. */
  89. @property(nonatomic, getter=isEditingLocked) BOOL editingLocked;
  90. @end