|
@@ -26,7 +26,7 @@
|
|
|
#import <UIKit/UIKit.h>
|
|
|
#endif
|
|
|
|
|
|
-#if defined(__has_feature) && !__has_feature(objc_arc)
|
|
|
+#if !__has_feature(objc_arc)
|
|
|
#error AFNetworking must be built with ARC.
|
|
|
// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files.
|
|
|
#endif
|
|
@@ -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(AF_APP_EXTENSIONS)
|
|
|
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(AF_APP_EXTENSIONS)
|
|
|
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(AF_APP_EXTENSIONS)
|
|
|
- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler {
|
|
|
[self.lock lock];
|
|
|
if (!self.backgroundTaskIdentifier) {
|