|
21 | 21 | #import "FirebaseCore/Extension/FirebaseCoreInternal.h"
|
22 | 22 | #import "FirebaseMessaging/Sources/FIRMessagingLogger.h"
|
23 | 23 |
|
24 |
| -static const uint64_t kBytesToMegabytesDivisor = 1024 * 1024LL; |
25 | 24 | NSString *const kFIRMessagingInstanceIDUserDefaultsKeyLocale =
|
26 | 25 | @"com.firebase.instanceid.user_defaults.locale"; // locale key stored in GULUserDefaults
|
27 | 26 | static NSString *const kFIRMessagingAPNSSandboxPrefix = @"s_";
|
@@ -114,28 +113,6 @@ BOOL FIRMessagingIsWatchKitExtension(void) {
|
114 | 113 | #endif
|
115 | 114 | }
|
116 | 115 |
|
117 |
| -uint64_t FIRMessagingGetFreeDiskSpaceInMB(void) { |
118 |
| - NSError *error; |
119 |
| - NSArray *paths = |
120 |
| - NSSearchPathForDirectoriesInDomains(FIRMessagingSupportedDirectory(), NSUserDomainMask, YES); |
121 |
| - |
122 |
| - NSDictionary *attributesMap = |
123 |
| - [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] |
124 |
| - error:&error]; |
125 |
| - if (attributesMap) { |
126 |
| - uint64_t totalSizeInBytes __unused = [attributesMap[NSFileSystemSize] longLongValue]; |
127 |
| - uint64_t freeSizeInBytes = [attributesMap[NSFileSystemFreeSize] longLongValue]; |
128 |
| - FIRMessagingLoggerDebug( |
129 |
| - kFIRMessagingMessageCodeUtilities001, @"Device has capacity %llu MB with %llu MB free.", |
130 |
| - totalSizeInBytes / kBytesToMegabytesDivisor, freeSizeInBytes / kBytesToMegabytesDivisor); |
131 |
| - return ((double)freeSizeInBytes) / kBytesToMegabytesDivisor; |
132 |
| - } else { |
133 |
| - FIRMessagingLoggerError(kFIRMessagingMessageCodeUtilities002, |
134 |
| - @"Error in retreiving device's free memory %@", error); |
135 |
| - return 0; |
136 |
| - } |
137 |
| -} |
138 |
| - |
139 | 116 | NSSearchPathDirectory FIRMessagingSupportedDirectory(void) {
|
140 | 117 | #if TARGET_OS_TV
|
141 | 118 | return NSCachesDirectory;
|
|
0 commit comments