File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Example/Tests/UserDefaults Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ + (Path)documentsDirectory {
383
383
NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES );
384
384
return Path::FromNSString (directories[0 ]).AppendUtf8 (kReservedPathComponent );
385
385
386
- #elif TARGET_OS_MAC
386
+ #elif TARGET_OS_OSX
387
387
std::string dotPrefixed = absl::StrCat (" ." , kReservedPathComponent );
388
388
return Path::FromNSString (NSHomeDirectory ()).AppendUtf8 (dotPrefixed);
389
389
Original file line number Diff line number Diff line change 1
1
# Unreleased
2
- - Fix ` pod lib lint GoogleUtilities.podspec --use-libraries ` regression. (#2130 )
2
+ - Fixed ` pod lib lint GoogleUtilities.podspec --use-libraries ` regression. (#2130 )
3
+ - Fixed macOS conditional check in UserDefaults. (#2245 )
3
4
4
5
# 5.3.6
5
6
- Fix nullability issues. (#2079 )
Original file line number Diff line number Diff line change @@ -432,15 +432,15 @@ - (void)testUserDefaultNotifications {
432
432
}
433
433
434
434
- (void )testSynchronizeToDisk {
435
- #if TARGET_OS_MAC
435
+ #if TARGET_OS_OSX
436
436
// `NSFileManager` has trouble reading the files in `~/Library` even though the
437
437
// `removeItemAtPath:` call works. Watching Finder while stepping through this test shows that the
438
438
// file does get created and removed properly. When using LLDB to call `fileExistsAtPath:` the
439
439
// correct return value of `YES` is returned, but in this test it returns `NO`. Best guess is the
440
440
// test app is sandboxed and `NSFileManager` is refusing to read the directory.
441
441
// TODO: Investigate the failure and re-enable this test.
442
442
return ;
443
- #endif // TARGET_OS_MAC
443
+ #endif // TARGET_OS_OSX
444
444
NSString *suiteName = [NSString stringWithFormat: @" another_test_suite" ];
445
445
NSString *filePath = [self filePathForPreferencesName: suiteName];
446
446
NSFileManager *fileManager = [NSFileManager defaultManager ];
Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ - (void)synchronize {
201
201
- (void )clearAllData {
202
202
// On macOS, using `kCFPreferencesCurrentHost` will not set all the keys necessary to match
203
203
// `NSUserDefaults`.
204
- #if TARGET_OS_MAC
204
+ #if TARGET_OS_OSX
205
205
CFStringRef host = kCFPreferencesAnyHost ;
206
206
#else
207
207
CFStringRef host = kCFPreferencesCurrentHost ;
You can’t perform that action at this time.
0 commit comments