mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
fix compilation warnings under xcode 8
This commit is contained in:
1 parent
08f55bce01
commit
a819fbbfa9
3 files changed
+5
-3
No files matched your search
Vendored
+2
-1
@@ -20,7 +20,8 @@
|
||||
{
|
||||
NSOperatingSystemVersion version = { 0, 0, 0 };
|
||||
NSURL *coreServices = [[NSFileManager defaultManager] URLForDirectory:NSCoreServiceDirectory inDomain:NSSystemDomainMask appropriateForURL:nil create:NO error:nil];
|
||||
NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:[coreServices URLByAppendingPathComponent:@"SystemVersion.plist"]][@"ProductVersion"] componentsSeparatedByString:@"."];
|
||||
NSURL* systemVersionPlistUrl = [coreServices URLByAppendingPathComponent:@"SystemVersion.plist"];
|
||||
NSArray *components = [[NSDictionary dictionaryWithContentsOfURL:systemVersionPlistUrl][@"ProductVersion"] componentsSeparatedByString:@"."];
|
||||
version.majorVersion = components.count > 0 ? [components[0] integerValue] : 0;
|
||||
version.minorVersion = components.count > 1 ? [components[1] integerValue] : 0;
|
||||
version.patchVersion = components.count > 2 ? [components[2] integerValue] : 0;
|
||||
|
||||
Reference in new issue
Block a user