Skip to content

Commit 4f52d7d

Browse files
cynthiajianga-maurice
authored andcommitted
[RemoteConfig]iOS impl
PiperOrigin-RevId: 291255512
1 parent b22d521 commit 4f52d7d

File tree

7 files changed

+436
-67
lines changed

7 files changed

+436
-67
lines changed

remote_config/src/ios/remote_config_ios.h

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,26 @@
1616
#define FIREBASE_REMOTE_CONFIG_CLIENT_CPP_SRC_IOS_REMOTE_CONFIG_IOS_H_
1717

1818
#include "firebase/app.h"
19+
#include "app/memory/unique_ptr.h"
1920
#include "app/src/reference_counted_future_impl.h"
21+
#include "app/src/util_ios.h"
2022
#include "firebase/future.h"
23+
2124
#include "remote_config/src/include/firebase/remote_config.h"
2225

26+
#ifdef __OBJC__
27+
#import "FIRRemoteConfig.h"
28+
#endif // __OBJC__
29+
2330
namespace firebase {
2431
namespace remote_config {
2532
namespace internal {
2633
// Remote Config Client implementation for iOS.
27-
//
34+
35+
// This defines the class FIRRemoteConfigPointer, which is a C++-compatible wrapper
36+
// around the FIRRemoteConfig Obj-C class.
37+
OBJ_C_PTR_WRAPPER(FIRRemoteConfig);
38+
2839
// This class implements functions from `firebase/remote_config.h` header.
2940
// See `firebase/remote_config.h` for all public functions documentation.
3041
class RemoteConfigInternal {
@@ -80,11 +91,21 @@ class RemoteConfigInternal {
8091
void Cleanup();
8192

8293
private:
94+
#ifdef __OBJC__
95+
FIRRemoteConfig* _Nullable impl() const { return impl_->get(); }
96+
#endif
8397
// app
8498
const firebase::App& app_;
8599

100+
UniquePtr<FIRRemoteConfigPointer> impl_;
101+
86102
/// Handle calls from Futures that the API returns.
87103
ReferenceCountedFutureImpl future_impl_;
104+
105+
// Saved default keys.
106+
std::vector<std::string> default_keys_;
107+
108+
int64_t throttled_end_time_in_sec_;
88109
};
89110
} // namespace internal
90111
} // namespace remote_config

0 commit comments

Comments
 (0)