FIRRemoteConfig_Private.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright 2019 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 <FirebaseRemoteConfig/FIRRemoteConfig.h>
  17. #import "RCNConfigSettings.h" // This import is needed to expose settings for the Swift API tests.
  18. @class FIROptions;
  19. @class RCNConfigContent;
  20. @class RCNConfigDBManager;
  21. @class RCNConfigFetch;
  22. @class RCNConfigRealtime;
  23. @protocol FIRAnalyticsInterop;
  24. @protocol FIRRolloutsStateSubscriber;
  25. NS_ASSUME_NONNULL_BEGIN
  26. @class RCNConfigSettings;
  27. @interface FIRRemoteConfigUpdate ()
  28. /// Designated initializer.
  29. - (instancetype)initWithUpdatedKeys:(NSSet<NSString *> *)updatedKeys;
  30. @end
  31. @interface FIRRemoteConfig () {
  32. NSString *_FIRNamespace;
  33. }
  34. /// Internal settings
  35. @property(nonatomic, readonly, strong) RCNConfigSettings *settings;
  36. /// Config settings are custom settings.
  37. @property(nonatomic, readwrite, strong, nonnull) RCNConfigFetch *configFetch;
  38. @property(nonatomic, readwrite, strong, nonnull) RCNConfigRealtime *configRealtime;
  39. /// Returns the FIRRemoteConfig instance for your namespace and for the default Firebase App.
  40. /// This singleton object contains the complete set of Remote Config parameter values available to
  41. /// the app, including the Active Config and Default Config.. This object also caches values fetched
  42. /// from the Remote Config Server until they are copied to the Active Config by calling
  43. /// activateFetched. When you fetch values from the Remote Config Server using the default Firebase
  44. /// namespace service, you should use this class method to create a shared instance of the
  45. /// FIRRemoteConfig object to ensure that your app will function properly with the Remote Config
  46. /// Server and the Firebase service. This API is used internally by 2P teams.
  47. + (FIRRemoteConfig *)remoteConfigWithFIRNamespace:(NSString *)remoteConfigNamespace
  48. NS_SWIFT_NAME(remoteConfig(FIRNamespace:));
  49. /// Returns the FIRRemoteConfig instance for your namespace and for the default 3P developer's app.
  50. /// This singleton object contains the complete set of Remote Config parameter values available to
  51. /// the app, including the Active Config and Default Config. This object also caches values fetched
  52. /// from the Remote Config Server until they are copied to the Active Config by calling
  53. /// activateFetched. When you fetch values from the Remote Config Server using the default Firebase
  54. /// namespace service, you should use this class method to create a shared instance of the
  55. /// FIRRemoteConfig object to ensure that your app will function properly with the Remote Config
  56. /// Server and the Firebase service.
  57. + (FIRRemoteConfig *)remoteConfigWithFIRNamespace:(NSString *)remoteConfigNamespace
  58. app:(FIRApp *)app
  59. NS_SWIFT_NAME(remoteConfig(FIRNamespace:app:));
  60. /// Initialize a FIRRemoteConfig instance with all the required parameters directly. This exists so
  61. /// tests can create FIRRemoteConfig objects without needing FIRApp.
  62. - (instancetype)initWithAppName:(NSString *)appName
  63. FIROptions:(FIROptions *)options
  64. namespace:(NSString *)FIRNamespace
  65. DBManager:(RCNConfigDBManager *)DBManager
  66. configContent:(RCNConfigContent *)configContent
  67. analytics:(nullable id<FIRAnalyticsInterop>)analytics;
  68. /// Register RolloutsStateSubcriber to FIRRemoteConfig instance
  69. - (void)addRemoteConfigInteropSubscriber:(id<FIRRolloutsStateSubscriber> _Nonnull)subscriber;
  70. @end
  71. NS_ASSUME_NONNULL_END