diff options
Diffstat (limited to 'GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m')
-rw-r--r-- | GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m b/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m index e96ba70..a1a63a2 100644 --- a/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m +++ b/GoogleUtilities/Environment/third_party/GULAppEnvironmentUtil.m @@ -19,6 +19,10 @@ #import <mach-o/dyld.h> #import <sys/utsname.h> +#if TARGET_OS_IOS +#import <UIKit/UIKit.h> +#endif + /// The encryption info struct and constants are missing from the iPhoneSimulator SDK, but not from /// the iPhoneOS or Mac OS X SDKs. Since one doesn't ever ship a Simulator binary, we'll just /// provide the definitions here. @@ -212,6 +216,9 @@ static BOOL HasEmbeddedMobileProvision() { } + (NSString *)systemVersion { +#if TARGET_OS_IOS + return [UIDevice currentDevice].systemVersion; +#elif TARGET_OS_OSX || TARGET_OS_TV // Assemble the systemVersion, excluding the patch version if it's 0. NSOperatingSystemVersion osVersion = [NSProcessInfo processInfo].operatingSystemVersion; NSMutableString *versionString = [[NSMutableString alloc] @@ -219,8 +226,8 @@ static BOOL HasEmbeddedMobileProvision() { if (osVersion.patchVersion != 0) { [versionString appendFormat:@".%ld", (long)osVersion.patchVersion]; } - return versionString; +#endif } + (BOOL)isAppExtension { |