Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Adjust/ADJDeviceInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#import "NSData+ADJAdditions.h"
#import "ADJReachability.h"

#if !TARGET_OS_TV
#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST
#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#endif
Expand Down
18 changes: 9 additions & 9 deletions Adjust/ADJUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#import "UIDevice+ADJAdditions.h"
#import "NSString+ADJAdditions.h"

#if !TARGET_OS_TV
#if !TARGET_OS_TV && !TARGET_OS_MACCATALYST
#import <CoreTelephony/CTCarrier.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#endif
Expand All @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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, *)) {
Expand Down Expand Up @@ -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, *)) {
Expand Down Expand Up @@ -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, *)) {
Expand Down Expand Up @@ -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;
Expand Down