14
14
* limitations under the License.
15
15
*/
16
16
17
- #import " FirebaseDatabase/Sources/Core/FRepoInfo.h"
17
+ #import < GoogleUtilities/GULUserDefaults.h>
18
+
18
19
#import " FirebaseDatabase/Sources/Constants/FConstants.h"
20
+ #import " FirebaseDatabase/Sources/Core/FRepoInfo.h"
19
21
20
22
@interface FRepoInfo ()
21
23
@@ -52,7 +54,7 @@ - (instancetype)initWithHost:(NSString *)aHost
52
54
// Get cached internal host if it exists
53
55
NSString *internalHostKey =
54
56
[NSString stringWithFormat: @" firebase:host:%@ " , _host];
55
- NSString *cachedInternalHost = [[NSUserDefaults standardUserDefaults ]
57
+ NSString *cachedInternalHost = [[GULUserDefaults standardUserDefaults ]
56
58
stringForKey: internalHostKey];
57
59
if (cachedInternalHost != nil ) {
58
60
internalHost = cachedInternalHost;
@@ -81,7 +83,7 @@ - (void)setInternalHost:(NSString *)newHost {
81
83
// Cache the internal host so we don't need to redirect later on
82
84
NSString *internalHostKey =
83
85
[NSString stringWithFormat: @" firebase:host:%@ " , self .host];
84
- NSUserDefaults *cache = [NSUserDefaults standardUserDefaults ];
86
+ GULUserDefaults *cache = [GULUserDefaults standardUserDefaults ];
85
87
[cache setObject: internalHost forKey: internalHostKey];
86
88
[cache synchronize ];
87
89
}
@@ -93,7 +95,7 @@ - (void)clearInternalHostCache {
93
95
// Remove the cached entry
94
96
NSString *internalHostKey =
95
97
[NSString stringWithFormat: @" firebase:host:%@ " , self .host];
96
- NSUserDefaults *cache = [NSUserDefaults standardUserDefaults ];
98
+ GULUserDefaults *cache = [GULUserDefaults standardUserDefaults ];
97
99
[cache removeObjectForKey: internalHostKey];
98
100
[cache synchronize ];
99
101
}
0 commit comments