diff options
author | Damiano Galassi <[email protected]> | 2017-06-12 17:05:23 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2017-06-12 17:05:23 +0200 |
commit | 46be9b0ac3d4b87269ba6b0732e5034778c2bb1d (patch) | |
tree | f1c9d4600d4f41b961a3d460ed20175a6311de9b /macosx | |
parent | c894ec059b4b9db3f188aff86c92f44954a2eb3c (diff) |
MacGui: sort the keys of the exported json presets on 10.13 and later.
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBPreset.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/HBPreset.m b/macosx/HBPreset.m index 97faea58a..5fad6ba4a 100644 --- a/macosx/HBPreset.m +++ b/macosx/HBPreset.m @@ -273,7 +273,8 @@ } else { - NSData *jsonPreset = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:NULL]; + NSUInteger sortKeys = (1UL << 1); // NSJSONWritingSortedKeys in 10.13 sdk; + NSData *jsonPreset = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted | sortKeys error:NULL]; success = [jsonPreset writeToURL:url atomically:atomically]; } |