Standardize Dependency Flags for PINRemoteImage, IGListKit (#3244)

* no message

* Go further

* Make the symbols public so that apps actually build

* Move ASAvailability into the umbrella header

* Remove duplicate define

* Put the file back where it was in the list

* Revert "Put the file back where it was in the list"

This reverts commit 6a80c15b5b5efe5ff39812a018114e8bdc1dc0cf.
This commit is contained in:
Adlai Holler 2017-04-07 15:04:50 -07:00 committed by GitHub
parent 873ae64cec
commit b41816d40d
22 changed files with 11 additions and 50 deletions

View File

@ -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

1
BUCK
View File

@ -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',
],

View File

@ -9,7 +9,6 @@
//
#import <AsyncDisplayKit/ASAssert.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASBatchFetching.h>
#import <AsyncDisplayKit/ASDelegateProxy.h>
#import <AsyncDisplayKit/ASCellNode+Internal.h>

View File

@ -8,7 +8,6 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASDisplayNode.h>
#import <AsyncDisplayKit/ASLayoutRangeType.h>
#import <AsyncDisplayKit/ASEventLog.h>

View File

@ -6,7 +6,6 @@
// Copyright © 2017 Facebook. All rights reserved.
//
#import <AsyncDisplayKit/ASAvailability.h>
#if YOGA /* YOGA */

View File

@ -11,7 +11,6 @@
#import <AsyncDisplayKit/ASMultiplexImageNode.h>
#import <AssetsLibrary/AssetsLibrary.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASDisplayNode+FrameworkSubclasses.h>
#import <AsyncDisplayKit/ASDisplayNodeExtras.h>
#import <AsyncDisplayKit/ASPhotosFrameworkImageRequest.h>

View File

@ -14,7 +14,6 @@
#import <AsyncDisplayKit/_ASDisplayLayer.h>
#import <AsyncDisplayKit/_ASHierarchyChangeSet.h>
#import <AsyncDisplayKit/ASAssert.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASBatchFetching.h>
#import <AsyncDisplayKit/ASCellNode+Internal.h>
#import <AsyncDisplayKit/ASCollectionElement.h>

View File

@ -12,7 +12,6 @@
#import <AsyncDisplayKit/ASViewController.h>
#import <AsyncDisplayKit/ASAssert.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASDisplayNode+FrameworkPrivate.h>
#import <AsyncDisplayKit/ASLayout.h>
#import <AsyncDisplayKit/ASTraitCollection.h>

View File

@ -8,23 +8,4 @@
#import <Foundation/Foundation.h>
#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(<PINRemoteImage/PINRemoteImage.h>)
#endif
#ifndef IG_LIST_KIT
#define IG_LIST_KIT __has_include(<IGListKit/IGListKit.h>)
/**
* 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(<IGListKit/IGListCollectionView.h>)
#endif
#import <AsyncDisplayKit/ASAvailability.h>

View File

@ -8,6 +8,7 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASDisplayNode.h>
#import <AsyncDisplayKit/ASDisplayNode+Convenience.h>
#import <AsyncDisplayKit/ASDisplayNodeExtras.h>
@ -81,7 +82,6 @@
#import <AsyncDisplayKit/ASDisplayNode+Beta.h>
#import <AsyncDisplayKit/ASTextNode+Beta.h>
#import <AsyncDisplayKit/ASTextNodeTypes.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASBlockTypes.h>
#import <AsyncDisplayKit/ASContextTransitioning.h>
#import <AsyncDisplayKit/ASControlNode+Subclasses.h>

View File

@ -32,3 +32,12 @@
#ifndef YOGA
#define YOGA __has_include(YOGA_HEADER_PATH)
#endif
#define PIN_REMOTE_IMAGE __has_include(<PINRemoteImage/PINRemoteImage.h>)
#define IG_LIST_KIT __has_include(<IGListKit/IGListKit.h>)
/**
* 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(<IGListKit/IGListCollectionView.h>)

View File

@ -12,14 +12,6 @@
#import <AsyncDisplayKit/ASLog.h>
#ifndef PIN_REMOTE_IMAGE
#if __has_include(<PINRemoteImage/PINRemoteImage.h>)
#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++

View File

@ -10,7 +10,6 @@
#pragma once
#import <AsyncDisplayKit/ASAvailability.h>
#define ASMultiplexImageNodeLogDebug(...)
#define ASMultiplexImageNodeCLogDebug(...)

View File

@ -6,7 +6,6 @@
// Copyright © 2016 Facebook. All rights reserved.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASObjectDescriptionHelpers.h>
#import <UIKit/UIGeometry.h>

View File

@ -12,7 +12,6 @@
#import <AsyncDisplayKit/ASPhotosFrameworkImageRequest.h>
#import <AsyncDisplayKit/ASBaseDefines.h>
#import <AsyncDisplayKit/ASAvailability.h>
NSString *const ASPhotosURLScheme = @"ph";

View File

@ -8,7 +8,6 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <UIKit/UIKit.h>
#import <AsyncDisplayKit/ASBaseDefines.h>

View File

@ -6,7 +6,6 @@
// Copyright © 2016 Facebook. All rights reserved.
//
#import <AsyncDisplayKit/ASAvailability.h>
// UIKit indexPath helpers
#import <UIKit/UIKit.h>

View File

@ -8,7 +8,6 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASLayoutSpec.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -8,7 +8,6 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASLayoutElementPrivate.h>
#import <AsyncDisplayKit/ASLayoutElementExtensibility.h>
#import <AsyncDisplayKit/ASDimensionInternal.h>

View File

@ -8,7 +8,6 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASDimension.h>
#import <UIKit/UIGeometry.h>

View File

@ -16,7 +16,6 @@
#import <AsyncDisplayKit/ASLayoutElementStylePrivate.h>
#import <AsyncDisplayKit/ASTraitCollection.h>
#import <AsyncDisplayKit/ASEqualityHelpers.h>
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASInternalHelpers.h>
#import <objc/runtime.h>

View File

@ -10,7 +10,6 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#import <AsyncDisplayKit/ASAvailability.h>
#import <AsyncDisplayKit/ASInternalHelpers.h>
#import <AsyncDisplayKit/ASThread.h>