Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions FirebaseRemoteConfig/Sources/Private/RCNConfigFetch.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@

NS_ASSUME_NONNULL_BEGIN

/// Completion handler invoked by NSSessionFetcher.
typedef void (^RCNConfigFetcherCompletion)(NSData *data, NSURLResponse *response, NSError *error);

/// Completion handler invoked after a fetch that contains the updated keys
typedef void (^RCNConfigFetchCompletion)(FIRRemoteConfigFetchStatus status,
FIRRemoteConfigUpdate *update,
Expand Down
7 changes: 4 additions & 3 deletions FirebaseRemoteConfig/Sources/RCNConfigFetch.m
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ - (void)fetchWithUserProperties:(NSDictionary *)userProperties

FIRLogDebug(kFIRLoggerRemoteConfig, @"I-RCN000040", @"Start config fetch.");
__weak RCNConfigFetch *weakSelf = self;
RCNConfigFetcherCompletion fetcherCompletion = ^(NSData *data, NSURLResponse *response,
NSError *error) {
__auto_type fetcherCompletion = ^(NSData *data, NSURLResponse *response, NSError *error) {
FIRLogDebug(kFIRLoggerRemoteConfig, @"I-RCN000050",
@"config fetch completed. Error: %@ StatusCode: %ld", (error ? error : @"nil"),
(long)[((NSHTTPURLResponse *)response) statusCode]);
Expand Down Expand Up @@ -651,7 +650,9 @@ - (NSURLSession *)newFetchSession {
- (NSURLSessionDataTask *)URLSessionDataTaskWithContent:(NSData *)content
fetchTypeHeader:(NSString *)fetchTypeHeader
completionHandler:
(RCNConfigFetcherCompletion)fetcherCompletion {
(void (^)(NSData *data,
NSURLResponse *response,
NSError *error))fetcherCompletion {
NSURL *URL = [NSURL URLWithString:[self constructServerURL]];
FIRLogDebug(kFIRLoggerRemoteConfig, @"I-RCN000046", @"%@",
[NSString stringWithFormat:@"Making config request: %@", [URL absoluteString]]);
Expand Down
5 changes: 3 additions & 2 deletions FirebaseRemoteConfig/Tests/Unit/RCNPersonalizationTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@
@interface RCNConfigFetch (ForTest)
- (NSURLSessionDataTask *)URLSessionDataTaskWithContent:(NSData *)content
fetchTypeHeader:(NSString *)fetchTypeHeader
completionHandler:
(RCNConfigFetcherCompletion)fetcherCompletion;
completionHandler:(void (^)(NSData *data,
NSURLResponse *response,
NSError *error))fetcherCompletion;

- (void)fetchWithUserProperties:(NSDictionary *)userProperties
fetchTypeHeader:(NSString *)fetchTypeHeader
Expand Down
5 changes: 3 additions & 2 deletions FirebaseRemoteConfig/Tests/Unit/RCNRemoteConfigTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ - (void)fetchWithUserPropertiesCompletionHandler:(NSString *)fetchTypeHeader
completionHandler:(FIRAInteropUserPropertiesCallback)block;
- (NSURLSessionDataTask *)URLSessionDataTaskWithContent:(NSData *)content
fetchTypeHeader:(NSString *)fetchTypeHeader
completionHandler:
(RCNConfigFetcherCompletion)fetcherCompletion;
completionHandler:(void (^)(NSData *data,
NSURLResponse *response,
NSError *error))fetcherCompletion;
- (void)fetchConfigWithExpirationDuration:(NSTimeInterval)expirationDuration
completionHandler:(FIRRemoteConfigFetchCompletion)completionHandler;
- (void)realtimeFetchConfigWithNoExpirationDuration:(NSInteger)fetchAttemptNumber
Expand Down
Loading