|
@@ -38,7 +38,7 @@ typedef NS_ENUM(NSInteger, AFOperationState) {
|
|
|
AFOperationFinishedState = 3,
|
|
|
};
|
|
|
|
|
|
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (defined(__has_feature) && !__has_feature(attribute_availability_app_extension))
|
|
|
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !(defined(__has_feature) && __has_feature(attribute_availability_app_extension))
|
|
|
typedef UIBackgroundTaskIdentifier AFBackgroundTaskIdentifier;
|
|
|
#else
|
|
|
typedef id AFBackgroundTaskIdentifier;
|
|
@@ -211,7 +211,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
|
|
_outputStream = nil;
|
|
|
}
|
|
|
|
|
|
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (defined(__has_feature) && !__has_feature(attribute_availability_app_extension))
|
|
|
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !(defined(__has_feature) && __has_feature(attribute_availability_app_extension))
|
|
|
if (_backgroundTaskIdentifier) {
|
|
|
[[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier];
|
|
|
_backgroundTaskIdentifier = UIBackgroundTaskInvalid;
|
|
@@ -289,7 +289,7 @@ static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperat
|
|
|
[self.lock unlock];
|
|
|
}
|
|
|
|
|
|
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (defined(__has_feature) && !__has_feature(attribute_availability_app_extension))
|
|
|
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && !(defined(__has_feature) && __has_feature(attribute_availability_app_extension))
|
|
|
- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler {
|
|
|
[self.lock lock];
|
|
|
if (!self.backgroundTaskIdentifier) {
|