Supresss the deprecation warning when min deployment target version set to iOS 13+ or macCatalyst
This commit is contained in:
parent
b54cdcc4bb
commit
bd33f4179d
|
@ -69,6 +69,8 @@
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
- (SDGraphicsImageRendererFormatRange)preferredRange {
|
- (SDGraphicsImageRendererFormatRange)preferredRange {
|
||||||
#if SD_UIKIT
|
#if SD_UIKIT
|
||||||
if (@available(iOS 10.0, tvOS 10.10, *)) {
|
if (@available(iOS 10.0, tvOS 10.10, *)) {
|
||||||
|
@ -114,6 +116,7 @@
|
||||||
_preferredRange = preferredRange;
|
_preferredRange = preferredRange;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
self = [super init];
|
self = [super init];
|
||||||
|
|
|
@ -223,7 +223,10 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@try {
|
@try {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
extendedData = [NSKeyedArchiver archivedDataWithRootObject:extendedObject];
|
extendedData = [NSKeyedArchiver archivedDataWithRootObject:extendedObject];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
} @catch (NSException *exception) {
|
} @catch (NSException *exception) {
|
||||||
NSLog(@"NSKeyedArchiver archive failed with exception: %@", exception);
|
NSLog(@"NSKeyedArchiver archive failed with exception: %@", exception);
|
||||||
}
|
}
|
||||||
|
@ -397,7 +400,10 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@try {
|
@try {
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
extendedObject = [NSKeyedUnarchiver unarchiveObjectWithData:extendedData];
|
extendedObject = [NSKeyedUnarchiver unarchiveObjectWithData:extendedData];
|
||||||
|
#pragma clang diagnostic pop
|
||||||
} @catch (NSException *exception) {
|
} @catch (NSException *exception) {
|
||||||
NSLog(@"NSKeyedUnarchiver unarchive failed with exception: %@", exception);
|
NSLog(@"NSKeyedUnarchiver unarchive failed with exception: %@", exception);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue