FIRRemoteConfig_Private.h 3.7 KB

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