diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index ff026649f1..7bd40f7969 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -44,16 +44,12 @@ Pod::Spec.new do |spec| end spec.subspec 'PINRemoteImage' do |pin| - # Note: The core.prefix_header_file includes setup of PIN_REMOTE_IMAGE, so the line below could be removed. - pin.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) PIN_REMOTE_IMAGE=1' } pin.dependency 'PINRemoteImage/iOS', '= 3.0.0-beta.8' pin.dependency 'PINRemoteImage/PINCache' pin.dependency 'AsyncDisplayKit/Core' end spec.subspec 'IGListKit' do |igl| - # Note: The core.prefix_header_file includes setup of IG_LIST_KIT, so the line below could be removed. - igl.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) IG_LIST_KIT=1' } igl.dependency 'IGListKit', '2.1.0' igl.dependency 'AsyncDisplayKit/Core' end diff --git a/BUCK b/BUCK index c5d5e0178e..2527c2f053 100755 --- a/BUCK +++ b/BUCK @@ -88,7 +88,6 @@ asyncdisplaykit_library( for name in ['AsyncDisplayKit', 'AsyncDisplayKit-PINRemoteImage']: asyncdisplaykit_library( name = name, - additional_preprocessor_flags = ['-DPIN_REMOTE_IMAGE=1'], deps = [ '//Pods/PINRemoteImage:PINRemoteImage-PINCache', ], diff --git a/Source/ASCollectionView.mm b/Source/ASCollectionView.mm index d8ab5c0a1c..b968261f5d 100644 --- a/Source/ASCollectionView.mm +++ b/Source/ASCollectionView.mm @@ -9,7 +9,6 @@ // #import -#import #import #import #import diff --git a/Source/ASDisplayNode+Beta.h b/Source/ASDisplayNode+Beta.h index 19a1e679ea..d84c0417a9 100644 --- a/Source/ASDisplayNode+Beta.h +++ b/Source/ASDisplayNode+Beta.h @@ -8,7 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import #import #import #import diff --git a/Source/ASDisplayNode+Yoga.mm b/Source/ASDisplayNode+Yoga.mm index d655a3daf2..1143f664e2 100644 --- a/Source/ASDisplayNode+Yoga.mm +++ b/Source/ASDisplayNode+Yoga.mm @@ -6,7 +6,6 @@ // Copyright © 2017 Facebook. All rights reserved. // -#import #if YOGA /* YOGA */ diff --git a/Source/ASMultiplexImageNode.mm b/Source/ASMultiplexImageNode.mm index f9756a7761..8645b4c3f7 100644 --- a/Source/ASMultiplexImageNode.mm +++ b/Source/ASMultiplexImageNode.mm @@ -11,7 +11,6 @@ #import #import -#import #import #import #import diff --git a/Source/ASTableView.mm b/Source/ASTableView.mm index 1f95f37f09..a4235b579e 100644 --- a/Source/ASTableView.mm +++ b/Source/ASTableView.mm @@ -14,7 +14,6 @@ #import #import #import -#import #import #import #import diff --git a/Source/ASViewController.mm b/Source/ASViewController.mm index 7d5f6db5c6..c3c1ad7307 100644 --- a/Source/ASViewController.mm +++ b/Source/ASViewController.mm @@ -12,7 +12,6 @@ #import #import -#import #import #import #import diff --git a/Source/AsyncDisplayKit-Prefix.pch b/Source/AsyncDisplayKit-Prefix.pch index 72d11cee9c..8450ec694e 100644 --- a/Source/AsyncDisplayKit-Prefix.pch +++ b/Source/AsyncDisplayKit-Prefix.pch @@ -8,23 +8,4 @@ #import #endif -// Some build systems (Cocoapods, Buck, Bazel, etc) will define these flags manually if the functionality -// is needed by the app. Carthage in particular, or if a user forgets to set the build flag, benefit from -// checking if each flag is not defined and then setting it to whether or not the header is accessible. - -#ifndef PIN_REMOTE_IMAGE -// For Carthage or manual builds, this will define PIN_REMOTE_IMAGE if the header is available in the -// search path e.g. they've dragged in the framework (technically this will not be able to detect if -// a user does not include the framework in the link binary with build step). - #define PIN_REMOTE_IMAGE __has_include() -#endif - -#ifndef IG_LIST_KIT - #define IG_LIST_KIT __has_include() - - /** - * For IGListKit versions < 3.0, you have to use IGListCollectionView. - * For 3.0 and later, that class is removed and you use UICollectionView. - */ - #define IG_LIST_COLLECTION_VIEW __has_include() -#endif +#import diff --git a/Source/AsyncDisplayKit.h b/Source/AsyncDisplayKit.h index 5e84654d17..998b5b2b32 100644 --- a/Source/AsyncDisplayKit.h +++ b/Source/AsyncDisplayKit.h @@ -8,6 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // +#import #import #import #import @@ -81,7 +82,6 @@ #import #import #import -#import #import #import #import diff --git a/Source/Base/ASAvailability.h b/Source/Base/ASAvailability.h index b7d01631a7..f86d627a55 100644 --- a/Source/Base/ASAvailability.h +++ b/Source/Base/ASAvailability.h @@ -32,3 +32,12 @@ #ifndef YOGA #define YOGA __has_include(YOGA_HEADER_PATH) #endif + +#define PIN_REMOTE_IMAGE __has_include() +#define IG_LIST_KIT __has_include() + +/** + * For IGListKit versions < 3.0, you have to use IGListCollectionView. + * For 3.0 and later, that class is removed and you use UICollectionView. + */ +#define IG_LIST_COLLECTION_VIEW __has_include() diff --git a/Source/Base/ASBaseDefines.h b/Source/Base/ASBaseDefines.h index c854206535..c4e8231a20 100755 --- a/Source/Base/ASBaseDefines.h +++ b/Source/Base/ASBaseDefines.h @@ -12,14 +12,6 @@ #import -#ifndef PIN_REMOTE_IMAGE -#if __has_include() -#define PIN_REMOTE_IMAGE 1 -#else -#define PIN_REMOTE_IMAGE 0 -#endif -#endif - // The C++ compiler mangles C function names. extern "C" { /* your C functions */ } prevents this. // You should wrap all C function prototypes declared in headers with ASDISPLAYNODE_EXTERN_C_BEGIN/END, even if // they are included only from .m (Objective-C) files. It's common for .m files to start using C++ diff --git a/Source/Base/ASLog.h b/Source/Base/ASLog.h index fbc12d17c9..3de56eda7e 100644 --- a/Source/Base/ASLog.h +++ b/Source/Base/ASLog.h @@ -10,7 +10,6 @@ #pragma once -#import #define ASMultiplexImageNodeLogDebug(...) #define ASMultiplexImageNodeCLogDebug(...) diff --git a/Source/Details/ASObjectDescriptionHelpers.m b/Source/Details/ASObjectDescriptionHelpers.m index a5492df584..7661e1f0c9 100644 --- a/Source/Details/ASObjectDescriptionHelpers.m +++ b/Source/Details/ASObjectDescriptionHelpers.m @@ -6,7 +6,6 @@ // Copyright © 2016 Facebook. All rights reserved. // -#import #import #import diff --git a/Source/Details/ASPhotosFrameworkImageRequest.m b/Source/Details/ASPhotosFrameworkImageRequest.m index ad81dbf3c3..d51c49a81f 100644 --- a/Source/Details/ASPhotosFrameworkImageRequest.m +++ b/Source/Details/ASPhotosFrameworkImageRequest.m @@ -12,7 +12,6 @@ #import #import -#import NSString *const ASPhotosURLScheme = @"ph"; diff --git a/Source/Details/ASTraitCollection.h b/Source/Details/ASTraitCollection.h index eacc28c74e..1e2a83f91c 100644 --- a/Source/Details/ASTraitCollection.h +++ b/Source/Details/ASTraitCollection.h @@ -8,7 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import #import #import diff --git a/Source/Details/NSIndexSet+ASHelpers.m b/Source/Details/NSIndexSet+ASHelpers.m index 6d70e5bb43..756d038a8c 100644 --- a/Source/Details/NSIndexSet+ASHelpers.m +++ b/Source/Details/NSIndexSet+ASHelpers.m @@ -6,7 +6,6 @@ // Copyright © 2016 Facebook. All rights reserved. // -#import // UIKit indexPath helpers #import diff --git a/Source/Layout/ASInsetLayoutSpec.h b/Source/Layout/ASInsetLayoutSpec.h index 5515c9679e..a4679a6f0f 100644 --- a/Source/Layout/ASInsetLayoutSpec.h +++ b/Source/Layout/ASInsetLayoutSpec.h @@ -8,7 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import #import NS_ASSUME_NONNULL_BEGIN diff --git a/Source/Layout/ASLayoutElement.h b/Source/Layout/ASLayoutElement.h index a2d491e4c3..162156e4f1 100644 --- a/Source/Layout/ASLayoutElement.h +++ b/Source/Layout/ASLayoutElement.h @@ -8,7 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import #import #import #import diff --git a/Source/Layout/ASLayoutElementPrivate.h b/Source/Layout/ASLayoutElementPrivate.h index f82f72887f..a82f39a0c2 100644 --- a/Source/Layout/ASLayoutElementPrivate.h +++ b/Source/Layout/ASLayoutElementPrivate.h @@ -8,7 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import #import #import diff --git a/Source/Layout/ASLayoutSpec.mm b/Source/Layout/ASLayoutSpec.mm index ec34a30c64..541adbcb8c 100644 --- a/Source/Layout/ASLayoutSpec.mm +++ b/Source/Layout/ASLayoutSpec.mm @@ -16,7 +16,6 @@ #import #import #import -#import #import #import diff --git a/Source/Private/Layout/ASLayoutSpecPrivate.h b/Source/Private/Layout/ASLayoutSpecPrivate.h index 33dd5f1ae2..0c31ec6cc9 100644 --- a/Source/Private/Layout/ASLayoutSpecPrivate.h +++ b/Source/Private/Layout/ASLayoutSpecPrivate.h @@ -10,7 +10,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import #import #import