Skip to content

Commit

Permalink
Fix Opting-Out of Linking with Photos Framework (facebookarchive#1519)
Browse files Browse the repository at this point in the history
  • Loading branch information
b3ll authored and Adlai-Holler committed Jun 3, 2019
1 parent a3f25d0 commit 1b4b6a3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Source/ASMultiplexImageNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@

#import <AsyncDisplayKit/ASImageNode.h>
#import <AsyncDisplayKit/ASImageProtocols.h>

#if AS_USE_PHOTOS
#import <Photos/Photos.h>
#else
@class PHAsset;
@class PHImageManager;
@class PHImageRequestOptions;
#endif

NS_ASSUME_NONNULL_BEGIN

Expand Down Expand Up @@ -125,10 +132,11 @@ typedef NS_ENUM(NSUInteger, ASMultiplexImageNodeErrorCode) {

/**
* @abstract The image manager that this image node should use when requesting images from the Photos framework. If this is `nil` (the default), then `PHImageManager.defaultManager` is used.
* @see `+[NSURL URLWithAssetLocalIdentifier:targetSize:contentMode:options:]` below.
*/
@property (nullable, nonatomic) PHImageManager *imageManager API_AVAILABLE(ios(8.0), tvos(10.0));

@end


Expand Down Expand Up @@ -249,6 +257,9 @@ didFinishDownloadingImageWithIdentifier:(ASImageIdentifier)imageIdentifier
@end

#pragma mark -

#if AS_USE_PHOTOS

@interface NSURL (ASPhotosFrameworkURLs)

/**
Expand All @@ -266,4 +277,6 @@ didFinishDownloadingImageWithIdentifier:(ASImageIdentifier)imageIdentifier

@end

#endif

NS_ASSUME_NONNULL_END

0 comments on commit 1b4b6a3

Please sign in to comment.