diff options
author | Greg Soltis <gsoltis@google.com> | 2017-12-18 18:50:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-18 18:50:08 -0800 |
commit | 52c7329f2a74ad457898afebe21b1f02e35d0d0f (patch) | |
tree | 8f5da4cb4ad1b61d46a0f3ad4195a59f2d95ebc4 /Firestore/Source/API | |
parent | 8db0eb618d355c546e8f0894dc1e0799297c5659 (diff) |
Expose network management (#566)
* Expose network management in public API
* Clean up a few more references to the internal access of network management
* Move test
* Update comments
* Swap _Nullable for nullable
* Fix comment
* Add tests, including swift
* Styling
Diffstat (limited to 'Firestore/Source/API')
-rw-r--r-- | Firestore/Source/API/FIRFirestore.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Firestore/Source/API/FIRFirestore.m b/Firestore/Source/API/FIRFirestore.m index 7814ce1..e347911 100644 --- a/Firestore/Source/API/FIRFirestore.m +++ b/Firestore/Source/API/FIRFirestore.m @@ -279,6 +279,16 @@ NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain"; FIRSetLoggerLevel(logging ? FIRLoggerLevelDebug : FIRLoggerLevelNotice); } +- (void)enableNetworkWithCompletion:(nullable void (^)(NSError *_Nullable error))completion { + [self firestoreWithConfiguredClient]; + [self.client enableNetworkWithCompletion:completion]; +} + +- (void)disableNetworkWithCompletion:(nullable void (^)(NSError *_Nullable))completion { + [self firestoreWithConfiguredClient]; + [self.client disableNetworkWithCompletion:completion]; +} + @end NS_ASSUME_NONNULL_END |