Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Opting-Out of Linking with Photos Framework #1519

Merged
merged 1 commit into from
Jun 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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