From 8c6100542f73fe9ca978cfa7747cf2b45e79d0f0 Mon Sep 17 00:00:00 2001 From: Rob Chatfield Date: Thu, 2 Apr 2020 21:49:25 +1100 Subject: [PATCH] Xcode 11.4 support --- Adjust/ADJDeviceInfo.m | 2 +- Adjust/ADJUtil.m | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Adjust/ADJDeviceInfo.m b/Adjust/ADJDeviceInfo.m index c8c386e71..3a283a6ea 100644 --- a/Adjust/ADJDeviceInfo.m +++ b/Adjust/ADJDeviceInfo.m @@ -14,7 +14,7 @@ #import "NSData+ADJAdditions.h" #import "ADJReachability.h" -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST #import #import #endif diff --git a/Adjust/ADJUtil.m b/Adjust/ADJUtil.m index 523ab3450..2354ed5de 100644 --- a/Adjust/ADJUtil.m +++ b/Adjust/ADJUtil.m @@ -19,7 +19,7 @@ #import "UIDevice+ADJAdditions.h" #import "NSString+ADJAdditions.h" -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST #import #import #endif @@ -35,7 +35,7 @@ static NSRegularExpression *excludedDeeplinkRegex = nil; static NSURLSessionConfiguration *urlSessionConfiguration = nil; -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST static CTCarrier *carrier = nil; static CTTelephonyNetworkInfo *networkInfo = nil; #endif @@ -64,7 +64,7 @@ + (void)initialize { [self initializeExcludedDeeplinkRegex]; [self initializeUrlSessionConfiguration]; [self initializeReachability]; -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST [self initializeNetworkInfoAndCarrier]; #endif } @@ -76,7 +76,7 @@ + (void)teardown { optionalRedirectRegex = nil; shortUniversalLinkRegex = nil; urlSessionConfiguration = nil; -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST networkInfo = nil; carrier = nil; #endif @@ -148,7 +148,7 @@ + (void)initializeUrlSessionConfiguration { urlSessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration]; } -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST + (void)initializeNetworkInfoAndCarrier { networkInfo = [[CTTelephonyNetworkInfo alloc] init]; carrier = [networkInfo subscriberCellularProvider]; @@ -292,7 +292,7 @@ + (id)readObject:(NSString *)fileName // Try to read from Application Support directory first. @try { id appSupportObject; -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST if (@available(iOS 11.0, *)) { #else if (@available(tvOS 11.0, *)) { @@ -332,7 +332,7 @@ + (id)readObject:(NSString *)fileName // Let's check the Documents folder. @try { id documentsObject; -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST if (@available(iOS 11.0, *)) { #else if (@available(tvOS 11.0, *)) { @@ -376,7 +376,7 @@ + (void)writeObject:(id)object BOOL result; NSString *filePath = [ADJUtil getFilePathInAppSupportDir:fileName]; -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST if (@available(iOS 11.0, *)) { #else if (@available(tvOS 11.0, *)) { @@ -1415,7 +1415,7 @@ + (NSString *)sdkVersion { return kClientSdk; } -#if !TARGET_OS_TV +#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST + (NSString *)readMCC { if (carrier == nil) { return nil;