FIRRemoteConfig_Private.h 3.5 KB

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