From 7e5986d97d657b7368f02f9b2730017fbe3b03fb Mon Sep 17 00:00:00 2001 From: Daniel Cohen Gindi <danielgindi@gmail.com> Date: Tue, 1 Oct 2024 22:06:25 +0300 Subject: [PATCH] Support swift package manager --- .gitignore | 1 + .../BFRBackLoadedImageSource.m | 5 +- .../BFRImageContainerViewController.m | 4 + .../contents.xcworkspacedata | 10 - .../xcshareddata/IDEWorkspaceChecks.plist | 8 - .../Base.lproj/LaunchScreen.storyboard | 14 +- .../BFRImageViewer/FifthViewController.m | 2 +- .../BFRImageViewer/FirstViewController.m | 2 +- .../BFRImageViewer/FourthViewController.m | 3 +- .../BFRImageViewer/SecondViewController.m | 2 +- .../BFRImageViewer/ThirdViewController.m | 3 +- .../project.pbxproj | 180 +- .../contents.xcworkspacedata | 2 +- .../xcshareddata/swiftpm/Package.resolved | 33 + BFRImageViewerDemo/Podfile | 9 - BFRImageViewerDemo/Podfile.lock | 22 - .../Private/PINOperation/PINOperation.h | 1 - .../Private/PINOperation/PINOperationGroup.h | 1 - .../Private/PINOperation/PINOperationMacros.h | 1 - .../Private/PINOperation/PINOperationQueue.h | 1 - .../Private/PINOperation/PINOperationTypes.h | 1 - .../PINRemoteImage/NSData+ImageDetectors.h | 1 - .../PINRemoteImage/NSHTTPURLResponse+MaxAge.h | 1 - .../PINAlternateRepresentationProvider.h | 1 - .../Private/PINRemoteImage/PINAnimatedImage.h | 1 - .../PINAnimatedImageView+PINRemoteImage.h | 1 - .../PINRemoteImage/PINAnimatedImageView.h | 1 - .../PINRemoteImage/PINButton+PINRemoteImage.h | 1 - .../PINRemoteImage/PINCachedAnimatedImage.h | 1 - .../Private/PINRemoteImage/PINDisplayLink.h | 1 - .../PINRemoteImage/PINGIFAnimatedImage.h | 1 - .../PINRemoteImage/PINImage+DecodedImage.h | 1 - .../PINRemoteImage/PINImage+ScaledImage.h | 1 - .../Private/PINRemoteImage/PINImage+WebP.h | 1 - .../PINImageView+PINRemoteImage.h | 1 - .../PINRemoteImage/PINProgressiveImage.h | 1 - .../Private/PINRemoteImage/PINRemoteImage.h | 1 - .../PINRemoteImage/PINRemoteImageBasicCache.h | 1 - .../PINRemoteImage/PINRemoteImageCaching.h | 1 - .../PINRemoteImage/PINRemoteImageCallbacks.h | 1 - .../PINRemoteImageCategoryManager.h | 1 - .../PINRemoteImageDownloadQueue.h | 1 - .../PINRemoteImageDownloadTask.h | 1 - .../PINRemoteImage/PINRemoteImageMacros.h | 1 - .../PINRemoteImageManager+Private.h | 1 - .../PINRemoteImage/PINRemoteImageManager.h | 1 - .../PINRemoteImageManagerConfiguration.h | 1 - .../PINRemoteImageManagerResult.h | 1 - .../PINRemoteImageMemoryContainer.h | 1 - .../PINRemoteImageProcessorTask.h | 1 - .../PINRemoteImageTask+Subclassing.h | 1 - .../PINRemoteImage/PINRemoteImageTask.h | 1 - .../Private/PINRemoteImage/PINRemoteLock.h | 1 - .../PINRemoteImage/PINRemoteWeakProxy.h | 1 - .../PINRemoteImage/PINRequestRetryStrategy.h | 1 - .../Private/PINRemoteImage/PINResume.h | 1 - .../Private/PINRemoteImage/PINSpeedRecorder.h | 1 - .../PINRemoteImage/PINURLSessionManager.h | 1 - .../PINRemoteImage/PINWebPAnimatedImage.h | 1 - .../Public/PINOperation/PINOperation.h | 1 - .../Public/PINOperation/PINOperationGroup.h | 1 - .../Public/PINOperation/PINOperationMacros.h | 1 - .../Public/PINOperation/PINOperationQueue.h | 1 - .../Public/PINOperation/PINOperationTypes.h | 1 - .../PINRemoteImage/NSData+ImageDetectors.h | 1 - .../PINRemoteImage/NSHTTPURLResponse+MaxAge.h | 1 - .../PINAlternateRepresentationProvider.h | 1 - .../Public/PINRemoteImage/PINAnimatedImage.h | 1 - .../PINAnimatedImageView+PINRemoteImage.h | 1 - .../PINRemoteImage/PINAnimatedImageView.h | 1 - .../PINRemoteImage/PINButton+PINRemoteImage.h | 1 - .../PINRemoteImage/PINCachedAnimatedImage.h | 1 - .../Public/PINRemoteImage/PINDisplayLink.h | 1 - .../PINRemoteImage/PINGIFAnimatedImage.h | 1 - .../PINRemoteImage/PINImage+DecodedImage.h | 1 - .../PINRemoteImage/PINImage+ScaledImage.h | 1 - .../Public/PINRemoteImage/PINImage+WebP.h | 1 - .../PINImageView+PINRemoteImage.h | 1 - .../PINRemoteImage/PINProgressiveImage.h | 1 - .../Public/PINRemoteImage/PINRemoteImage.h | 1 - .../PINRemoteImage/PINRemoteImageBasicCache.h | 1 - .../PINRemoteImage/PINRemoteImageCaching.h | 1 - .../PINRemoteImage/PINRemoteImageCallbacks.h | 1 - .../PINRemoteImageCategoryManager.h | 1 - .../PINRemoteImageDownloadQueue.h | 1 - .../PINRemoteImageDownloadTask.h | 1 - .../PINRemoteImage/PINRemoteImageMacros.h | 1 - .../PINRemoteImageManager+Private.h | 1 - .../PINRemoteImage/PINRemoteImageManager.h | 1 - .../PINRemoteImageManagerConfiguration.h | 1 - .../PINRemoteImageManagerResult.h | 1 - .../PINRemoteImageMemoryContainer.h | 1 - .../PINRemoteImageProcessorTask.h | 1 - .../PINRemoteImageTask+Subclassing.h | 1 - .../PINRemoteImage/PINRemoteImageTask.h | 1 - .../Public/PINRemoteImage/PINRemoteLock.h | 1 - .../PINRemoteImage/PINRemoteWeakProxy.h | 1 - .../PINRemoteImage/PINRequestRetryStrategy.h | 1 - .../Headers/Public/PINRemoteImage/PINResume.h | 1 - .../Public/PINRemoteImage/PINSpeedRecorder.h | 1 - .../PINRemoteImage/PINURLSessionManager.h | 1 - .../PINRemoteImage/PINWebPAnimatedImage.h | 1 - BFRImageViewerDemo/Pods/Manifest.lock | 22 - .../Pods/PINOperation/LICENSE.txt | 176 -- .../Pods/PINOperation/README.md | 47 - .../Pods/PINOperation/Source/PINOperation.h | 12 - .../PINOperation/Source/PINOperationGroup.h | 38 - .../PINOperation/Source/PINOperationGroup.m | 187 -- .../PINOperation/Source/PINOperationMacros.h | 15 - .../PINOperation/Source/PINOperationQueue.h | 141 -- .../PINOperation/Source/PINOperationQueue.m | 471 ----- .../PINOperation/Source/PINOperationTypes.h | 15 - .../Pods/PINRemoteImage/LICENSE | 176 -- .../Pods/PINRemoteImage/README.md | 252 --- .../Classes/AnimatedImages/PINAnimatedImage.m | 126 -- .../AnimatedImages/PINAnimatedImageView.m | 443 ----- .../AnimatedImages/PINCachedAnimatedImage.m | 528 ------ .../AnimatedImages/PINGIFAnimatedImage.m | 166 -- .../AnimatedImages/PINWebPAnimatedImage.m | 403 ---- .../Categories/NSData+ImageDetectors.m | 139 -- .../Categories/NSHTTPURLResponse+MaxAge.h | 14 - .../Categories/NSHTTPURLResponse+MaxAge.m | 71 - .../Categories/PINImage+DecodedImage.h | 44 - .../Categories/PINImage+DecodedImage.m | 325 ---- .../Classes/Categories/PINImage+ScaledImage.h | 24 - .../Classes/Categories/PINImage+ScaledImage.m | 56 - .../Source/Classes/Categories/PINImage+WebP.h | 25 - .../Source/Classes/Categories/PINImage+WebP.m | 87 - .../PINRemoteImageTask+Subclassing.h | 20 - .../PINAnimatedImageView+PINRemoteImage.m | 119 -- .../PINButton+PINRemoteImage.m | 131 -- .../PINImageView+PINRemoteImage.m | 127 -- .../PINAlternateRepresentationProvider.m | 30 - .../Source/Classes/PINDisplayLink.h | 25 - .../Source/Classes/PINDisplayLink.m | 133 -- .../Source/Classes/PINProgressiveImage.m | 464 ----- .../Source/Classes/PINRemoteImageBasicCache.h | 19 - .../Source/Classes/PINRemoteImageBasicCache.m | 99 - .../Source/Classes/PINRemoteImageCallbacks.h | 20 - .../Source/Classes/PINRemoteImageCallbacks.m | 21 - .../Classes/PINRemoteImageCategoryManager.m | 268 --- .../Classes/PINRemoteImageDownloadQueue.h | 47 - .../Classes/PINRemoteImageDownloadQueue.m | 177 -- .../Classes/PINRemoteImageDownloadTask.h | 37 - .../Classes/PINRemoteImageDownloadTask.m | 380 ---- .../Classes/PINRemoteImageManager+Private.h | 30 - .../Source/Classes/PINRemoteImageManager.m | 1651 ----------------- .../PINRemoteImageManagerConfiguration.h | 46 - .../PINRemoteImageManagerConfiguration.m | 36 - .../Classes/PINRemoteImageManagerResult.m | 118 -- .../Classes/PINRemoteImageMemoryContainer.h | 22 - .../Classes/PINRemoteImageMemoryContainer.m | 21 - .../Classes/PINRemoteImageProcessorTask.h | 15 - .../Classes/PINRemoteImageProcessorTask.m | 44 - .../Source/Classes/PINRemoteImageTask.h | 65 - .../Source/Classes/PINRemoteImageTask.m | 160 -- .../Source/Classes/PINRemoteLock.h | 28 - .../Source/Classes/PINRemoteLock.m | 112 -- .../Source/Classes/PINRemoteWeakProxy.h | 16 - .../Source/Classes/PINRemoteWeakProxy.m | 59 - .../Source/Classes/PINRequestRetryStrategy.m | 69 - .../PINRemoteImage/Source/Classes/PINResume.h | 24 - .../PINRemoteImage/Source/Classes/PINResume.m | 51 - .../Source/Classes/PINSpeedRecorder.h | 51 - .../Source/Classes/PINSpeedRecorder.m | 265 --- .../Source/Classes/PINURLSessionManager.m | 263 --- .../Classes/include/NSData+ImageDetectors.h | 22 - .../PINAlternateRepresentationProvider.h | 25 - .../Source/Classes/include/PINAnimatedImage.h | 165 -- .../PINAnimatedImageView+PINRemoteImage.h | 14 - .../Classes/include/PINAnimatedImageView.h | 28 - .../include/PINButton+PINRemoteImage.h | 22 - .../Classes/include/PINCachedAnimatedImage.h | 83 - .../Classes/include/PINGIFAnimatedImage.h | 18 - .../include/PINImageView+PINRemoteImage.h | 22 - .../Classes/include/PINProgressiveImage.h | 52 - .../Source/Classes/include/PINRemoteImage.h | 25 - .../Classes/include/PINRemoteImageCaching.h | 52 - .../include/PINRemoteImageCategoryManager.h | 230 --- .../Classes/include/PINRemoteImageMacros.h | 70 - .../Classes/include/PINRemoteImageManager.h | 703 ------- .../include/PINRemoteImageManagerResult.h | 71 - .../Classes/include/PINRequestRetryStrategy.h | 28 - .../Classes/include/PINURLSessionManager.h | 51 - .../Classes/include/PINWebPAnimatedImage.h | 19 - .../Pods/Pods.xcodeproj/project.pbxproj | 959 ---------- .../PINOperation/PINOperation-dummy.m | 5 - .../PINOperation/PINOperation-prefix.pch | 15 - .../PINOperation/PINOperation.debug.xcconfig | 12 - .../PINOperation.release.xcconfig | 12 - .../PINOperation/PINOperation.xcconfig | 9 - .../PINRemoteImage/PINRemoteImage-dummy.m | 5 - .../PINRemoteImage/PINRemoteImage-prefix.pch | 12 - .../PINRemoteImage.debug.xcconfig | 12 - .../PINRemoteImage.release.xcconfig | 12 - .../PINRemoteImage/PINRemoteImage.xcconfig | 9 - ...s-BFRImageViewer-acknowledgements.markdown | 363 ---- ...Pods-BFRImageViewer-acknowledgements.plist | 401 ---- .../Pods-BFRImageViewer-dummy.m | 5 - .../Pods-BFRImageViewer-frameworks.sh | 146 -- .../Pods-BFRImageViewer-resources.sh | 118 -- .../Pods-BFRImageViewer.debug.xcconfig | 12 - .../Pods-BFRImageViewer.release.xcconfig | 12 - Package.resolved | 32 + Package.swift | 34 + 205 files changed, 181 insertions(+), 13356 deletions(-) delete mode 100644 BFRImageViewerDemo/BFRImageViewer.xcworkspace/contents.xcworkspacedata delete mode 100644 BFRImageViewerDemo/BFRImageViewer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename BFRImageViewerDemo/{BFRImageViewer.xcodeproj => BFRImageViewerDemo.xcodeproj}/project.pbxproj (58%) rename BFRImageViewerDemo/{BFRImageViewer.xcodeproj => BFRImageViewerDemo.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (68%) create mode 100644 BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved delete mode 100644 BFRImageViewerDemo/Podfile delete mode 100644 BFRImageViewerDemo/Podfile.lock delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperation.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationGroup.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationMacros.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationQueue.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationTypes.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSData+ImageDetectors.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSHTTPURLResponse+MaxAge.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAlternateRepresentationProvider.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINButton+PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINCachedAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINDisplayLink.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINGIFAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+DecodedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+ScaledImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+WebP.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImageView+PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINProgressiveImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageBasicCache.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCaching.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCallbacks.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCategoryManager.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadQueue.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadTask.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMacros.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager+Private.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerConfiguration.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerResult.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMemoryContainer.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageProcessorTask.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask+Subclassing.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteLock.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteWeakProxy.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRequestRetryStrategy.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINResume.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINSpeedRecorder.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINURLSessionManager.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINWebPAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperation.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationGroup.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationMacros.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationQueue.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationTypes.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSData+ImageDetectors.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSHTTPURLResponse+MaxAge.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAlternateRepresentationProvider.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINButton+PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINCachedAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINDisplayLink.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINGIFAnimatedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+DecodedImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+ScaledImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+WebP.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImageView+PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINProgressiveImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImage.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageBasicCache.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCaching.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCallbacks.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCategoryManager.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadQueue.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadTask.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMacros.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager+Private.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerConfiguration.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerResult.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMemoryContainer.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageProcessorTask.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask+Subclassing.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteLock.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteWeakProxy.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRequestRetryStrategy.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINResume.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINSpeedRecorder.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINURLSessionManager.h delete mode 120000 BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINWebPAnimatedImage.h delete mode 100644 BFRImageViewerDemo/Pods/Manifest.lock delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/LICENSE.txt delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/README.md delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperation.h delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.h delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.m delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationMacros.h delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.h delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.m delete mode 100644 BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationTypes.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/LICENSE delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/README.md delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImageView.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINCachedAnimatedImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINGIFAnimatedImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINWebPAnimatedImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSData+ImageDetectors.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINRemoteImageTask+Subclassing.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINAnimatedImageView+PINRemoteImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINButton+PINRemoteImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINImageView+PINRemoteImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINAlternateRepresentationProvider.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINProgressiveImage.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCategoryManager.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager+Private.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerResult.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRequestRetryStrategy.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINURLSessionManager.m delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/NSData+ImageDetectors.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAlternateRepresentationProvider.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINButton+PINRemoteImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINCachedAnimatedImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINGIFAnimatedImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINImageView+PINRemoteImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINProgressiveImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImage.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCaching.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCategoryManager.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageMacros.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManager.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManagerResult.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRequestRetryStrategy.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINURLSessionManager.h delete mode 100644 BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINWebPAnimatedImage.h delete mode 100644 BFRImageViewerDemo/Pods/Pods.xcodeproj/project.pbxproj delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-dummy.m delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-prefix.pch delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.debug.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.release.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-dummy.m delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-prefix.pch delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.debug.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.release.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.markdown delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.plist delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-dummy.m delete mode 100755 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-frameworks.sh delete mode 100755 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-resources.sh delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.debug.xcconfig delete mode 100644 BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.release.xcconfig create mode 100644 Package.resolved create mode 100644 Package.swift diff --git a/.gitignore b/.gitignore index 3d7dcb4..e6b57b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Xcode # +.build/ build/ *.pbxuser !default.pbxuser diff --git a/BFRImageViewController/BFRBackLoadedImageSource.m b/BFRImageViewController/BFRBackLoadedImageSource.m index 63c7e90..95aae40 100644 --- a/BFRImageViewController/BFRBackLoadedImageSource.m +++ b/BFRImageViewController/BFRBackLoadedImageSource.m @@ -9,8 +9,11 @@ #import "BFRBackLoadedImageSource.h" #import "BFRImageViewerConstants.h" #import <UIKit/UIKit.h> -#import <PINRemoteImage/PINRemoteImage.h> +#ifdef COCOAPODS #import <PINRemoteImage/PINImageView+PINRemoteImage.h> +#else +@import PINRemoteImage; +#endif @interface BFRBackLoadedImageSource() diff --git a/BFRImageViewController/BFRImageContainerViewController.m b/BFRImageViewController/BFRImageContainerViewController.m index 9be6caf..1e1e71b 100644 --- a/BFRImageViewController/BFRImageContainerViewController.m +++ b/BFRImageViewController/BFRImageContainerViewController.m @@ -12,9 +12,13 @@ #import "BFRImageViewerConstants.h" #import <Photos/Photos.h> #import <PhotosUI/PhotosUI.h> +#ifdef COCOAPODS #import <PINRemoteImage/PINAnimatedImageView.h> #import <PINRemoteImage/PINRemoteImage.h> #import <PINRemoteImage/PINImageView+PINRemoteImage.h> +#else +@import PINRemoteImage; +#endif @interface BFRImageContainerViewController () <UIScrollViewDelegate, UIGestureRecognizerDelegate> diff --git a/BFRImageViewerDemo/BFRImageViewer.xcworkspace/contents.xcworkspacedata b/BFRImageViewerDemo/BFRImageViewer.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 39b8458..0000000 --- a/BFRImageViewerDemo/BFRImageViewer.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<Workspace - version = "1.0"> - <FileRef - location = "group:BFRImageViewer.xcodeproj"> - </FileRef> - <FileRef - location = "group:Pods/Pods.xcodeproj"> - </FileRef> -</Workspace> diff --git a/BFRImageViewerDemo/BFRImageViewer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/BFRImageViewerDemo/BFRImageViewer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/BFRImageViewerDemo/BFRImageViewer.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>IDEDidComputeMac32BitWarning</key> - <true/> -</dict> -</plist> diff --git a/BFRImageViewerDemo/BFRImageViewer/Base.lproj/LaunchScreen.storyboard b/BFRImageViewerDemo/BFRImageViewer/Base.lproj/LaunchScreen.storyboard index 2e721e1..9675678 100644 --- a/BFRImageViewerDemo/BFRImageViewer/Base.lproj/LaunchScreen.storyboard +++ b/BFRImageViewerDemo/BFRImageViewer/Base.lproj/LaunchScreen.storyboard @@ -1,7 +1,10 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> + <device id="retina6_12" orientation="portrait" appearance="light"/> <dependencies> - <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/> + <deployment identifier="iOS"/> + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/> + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> <!--View Controller--> @@ -13,10 +16,9 @@ <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> - <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> + <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> - <animations/> - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> diff --git a/BFRImageViewerDemo/BFRImageViewer/FifthViewController.m b/BFRImageViewerDemo/BFRImageViewer/FifthViewController.m index 2c344af..a0e238c 100644 --- a/BFRImageViewerDemo/BFRImageViewer/FifthViewController.m +++ b/BFRImageViewerDemo/BFRImageViewer/FifthViewController.m @@ -8,7 +8,7 @@ #import <Photos/Photos.h> #import "FifthViewController.h" -#import "BFRImageViewController.h" +@import BFRImageViewer; @interface FifthViewController () <UINavigationControllerDelegate, UIImagePickerControllerDelegate> diff --git a/BFRImageViewerDemo/BFRImageViewer/FirstViewController.m b/BFRImageViewerDemo/BFRImageViewer/FirstViewController.m index d9c92c1..752fdd9 100644 --- a/BFRImageViewerDemo/BFRImageViewer/FirstViewController.m +++ b/BFRImageViewerDemo/BFRImageViewer/FirstViewController.m @@ -7,7 +7,7 @@ // #import "FirstViewController.h" -#import "BFRImageViewController.h" +@import BFRImageViewer; @interface FirstViewController () @property (strong, nonatomic) NSURL *imgURL; diff --git a/BFRImageViewerDemo/BFRImageViewer/FourthViewController.m b/BFRImageViewerDemo/BFRImageViewer/FourthViewController.m index 055a4f6..7fc9c8d 100644 --- a/BFRImageViewerDemo/BFRImageViewer/FourthViewController.m +++ b/BFRImageViewerDemo/BFRImageViewer/FourthViewController.m @@ -7,8 +7,7 @@ // #import "FourthViewController.h" -#import "BFRBackLoadedImageSource.h" -#import "BFRImageViewController.h" +@import BFRImageViewer; @interface FourthViewController () diff --git a/BFRImageViewerDemo/BFRImageViewer/SecondViewController.m b/BFRImageViewerDemo/BFRImageViewer/SecondViewController.m index a6d110a..c11e9dc 100644 --- a/BFRImageViewerDemo/BFRImageViewer/SecondViewController.m +++ b/BFRImageViewerDemo/BFRImageViewer/SecondViewController.m @@ -7,7 +7,7 @@ // #import "SecondViewController.h" -#import "BFRImageViewController.h" +@import BFRImageViewer; @interface SecondViewController () @property (strong, nonatomic) NSArray *imgURLs; diff --git a/BFRImageViewerDemo/BFRImageViewer/ThirdViewController.m b/BFRImageViewerDemo/BFRImageViewer/ThirdViewController.m index 05f81d6..e157675 100644 --- a/BFRImageViewerDemo/BFRImageViewer/ThirdViewController.m +++ b/BFRImageViewerDemo/BFRImageViewer/ThirdViewController.m @@ -7,8 +7,7 @@ // #import "ThirdViewController.h" -#import "BFRImageTransitionAnimator.h" -#import "BFRImageViewController.h" +@import BFRImageViewer; @interface ThirdViewController () diff --git a/BFRImageViewerDemo/BFRImageViewer.xcodeproj/project.pbxproj b/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.pbxproj similarity index 58% rename from BFRImageViewerDemo/BFRImageViewer.xcodeproj/project.pbxproj rename to BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.pbxproj index e06a0c1..4e7e355 100644 --- a/BFRImageViewerDemo/BFRImageViewer.xcodeproj/project.pbxproj +++ b/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.pbxproj @@ -3,49 +3,41 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ - 1702C69A1F86BBFC00104D0B /* BFRImageViewerConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = 1702C6991F86BBFC00104D0B /* BFRImageViewerConstants.m */; }; - 170BE4FF212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 170BE4FE212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.m */; }; - 171F4AD01E96BE0500F4AF01 /* BFRBackLoadedImageSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 171F4ACF1E96BE0500F4AF01 /* BFRBackLoadedImageSource.m */; }; 171F4AD31E96C31400F4AF01 /* FourthViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 171F4AD21E96C31400F4AF01 /* FourthViewController.m */; }; - 1797CB8E1E81BB4F00D9F729 /* BFRImageTransitionAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = 1797CB8D1E81BB4F00D9F729 /* BFRImageTransitionAnimator.m */; }; 1797CB911E81BBB200D9F729 /* ThirdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1797CB901E81BBB200D9F729 /* ThirdViewController.m */; }; - 17C1AAB61D9D6EBF00FF1B67 /* BFRImageViewerLocalizations.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 17C1AAB51D9D6EBF00FF1B67 /* BFRImageViewerLocalizations.bundle */; }; - 33625B75264D71130003310C /* lowResImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 33625B74264D71130003310C /* lowResImage.png */; }; - 3D65F036BBCC181E7FD291F7 /* libPods-BFRImageViewer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76763DB871F085556628E1C6 /* libPods-BFRImageViewer.a */; }; + 5B6DC3342CAC81A900F4AB8B /* BFRImageViewer in Frameworks */ = {isa = PBXBuildFile; productRef = 5B6DC3332CAC81A900F4AB8B /* BFRImageViewer */; }; 944B4DB01BFFC0C000B9BF87 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 944B4DAF1BFFC0C000B9BF87 /* main.m */; }; 944B4DB31BFFC0C000B9BF87 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 944B4DB21BFFC0C000B9BF87 /* AppDelegate.m */; }; 944B4DB61BFFC0C000B9BF87 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 944B4DB51BFFC0C000B9BF87 /* FirstViewController.m */; }; 944B4DB91BFFC0C000B9BF87 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 944B4DB81BFFC0C000B9BF87 /* SecondViewController.m */; }; 944B4DC11BFFC0C000B9BF87 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 944B4DBF1BFFC0C000B9BF87 /* LaunchScreen.storyboard */; }; - 944B4DE91BFFC0E300B9BF87 /* BFRImageContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 944B4DE61BFFC0E300B9BF87 /* BFRImageContainerViewController.m */; }; - 944B4DEA1BFFC0E300B9BF87 /* BFRImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 944B4DE81BFFC0E300B9BF87 /* BFRImageViewController.m */; }; 95D4797D1F97C348001E54D4 /* FifthViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95D4797C1F97C348001E54D4 /* FifthViewController.m */; }; /* End PBXBuildFile section */ +/* Begin PBXBuildRule section */ + 5B6DC32F2CAC7D4E00F4AB8B /* PBXBuildRule */ = { + isa = PBXBuildRule; + compilerSpec = com.apple.compilers.proxy.script; + fileType = pattern.proxy; + inputFiles = ( + ); + isEditable = 1; + outputFiles = ( + ); + script = "# Type a script or drag a script file from your workspace to insert its path.\n"; + }; +/* End PBXBuildRule section */ + /* Begin PBXFileReference section */ - 1264A436520DEA8753316972 /* Pods-BFRImageViewer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BFRImageViewer.release.xcconfig"; path = "Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.release.xcconfig"; sourceTree = "<group>"; }; - 1702C6981F86BBFC00104D0B /* BFRImageViewerConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFRImageViewerConstants.h; sourceTree = "<group>"; }; - 1702C6991F86BBFC00104D0B /* BFRImageViewerConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BFRImageViewerConstants.m; sourceTree = "<group>"; }; - 170BE4FD212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFRImageViewerDownloadProgressView.h; sourceTree = "<group>"; }; - 170BE4FE212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BFRImageViewerDownloadProgressView.m; sourceTree = "<group>"; }; - 171F4ACE1E96BE0500F4AF01 /* BFRBackLoadedImageSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFRBackLoadedImageSource.h; sourceTree = "<group>"; }; - 171F4ACF1E96BE0500F4AF01 /* BFRBackLoadedImageSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFRBackLoadedImageSource.m; sourceTree = "<group>"; }; 171F4AD11E96C31400F4AF01 /* FourthViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FourthViewController.h; sourceTree = "<group>"; }; 171F4AD21E96C31400F4AF01 /* FourthViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FourthViewController.m; sourceTree = "<group>"; }; - 1797CB8C1E81BB4F00D9F729 /* BFRImageTransitionAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFRImageTransitionAnimator.h; sourceTree = "<group>"; }; - 1797CB8D1E81BB4F00D9F729 /* BFRImageTransitionAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFRImageTransitionAnimator.m; sourceTree = "<group>"; }; 1797CB8F1E81BBB200D9F729 /* ThirdViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThirdViewController.h; sourceTree = "<group>"; }; 1797CB901E81BBB200D9F729 /* ThirdViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThirdViewController.m; sourceTree = "<group>"; }; - 17C1AAB51D9D6EBF00FF1B67 /* BFRImageViewerLocalizations.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = BFRImageViewerLocalizations.bundle; sourceTree = "<group>"; }; - 17C1AAB91D9D702E00FF1B67 /* BFRImageViewerLocalizations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BFRImageViewerLocalizations.h; sourceTree = "<group>"; }; - 33625B74264D71130003310C /* lowResImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = lowResImage.png; sourceTree = "<group>"; }; - 3C46F30D2C78F64E6BC23C87 /* Pods-BFRImageViewer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BFRImageViewer.debug.xcconfig"; path = "Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.debug.xcconfig"; sourceTree = "<group>"; }; - 76763DB871F085556628E1C6 /* libPods-BFRImageViewer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BFRImageViewer.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 944B4DAB1BFFC0C000B9BF87 /* BFRImageViewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BFRImageViewer.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 944B4DAB1BFFC0C000B9BF87 /* BFRImageViewerDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BFRImageViewerDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 944B4DAF1BFFC0C000B9BF87 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 944B4DB11BFFC0C000B9BF87 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 944B4DB21BFFC0C000B9BF87 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; @@ -55,10 +47,6 @@ 944B4DB81BFFC0C000B9BF87 /* SecondViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = "<group>"; }; 944B4DC01BFFC0C000B9BF87 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 944B4DC21BFFC0C000B9BF87 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - 944B4DE51BFFC0E300B9BF87 /* BFRImageContainerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFRImageContainerViewController.h; sourceTree = "<group>"; }; - 944B4DE61BFFC0E300B9BF87 /* BFRImageContainerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFRImageContainerViewController.m; sourceTree = "<group>"; }; - 944B4DE71BFFC0E300B9BF87 /* BFRImageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BFRImageViewController.h; sourceTree = "<group>"; }; - 944B4DE81BFFC0E300B9BF87 /* BFRImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BFRImageViewController.m; sourceTree = "<group>"; }; 95D4797B1F97C348001E54D4 /* FifthViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FifthViewController.h; sourceTree = "<group>"; }; 95D4797C1F97C348001E54D4 /* FifthViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FifthViewController.m; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -68,7 +56,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 3D65F036BBCC181E7FD291F7 /* libPods-BFRImageViewer.a in Frameworks */, + 5B6DC3342CAC81A900F4AB8B /* BFRImageViewer in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -78,26 +66,15 @@ 5191CE176EA32C80E7D64558 /* Frameworks */ = { isa = PBXGroup; children = ( - 76763DB871F085556628E1C6 /* libPods-BFRImageViewer.a */, ); name = Frameworks; sourceTree = "<group>"; }; - 578DFD551CB6E7F400BFBD00 /* Resources */ = { - isa = PBXGroup; - children = ( - 33625B74264D71130003310C /* lowResImage.png */, - 17C1AAB51D9D6EBF00FF1B67 /* BFRImageViewerLocalizations.bundle */, - ); - path = Resources; - sourceTree = "<group>"; - }; 944B4DA21BFFC0C000B9BF87 = { isa = PBXGroup; children = ( 944B4DAD1BFFC0C000B9BF87 /* BFRImageViewer */, 944B4DAC1BFFC0C000B9BF87 /* Products */, - C56EC8D7F8FA116D743C33F9 /* Pods */, 5191CE176EA32C80E7D64558 /* Frameworks */, ); sourceTree = "<group>"; @@ -105,7 +82,7 @@ 944B4DAC1BFFC0C000B9BF87 /* Products */ = { isa = PBXGroup; children = ( - 944B4DAB1BFFC0C000B9BF87 /* BFRImageViewer.app */, + 944B4DAB1BFFC0C000B9BF87 /* BFRImageViewerDemo.app */, ); name = Products; sourceTree = "<group>"; @@ -121,7 +98,6 @@ 944B4DB81BFFC0C000B9BF87 /* SecondViewController.m */, 1797CB8F1E81BBB200D9F729 /* ThirdViewController.h */, 1797CB901E81BBB200D9F729 /* ThirdViewController.m */, - 944B4DE41BFFC0E300B9BF87 /* BFRImageViewController */, 944B4DBF1BFFC0C000B9BF87 /* LaunchScreen.storyboard */, 944B4DC21BFFC0C000B9BF87 /* Info.plist */, 944B4DAE1BFFC0C000B9BF87 /* Supporting Files */, @@ -141,56 +117,25 @@ name = "Supporting Files"; sourceTree = "<group>"; }; - 944B4DE41BFFC0E300B9BF87 /* BFRImageViewController */ = { - isa = PBXGroup; - children = ( - 578DFD551CB6E7F400BFBD00 /* Resources */, - 944B4DE51BFFC0E300B9BF87 /* BFRImageContainerViewController.h */, - 944B4DE61BFFC0E300B9BF87 /* BFRImageContainerViewController.m */, - 944B4DE71BFFC0E300B9BF87 /* BFRImageViewController.h */, - 944B4DE81BFFC0E300B9BF87 /* BFRImageViewController.m */, - 17C1AAB91D9D702E00FF1B67 /* BFRImageViewerLocalizations.h */, - 1797CB8C1E81BB4F00D9F729 /* BFRImageTransitionAnimator.h */, - 1797CB8D1E81BB4F00D9F729 /* BFRImageTransitionAnimator.m */, - 171F4ACE1E96BE0500F4AF01 /* BFRBackLoadedImageSource.h */, - 171F4ACF1E96BE0500F4AF01 /* BFRBackLoadedImageSource.m */, - 1702C6981F86BBFC00104D0B /* BFRImageViewerConstants.h */, - 1702C6991F86BBFC00104D0B /* BFRImageViewerConstants.m */, - 170BE4FD212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.h */, - 170BE4FE212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.m */, - ); - name = BFRImageViewController; - path = ../../BFRImageViewController; - sourceTree = "<group>"; - }; - C56EC8D7F8FA116D743C33F9 /* Pods */ = { - isa = PBXGroup; - children = ( - 3C46F30D2C78F64E6BC23C87 /* Pods-BFRImageViewer.debug.xcconfig */, - 1264A436520DEA8753316972 /* Pods-BFRImageViewer.release.xcconfig */, - ); - name = Pods; - sourceTree = "<group>"; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 944B4DAA1BFFC0C000B9BF87 /* BFRImageViewer */ = { + 944B4DAA1BFFC0C000B9BF87 /* BFRImageViewerDemo */ = { isa = PBXNativeTarget; - buildConfigurationList = 944B4DDB1BFFC0C000B9BF87 /* Build configuration list for PBXNativeTarget "BFRImageViewer" */; + buildConfigurationList = 944B4DDB1BFFC0C000B9BF87 /* Build configuration list for PBXNativeTarget "BFRImageViewerDemo" */; buildPhases = ( - 4D3801A437227AB29824B953 /* [CP] Check Pods Manifest.lock */, 944B4DA71BFFC0C000B9BF87 /* Sources */, 944B4DA81BFFC0C000B9BF87 /* Frameworks */, 944B4DA91BFFC0C000B9BF87 /* Resources */, ); buildRules = ( + 5B6DC32F2CAC7D4E00F4AB8B /* PBXBuildRule */, ); dependencies = ( ); - name = BFRImageViewer; + name = BFRImageViewerDemo; productName = BFRImageViewer; - productReference = 944B4DAB1BFFC0C000B9BF87 /* BFRImageViewer.app */; + productReference = 944B4DAB1BFFC0C000B9BF87 /* BFRImageViewerDemo.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -204,11 +149,11 @@ TargetAttributes = { 944B4DAA1BFFC0C000B9BF87 = { CreatedOnToolsVersion = 7.1.1; - DevelopmentTeam = UYDA63C4EC; + DevelopmentTeam = EF7AZ55H5Q; }; }; }; - buildConfigurationList = 944B4DA61BFFC0C000B9BF87 /* Build configuration list for PBXProject "BFRImageViewer" */; + buildConfigurationList = 944B4DA61BFFC0C000B9BF87 /* Build configuration list for PBXProject "BFRImageViewerDemo" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; @@ -217,11 +162,14 @@ Base, ); mainGroup = 944B4DA21BFFC0C000B9BF87; + packageReferences = ( + 5B6DC3262CAC7C7F00F4AB8B /* XCLocalSwiftPackageReference "../../buffer-ios-image-viewer" */, + ); productRefGroup = 944B4DAC1BFFC0C000B9BF87 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 944B4DAA1BFFC0C000B9BF87 /* BFRImageViewer */, + 944B4DAA1BFFC0C000B9BF87 /* BFRImageViewerDemo */, ); }; /* End PBXProject section */ @@ -232,50 +180,21 @@ buildActionMask = 2147483647; files = ( 944B4DC11BFFC0C000B9BF87 /* LaunchScreen.storyboard in Resources */, - 17C1AAB61D9D6EBF00FF1B67 /* BFRImageViewerLocalizations.bundle in Resources */, - 33625B75264D71130003310C /* lowResImage.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 4D3801A437227AB29824B953 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-BFRImageViewer-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 944B4DA71BFFC0C000B9BF87 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 944B4DB91BFFC0C000B9BF87 /* SecondViewController.m in Sources */, - 170BE4FF212DBB2B005703C6 /* BFRImageViewerDownloadProgressView.m in Sources */, - 1797CB8E1E81BB4F00D9F729 /* BFRImageTransitionAnimator.m in Sources */, 1797CB911E81BBB200D9F729 /* ThirdViewController.m in Sources */, 95D4797D1F97C348001E54D4 /* FifthViewController.m in Sources */, - 944B4DEA1BFFC0E300B9BF87 /* BFRImageViewController.m in Sources */, 944B4DB31BFFC0C000B9BF87 /* AppDelegate.m in Sources */, - 171F4AD01E96BE0500F4AF01 /* BFRBackLoadedImageSource.m in Sources */, 171F4AD31E96C31400F4AF01 /* FourthViewController.m in Sources */, - 1702C69A1F86BBFC00104D0B /* BFRImageViewerConstants.m in Sources */, - 944B4DE91BFFC0E300B9BF87 /* BFRImageContainerViewController.m in Sources */, 944B4DB61BFFC0C000B9BF87 /* FirstViewController.m in Sources */, 944B4DB01BFFC0C000B9BF87 /* main.m in Sources */, ); @@ -343,7 +262,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -393,7 +312,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -403,13 +322,15 @@ }; 944B4DDC1BFFC0C000B9BF87 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3C46F30D2C78F64E6BC23C87 /* Pods-BFRImageViewer.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = UYDA63C4EC; INFOPLIST_FILE = BFRImageViewer/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.buffer.BFRImageViewer; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -417,13 +338,15 @@ }; 944B4DDD1BFFC0C000B9BF87 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 1264A436520DEA8753316972 /* Pods-BFRImageViewer.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = UYDA63C4EC; INFOPLIST_FILE = BFRImageViewer/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.buffer.BFRImageViewer; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -432,7 +355,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 944B4DA61BFFC0C000B9BF87 /* Build configuration list for PBXProject "BFRImageViewer" */ = { + 944B4DA61BFFC0C000B9BF87 /* Build configuration list for PBXProject "BFRImageViewerDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 944B4DD91BFFC0C000B9BF87 /* Debug */, @@ -441,7 +364,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 944B4DDB1BFFC0C000B9BF87 /* Build configuration list for PBXNativeTarget "BFRImageViewer" */ = { + 944B4DDB1BFFC0C000B9BF87 /* Build configuration list for PBXNativeTarget "BFRImageViewerDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 944B4DDC1BFFC0C000B9BF87 /* Debug */, @@ -451,6 +374,21 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 5B6DC3262CAC7C7F00F4AB8B /* XCLocalSwiftPackageReference "../../buffer-ios-image-viewer" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = "../../buffer-ios-image-viewer"; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 5B6DC3332CAC81A900F4AB8B /* BFRImageViewer */ = { + isa = XCSwiftPackageProductDependency; + package = 5B6DC3262CAC7C7F00F4AB8B /* XCLocalSwiftPackageReference "../../buffer-ios-image-viewer" */; + productName = BFRImageViewer; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 944B4DA31BFFC0C000B9BF87 /* Project object */; } diff --git a/BFRImageViewerDemo/BFRImageViewer.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 68% rename from BFRImageViewerDemo/BFRImageViewer.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 58ab3af..919434a 100644 --- a/BFRImageViewerDemo/BFRImageViewer.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ <Workspace version = "1.0"> <FileRef - location = "self:BFRImageViewer.xcodeproj"> + location = "self:"> </FileRef> </Workspace> diff --git a/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..3f84097 --- /dev/null +++ b/BFRImageViewerDemo/BFRImageViewerDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,33 @@ +{ + "originHash" : "63737eb8c558e228184e6353fe8cfe4d96bc93b62a44cc60d59798ecf1e65fb8", + "pins" : [ + { + "identity" : "pincache", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINCache.git", + "state" : { + "revision" : "2fb85948463292c2e824148cf17dc62a4c217a94", + "version" : "3.0.4" + } + }, + { + "identity" : "pinoperation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINOperation.git", + "state" : { + "revision" : "a74f978733bdaf982758bfa23d70a189f4b4c1b6", + "version" : "1.2.3" + } + }, + { + "identity" : "pinremoteimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINRemoteImage.git", + "state" : { + "revision" : "37022d0fb9359ce33fa06028d03382c8b9957c62", + "version" : "3.0.4" + } + } + ], + "version" : 3 +} diff --git a/BFRImageViewerDemo/Podfile b/BFRImageViewerDemo/Podfile deleted file mode 100644 index 9a438e7..0000000 --- a/BFRImageViewerDemo/Podfile +++ /dev/null @@ -1,9 +0,0 @@ -platform :ios, '13.0' - -inhibit_all_warnings! - -target 'BFRImageViewer' do - - pod 'PINRemoteImage/iOS', '~> 3.0.0' - -end diff --git a/BFRImageViewerDemo/Podfile.lock b/BFRImageViewerDemo/Podfile.lock deleted file mode 100644 index 84e5d15..0000000 --- a/BFRImageViewerDemo/Podfile.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - PINOperation (1.2.1) - - PINRemoteImage/Core (3.0.3): - - PINOperation - - PINRemoteImage/iOS (3.0.3): - - PINRemoteImage/Core - -DEPENDENCIES: - - PINRemoteImage/iOS (~> 3.0.0) - -SPEC REPOS: - trunk: - - PINOperation - - PINRemoteImage - -SPEC CHECKSUMS: - PINOperation: 00c935935f1e8cf0d1e2d6b542e75b88fc3e5e20 - PINRemoteImage: f1295b29f8c5e640e25335a1b2bd9d805171bd01 - -PODFILE CHECKSUM: 9a080f8a24bf4d7e3dd1b620f4fb743f1f4c8104 - -COCOAPODS: 1.10.1 diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperation.h b/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperation.h deleted file mode 120000 index 5b26e09..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperation.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationGroup.h b/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationGroup.h deleted file mode 120000 index c44c40b..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationGroup.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationGroup.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationMacros.h b/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationMacros.h deleted file mode 120000 index b5f5d6b..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationMacros.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationMacros.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationQueue.h b/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationQueue.h deleted file mode 120000 index d91be77..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationQueue.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationQueue.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationTypes.h b/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationTypes.h deleted file mode 120000 index 536183d..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINOperation/PINOperationTypes.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationTypes.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSData+ImageDetectors.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSData+ImageDetectors.h deleted file mode 120000 index 6f827ef..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSData+ImageDetectors.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/NSData+ImageDetectors.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSHTTPURLResponse+MaxAge.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSHTTPURLResponse+MaxAge.h deleted file mode 120000 index e45de2c..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/NSHTTPURLResponse+MaxAge.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAlternateRepresentationProvider.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAlternateRepresentationProvider.h deleted file mode 120000 index 3a4feb7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAlternateRepresentationProvider.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAlternateRepresentationProvider.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImage.h deleted file mode 120000 index dd61d63..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h deleted file mode 120000 index 06253b7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView.h deleted file mode 120000 index 95702a5..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINAnimatedImageView.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAnimatedImageView.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINButton+PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINButton+PINRemoteImage.h deleted file mode 120000 index 34cdeb5..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINButton+PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINButton+PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINCachedAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINCachedAnimatedImage.h deleted file mode 120000 index bb2b0e1..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINCachedAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINCachedAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINDisplayLink.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINDisplayLink.h deleted file mode 120000 index 6b1962f..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINDisplayLink.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINDisplayLink.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINGIFAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINGIFAnimatedImage.h deleted file mode 120000 index 7ff03bc..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINGIFAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINGIFAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+DecodedImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+DecodedImage.h deleted file mode 120000 index d0707d2..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+DecodedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+ScaledImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+ScaledImage.h deleted file mode 120000 index 85decf2..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+ScaledImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+WebP.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+WebP.h deleted file mode 120000 index 3611078..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImage+WebP.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINImage+WebP.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImageView+PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImageView+PINRemoteImage.h deleted file mode 120000 index 94d8a40..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINImageView+PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINImageView+PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINProgressiveImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINProgressiveImage.h deleted file mode 120000 index 2515d14..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINProgressiveImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINProgressiveImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImage.h deleted file mode 120000 index d94d6a0..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageBasicCache.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageBasicCache.h deleted file mode 120000 index 36f8e49..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageBasicCache.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCaching.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCaching.h deleted file mode 120000 index 32b3460..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCaching.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageCaching.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCallbacks.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCallbacks.h deleted file mode 120000 index f793c2b..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCallbacks.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCategoryManager.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCategoryManager.h deleted file mode 120000 index 86d65ec..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageCategoryManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageCategoryManager.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadQueue.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadQueue.h deleted file mode 120000 index 49c1607..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadQueue.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadTask.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadTask.h deleted file mode 120000 index 6e9d527..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageDownloadTask.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMacros.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMacros.h deleted file mode 120000 index f8bbdcf..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMacros.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageMacros.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager+Private.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager+Private.h deleted file mode 120000 index 359f4d1..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageManager+Private.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager.h deleted file mode 120000 index 6560ff9..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageManager.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerConfiguration.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerConfiguration.h deleted file mode 120000 index babfadd..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerResult.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerResult.h deleted file mode 120000 index bf6f476..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageManagerResult.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageManagerResult.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMemoryContainer.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMemoryContainer.h deleted file mode 120000 index 7c4bba7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageMemoryContainer.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageProcessorTask.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageProcessorTask.h deleted file mode 120000 index b0d97e7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageProcessorTask.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask+Subclassing.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask+Subclassing.h deleted file mode 120000 index 41b95cc..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask+Subclassing.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINRemoteImageTask+Subclassing.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask.h deleted file mode 120000 index b71ddbf..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteImageTask.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageTask.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteLock.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteLock.h deleted file mode 120000 index 9cae8ce..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteLock.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteLock.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteWeakProxy.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteWeakProxy.h deleted file mode 120000 index 14774e9..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRemoteWeakProxy.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteWeakProxy.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRequestRetryStrategy.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRequestRetryStrategy.h deleted file mode 120000 index 100742a..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINRequestRetryStrategy.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRequestRetryStrategy.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINResume.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINResume.h deleted file mode 120000 index bd3360e..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINResume.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINResume.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINSpeedRecorder.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINSpeedRecorder.h deleted file mode 120000 index 0824485..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINSpeedRecorder.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINSpeedRecorder.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINURLSessionManager.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINURLSessionManager.h deleted file mode 120000 index 7c7cfab..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINURLSessionManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINURLSessionManager.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINWebPAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINWebPAnimatedImage.h deleted file mode 120000 index 1550d63..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Private/PINRemoteImage/PINWebPAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINWebPAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperation.h b/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperation.h deleted file mode 120000 index 5b26e09..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperation.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationGroup.h b/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationGroup.h deleted file mode 120000 index c44c40b..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationGroup.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationGroup.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationMacros.h b/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationMacros.h deleted file mode 120000 index b5f5d6b..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationMacros.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationMacros.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationQueue.h b/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationQueue.h deleted file mode 120000 index d91be77..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationQueue.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationQueue.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationTypes.h b/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationTypes.h deleted file mode 120000 index 536183d..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINOperation/PINOperationTypes.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINOperation/Source/PINOperationTypes.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSData+ImageDetectors.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSData+ImageDetectors.h deleted file mode 120000 index 6f827ef..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSData+ImageDetectors.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/NSData+ImageDetectors.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSHTTPURLResponse+MaxAge.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSHTTPURLResponse+MaxAge.h deleted file mode 120000 index e45de2c..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/NSHTTPURLResponse+MaxAge.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAlternateRepresentationProvider.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAlternateRepresentationProvider.h deleted file mode 120000 index 3a4feb7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAlternateRepresentationProvider.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAlternateRepresentationProvider.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImage.h deleted file mode 120000 index dd61d63..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h deleted file mode 120000 index 06253b7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView+PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView.h deleted file mode 120000 index 95702a5..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINAnimatedImageView.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINAnimatedImageView.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINButton+PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINButton+PINRemoteImage.h deleted file mode 120000 index 34cdeb5..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINButton+PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINButton+PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINCachedAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINCachedAnimatedImage.h deleted file mode 120000 index bb2b0e1..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINCachedAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINCachedAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINDisplayLink.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINDisplayLink.h deleted file mode 120000 index 6b1962f..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINDisplayLink.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINDisplayLink.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINGIFAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINGIFAnimatedImage.h deleted file mode 120000 index 7ff03bc..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINGIFAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINGIFAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+DecodedImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+DecodedImage.h deleted file mode 120000 index d0707d2..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+DecodedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+ScaledImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+ScaledImage.h deleted file mode 120000 index 85decf2..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+ScaledImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+WebP.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+WebP.h deleted file mode 120000 index 3611078..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImage+WebP.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINImage+WebP.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImageView+PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImageView+PINRemoteImage.h deleted file mode 120000 index 94d8a40..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINImageView+PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINImageView+PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINProgressiveImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINProgressiveImage.h deleted file mode 120000 index 2515d14..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINProgressiveImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINProgressiveImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImage.h deleted file mode 120000 index d94d6a0..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageBasicCache.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageBasicCache.h deleted file mode 120000 index 36f8e49..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageBasicCache.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCaching.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCaching.h deleted file mode 120000 index 32b3460..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCaching.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageCaching.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCallbacks.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCallbacks.h deleted file mode 120000 index f793c2b..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCallbacks.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCategoryManager.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCategoryManager.h deleted file mode 120000 index 86d65ec..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageCategoryManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageCategoryManager.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadQueue.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadQueue.h deleted file mode 120000 index 49c1607..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadQueue.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadTask.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadTask.h deleted file mode 120000 index 6e9d527..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageDownloadTask.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMacros.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMacros.h deleted file mode 120000 index f8bbdcf..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMacros.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageMacros.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager+Private.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager+Private.h deleted file mode 120000 index 359f4d1..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager+Private.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageManager+Private.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager.h deleted file mode 120000 index 6560ff9..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageManager.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerConfiguration.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerConfiguration.h deleted file mode 120000 index babfadd..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerConfiguration.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerResult.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerResult.h deleted file mode 120000 index bf6f476..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageManagerResult.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRemoteImageManagerResult.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMemoryContainer.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMemoryContainer.h deleted file mode 120000 index 7c4bba7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageMemoryContainer.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageProcessorTask.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageProcessorTask.h deleted file mode 120000 index b0d97e7..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageProcessorTask.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask+Subclassing.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask+Subclassing.h deleted file mode 120000 index 41b95cc..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask+Subclassing.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/Categories/PINRemoteImageTask+Subclassing.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask.h deleted file mode 120000 index b71ddbf..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteImageTask.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteImageTask.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteLock.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteLock.h deleted file mode 120000 index 9cae8ce..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteLock.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteLock.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteWeakProxy.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteWeakProxy.h deleted file mode 120000 index 14774e9..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRemoteWeakProxy.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINRemoteWeakProxy.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRequestRetryStrategy.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRequestRetryStrategy.h deleted file mode 120000 index 100742a..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINRequestRetryStrategy.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINRequestRetryStrategy.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINResume.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINResume.h deleted file mode 120000 index bd3360e..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINResume.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINResume.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINSpeedRecorder.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINSpeedRecorder.h deleted file mode 120000 index 0824485..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINSpeedRecorder.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/PINSpeedRecorder.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINURLSessionManager.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINURLSessionManager.h deleted file mode 120000 index 7c7cfab..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINURLSessionManager.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINURLSessionManager.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINWebPAnimatedImage.h b/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINWebPAnimatedImage.h deleted file mode 120000 index 1550d63..0000000 --- a/BFRImageViewerDemo/Pods/Headers/Public/PINRemoteImage/PINWebPAnimatedImage.h +++ /dev/null @@ -1 +0,0 @@ -../../../PINRemoteImage/Source/Classes/include/PINWebPAnimatedImage.h \ No newline at end of file diff --git a/BFRImageViewerDemo/Pods/Manifest.lock b/BFRImageViewerDemo/Pods/Manifest.lock deleted file mode 100644 index 84e5d15..0000000 --- a/BFRImageViewerDemo/Pods/Manifest.lock +++ /dev/null @@ -1,22 +0,0 @@ -PODS: - - PINOperation (1.2.1) - - PINRemoteImage/Core (3.0.3): - - PINOperation - - PINRemoteImage/iOS (3.0.3): - - PINRemoteImage/Core - -DEPENDENCIES: - - PINRemoteImage/iOS (~> 3.0.0) - -SPEC REPOS: - trunk: - - PINOperation - - PINRemoteImage - -SPEC CHECKSUMS: - PINOperation: 00c935935f1e8cf0d1e2d6b542e75b88fc3e5e20 - PINRemoteImage: f1295b29f8c5e640e25335a1b2bd9d805171bd01 - -PODFILE CHECKSUM: 9a080f8a24bf4d7e3dd1b620f4fb743f1f4c8104 - -COCOAPODS: 1.10.1 diff --git a/BFRImageViewerDemo/Pods/PINOperation/LICENSE.txt b/BFRImageViewerDemo/Pods/PINOperation/LICENSE.txt deleted file mode 100644 index d0381d6..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/LICENSE.txt +++ /dev/null @@ -1,176 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/BFRImageViewerDemo/Pods/PINOperation/README.md b/BFRImageViewerDemo/Pods/PINOperation/README.md deleted file mode 100644 index c7ac84e..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# PINOperation - -[](http://cocoadocs.org/docsets/PINOperation/) -[](https://github.com/Carthage/Carthage) -[](https://github.com/pinterest/PINOperation/actions?query=workflow%3ACI+branch%3Amaster) - -## Fast, concurrency-limited task queue for iOS and macOS. - -## Installation - -### Manually - -[Download the latest tag](https://github.com/pinterest/PINOperation/tags) and drag the `PINOperation` folder into your Xcode project. - -Install the docs by double clicking the `.docset` file under `docs/`, or view them online at [cocoadocs.org](http://cocoadocs.org/docsets/PINOperation/) - -### Git Submodule - - git submodule add https://github.com/pinterest/PINOperation.git - git submodule update --init - -### CocoaPods - -Add [PINOperation](http://cocoapods.org/?q=name%3APINOperation) to your `Podfile` and run `pod install`. - -### Carthage - -Add the following line to your `Cartfile` and run `carthage update --platform ios`. Then follow [this instruction of Carthage](https://github.com/carthage/carthage#adding-frameworks-to-unit-tests-or-a-framework) to embed the framework. - -```github "pinterest/PINOperation"``` - -## Requirements - -__PINOperation__ requires iOS 8.0, tvOS 9.0, macOS 10.8 or watchOS 2.0 and greater. - -## Contact - -[Garrett Moon](mailto:garrett@pinterest.com) - -## License - -Copyright 2013 Tumblr, Inc. -Copyright 2015 Pinterest, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. [See the License](LICENSE.txt) for the specific language governing permissions and limitations under the License. diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperation.h b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperation.h deleted file mode 100644 index 68b074d..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperation.h +++ /dev/null @@ -1,12 +0,0 @@ -// -// PINOperation.h -// PINOperation -// -// Created by Adlai Holler on 1/10/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINOperationMacros.h" -#import "PINOperationTypes.h" -#import "PINOperationQueue.h" -#import "PINOperationGroup.h" diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.h b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.h deleted file mode 100644 index 0ae7dba..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// PINOperationGroup.h -// PINQueue -// -// Created by Garrett Moon on 10/8/16. -// Copyright © 2016 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import "PINOperationTypes.h" -#import "PINOperationMacros.h" - -@class PINOperationQueue; - -NS_ASSUME_NONNULL_BEGIN - -@protocol PINGroupOperationReference; - -PINOP_SUBCLASSING_RESTRICTED -@interface PINOperationGroup : NSObject - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)asyncOperationGroupWithQueue:(PINOperationQueue *)operationQueue; - -- (nullable id <PINGroupOperationReference>)addOperation:(dispatch_block_t)operation; -- (nullable id <PINGroupOperationReference>)addOperation:(dispatch_block_t)operation withPriority:(PINOperationQueuePriority)priority; -- (void)start; -- (void)cancel; -- (void)setCompletion:(dispatch_block_t)completion; -- (void)waitUntilComplete; - -@end - -@protocol PINGroupOperationReference <NSObject> - -@end - -NS_ASSUME_NONNULL_END diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.m b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.m deleted file mode 100644 index ddd2ed0..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationGroup.m +++ /dev/null @@ -1,187 +0,0 @@ -// -// PINOperationGroup.m -// PINQueue -// -// Created by Garrett Moon on 10/8/16. -// Copyright © 2016 Pinterest. All rights reserved. -// - -#import "PINOperationGroup.h" -#import "PINOperation.h" -#import <pthread.h> - -@interface NSNumber (PINGroupOperationQueue) <PINGroupOperationReference> -@end - -@interface PINOperationGroup () -{ - pthread_mutex_t _lock; - - PINOperationQueue *_operationQueue; - NSMutableArray <dispatch_block_t> *_operations; - NSMutableArray <NSNumber *> *_operationPriorities; - NSMutableArray <id <PINGroupOperationReference>> *_operationReferences; - NSMapTable <id <PINGroupOperationReference>, id <PINOperationReference>> *_groupToOperationReferences; - NSUInteger _operationReferenceCount; - - dispatch_group_t _group; - - dispatch_block_t _completion; - - BOOL _started; - BOOL _canceled; -} - -- (instancetype)initWithOperationQueue:(PINOperationQueue *)operationQueue NS_DESIGNATED_INITIALIZER; - -@end - -@implementation PINOperationGroup - -- (instancetype)initWithOperationQueue:(PINOperationQueue *)operationQueue -{ - if (self = [super init]) { - pthread_mutex_init(&_lock, NULL); - - _operationQueue = operationQueue; - - _operations = [[NSMutableArray alloc] init]; - _operationReferences = [[NSMutableArray alloc] init]; - _operationPriorities = [[NSMutableArray alloc] init]; - - _groupToOperationReferences = [NSMapTable weakToStrongObjectsMapTable]; - _group = dispatch_group_create(); - } - return self; -} - -- (void)dealloc -{ - pthread_mutex_destroy(&_lock); -} - -+ (instancetype)asyncOperationGroupWithQueue:(PINOperationQueue *)operationQueue -{ - return [[self alloc] initWithOperationQueue:operationQueue]; -} - -- (id <PINGroupOperationReference>)locked_nextOperationReference -{ - id <PINGroupOperationReference> reference = [NSNumber numberWithUnsignedInteger:++_operationReferenceCount]; - return reference; -} - -- (void)start -{ - [self lock]; - NSAssert(_canceled == NO, @"Operation group canceled."); - if (_started == NO && _canceled == NO) { - for (NSUInteger idx = 0; idx < _operations.count; idx++) { - dispatch_group_enter(_group); - dispatch_block_t originalOperation = _operations[idx]; - dispatch_block_t groupBlock = ^{ - originalOperation(); - dispatch_group_leave(self->_group); - }; - - id <PINOperationReference> operationReference = [_operationQueue scheduleOperation:groupBlock withPriority:[_operationPriorities[idx] unsignedIntegerValue]]; - [_groupToOperationReferences setObject:operationReference forKey:_operationReferences[idx]]; - } - - if (_completion) { - dispatch_queue_t completionQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_group_notify(_group, completionQueue, ^{ - [self runCompletionIfNeeded]; - }); - } - - _operations = nil; - _operationPriorities = nil; - _operationReferences = nil; - } - [self unlock]; -} - -- (void)cancel -{ - [self lock]; - _canceled = YES; - - for (id <PINOperationReference>operationReference in [_groupToOperationReferences objectEnumerator]) { - if ([_operationQueue cancelOperation:operationReference]) { - dispatch_group_leave(_group); - } - } - - //TODO just nil out instead? Does it make sense to support adding operations after cancelation? - [_groupToOperationReferences removeAllObjects]; - [_operations removeAllObjects]; - [_operationPriorities removeAllObjects]; - [_operationReferences removeAllObjects]; - - _completion = nil; - [self unlock]; -} - -- (id <PINGroupOperationReference>)addOperation:(dispatch_block_t)operation -{ - return [self addOperation:operation withPriority:PINOperationQueuePriorityDefault]; -} - -- (id <PINGroupOperationReference>)addOperation:(dispatch_block_t)operation withPriority:(PINOperationQueuePriority)priority -{ - [self lock]; - id <PINGroupOperationReference> reference = nil; - NSAssert(_started == NO && _canceled == NO, @"Operation group already started or canceled."); - if (_started == NO && _canceled == NO) { - reference = [self locked_nextOperationReference]; - [_operations addObject:operation]; - [_operationPriorities addObject:@(priority)]; - [_operationReferences addObject:reference]; - } - [self unlock]; - - return reference; -} - -- (void)setCompletion:(dispatch_block_t)completion -{ - [self lock]; - NSAssert(_started == NO && _canceled == NO, @"Operation group already started or canceled."); - if (_started == NO && _canceled == NO) { - _completion = completion; - } - [self unlock]; -} - -- (void)waitUntilComplete -{ - [self start]; - dispatch_group_wait(_group, DISPATCH_TIME_FOREVER); - [self runCompletionIfNeeded]; -} - -- (void)runCompletionIfNeeded -{ - dispatch_block_t completion; - [self lock]; - completion = _completion; - _completion = nil; - [self unlock]; - - if (completion) { - completion(); - } -} - -- (void)lock -{ - pthread_mutex_lock(&_lock); -} - -- (void)unlock -{ - pthread_mutex_unlock(&_lock); -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationMacros.h b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationMacros.h deleted file mode 100644 index 5be3a21..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationMacros.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// PINOperationMacros.h -// PINOperation -// -// Created by Adlai Holler on 1/10/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#ifndef PINOP_SUBCLASSING_RESTRICTED -#if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) -#define PINOP_SUBCLASSING_RESTRICTED __attribute__((objc_subclassing_restricted)) -#else -#define PINOP_SUBCLASSING_RESTRICTED -#endif // #if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) -#endif // #ifndef PINOP_SUBCLASSING_RESTRICTED diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.h b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.h deleted file mode 100644 index 07eacbe..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.h +++ /dev/null @@ -1,141 +0,0 @@ -// -// PINOperationQueue.h -// Pods -// -// Created by Garrett Moon on 8/23/16. -// -// - -#import <Foundation/Foundation.h> -#import "PINOperationTypes.h" -#import "PINOperationMacros.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef void(^PINOperationBlock)(id _Nullable data); -typedef _Nullable id(^PINOperationDataCoalescingBlock)(id _Nullable existingData, id _Nullable newData); - -@protocol PINOperationReference; - -PINOP_SUBCLASSING_RESTRICTED -@interface PINOperationQueue : NSObject - -- (instancetype)init NS_UNAVAILABLE; - -/** - * Initializes and returns a newly allocated operation queue with the specified number of maximum concurrent operations. - * - * @param maxConcurrentOperations The maximum number of queued operations that can execute at the same time. - * - */ -- (instancetype)initWithMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations; - -/** - * Initializes and returns a newly allocated operation queue with the specified number of maximum concurrent operations and the concurrent queue they will be scheduled on. - * - * @param maxConcurrentOperations The maximum number of queued operations that can execute at the same time. - * @param concurrentQueue The operation queue to schedule concurrent operations - * - */ -- (instancetype)initWithMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations concurrentQueue:(dispatch_queue_t)concurrentQueue NS_DESIGNATED_INITIALIZER; - -/** - * Returns the shared instance of the PINOperationQueue class. - */ -+ (instancetype)sharedOperationQueue; - -/** - * Adds the specified operation object to the receiver. - * - * @param operation The operation object to be added to the queue. - * - */ -- (id <PINOperationReference>)scheduleOperation:(dispatch_block_t)operation; - -/** - * Adds the specified operation object to the receiver. - * - * @param operation The operation object to be added to the queue. - * @param priority The execution priority of the operation in an operation queue. - */ -- (id <PINOperationReference>)scheduleOperation:(dispatch_block_t)operation withPriority:(PINOperationQueuePriority)priority; - -/** - * Adds the specified operation object to the receiver. - * - * @param operation The operation object to be added to the queue. - * @param priority The execution priority of the operation in an operation queue. - * @param identifier A string that identifies the operations that can be coalesced. - * @param coalescingData The optional data consumed by this operation that needs to be updated/coalesced with data of a new operation when coalescing the two operations happens. - * @param dataCoalescingBlock The optional block called to update/coalesce the data of this operation with data of a new operation when coalescing the two operations happens. - * @param completion The block to execute after the operation finished. - */ -- (id <PINOperationReference>)scheduleOperation:(PINOperationBlock)operation - withPriority:(PINOperationQueuePriority)priority - identifier:(nullable NSString *)identifier - coalescingData:(nullable id)coalescingData - dataCoalescingBlock:(nullable PINOperationDataCoalescingBlock)dataCoalescingBlock - completion:(nullable dispatch_block_t)completion; - -/** - * The maximum number of queued operations that can execute at the same time. - * - * @discussion The value in this property affects only the operations that the current queue has executing at the same time. Other operation queues can also execute their maximum number of operations in parallel. - * Reducing the number of concurrent operations does not affect any operations that are currently executing. - * - * Setting this value to 1 the operations will not be processed by priority as the operations will processed in a FIFO order to prevent deadlocks if operations depend on certain other operations to run in order. - * - */ -@property (assign) NSUInteger maxConcurrentOperations; - -/** - * Marks the operation as cancelled - */ -- (BOOL)cancelOperation:(id <PINOperationReference>)operationReference; - -/** - * Cancels all queued operations - */ -- (void)cancelAllOperations; - -/** - * Blocks the current thread until all of the receiver’s queued and executing operations finish executing. - * - * @discussion When called, this method blocks the current thread and waits for the receiver’s current and queued - * operations to finish executing. While the current thread is blocked, the receiver continues to launch already - * queued operations and monitor those that are executing. - * - * @warning This should never be called from within an operation submitted to the PINOperationQueue as this will result - * in a deadlock. - */ -- (void)waitUntilAllOperationsAreFinished; - -/** - * Sets the priority for a operation via it's reference - * - * @param priority The new priority for the operation - * @param reference The reference for the operation - * - */ -- (void)setOperationPriority:(PINOperationQueuePriority)priority withReference:(id <PINOperationReference>)reference; - -#pragma mark - Deprecated - -- (id <PINOperationReference>)addOperation:(dispatch_block_t)operation __deprecated_msg("Use scheduleOperation: instead."); - -- (id <PINOperationReference>)addOperation:(dispatch_block_t)operation withPriority:(PINOperationQueuePriority)priority __deprecated_msg("Use scheduleOperation:withPriority: instead."); - -- (id <PINOperationReference>)addOperation:(PINOperationBlock)operation - withPriority:(PINOperationQueuePriority)priority - identifier:(nullable NSString *)identifier - coalescingData:(nullable id)coalescingData - dataCoalescingBlock:(nullable PINOperationDataCoalescingBlock)dataCoalescingBlock - completion:(nullable dispatch_block_t)completion __deprecated_msg("Use scheduleOperation:withPriority:identifier:coalescingData:dataCoalescingBlock:completion: instead."); - -@end - -@protocol PINOperationReference <NSObject> - -@end - -NS_ASSUME_NONNULL_END diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.m b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.m deleted file mode 100644 index 5d0a38f..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationQueue.m +++ /dev/null @@ -1,471 +0,0 @@ -// -// PINOperationQueue.m -// Pods -// -// Created by Garrett Moon on 8/23/16. -// -// - -#import "PINOperationQueue.h" -#import <pthread.h> - -@class PINOperation; - -@interface NSNumber (PINOperationQueue) <PINOperationReference> - -@end - -@interface PINOperationQueue () { - pthread_mutex_t _lock; - //increments with every operation to allow cancelation - NSUInteger _operationReferenceCount; - NSUInteger _maxConcurrentOperations; - - dispatch_group_t _group; - - dispatch_queue_t _serialQueue; - BOOL _serialQueueBusy; - - dispatch_semaphore_t _concurrentSemaphore; - dispatch_queue_t _concurrentQueue; - dispatch_queue_t _semaphoreQueue; - - NSMutableOrderedSet<PINOperation *> *_queuedOperations; - NSMutableOrderedSet<PINOperation *> *_lowPriorityOperations; - NSMutableOrderedSet<PINOperation *> *_defaultPriorityOperations; - NSMutableOrderedSet<PINOperation *> *_highPriorityOperations; - - NSMapTable<id<PINOperationReference>, PINOperation *> *_referenceToOperations; - NSMapTable<NSString *, PINOperation *> *_identifierToOperations; -} - -@end - -@interface PINOperation : NSObject - -@property (nonatomic, strong) PINOperationBlock block; -@property (nonatomic, strong) id <PINOperationReference> reference; -@property (nonatomic, assign) PINOperationQueuePriority priority; -@property (nonatomic, strong) NSMutableArray<dispatch_block_t> *completions; -@property (nonatomic, strong) NSString *identifier; -@property (nonatomic, strong) id data; - -+ (instancetype)operationWithBlock:(PINOperationBlock)block reference:(id <PINOperationReference>)reference priority:(PINOperationQueuePriority)priority identifier:(nullable NSString *)identifier data:(nullable id)data completion:(nullable dispatch_block_t)completion; - -- (void)addCompletion:(nullable dispatch_block_t)completion; - -@end - -@implementation PINOperation - -+ (instancetype)operationWithBlock:(PINOperationBlock)block reference:(id<PINOperationReference>)reference priority:(PINOperationQueuePriority)priority identifier:(NSString *)identifier data:(id)data completion:(dispatch_block_t)completion -{ - PINOperation *operation = [[self alloc] init]; - operation.block = block; - operation.reference = reference; - operation.priority = priority; - operation.identifier = identifier; - operation.data = data; - [operation addCompletion:completion]; - - return operation; -} - -- (void)addCompletion:(dispatch_block_t)completion -{ - if (completion == nil) { - return; - } - if (_completions == nil) { - _completions = [NSMutableArray array]; - } - [_completions addObject:completion]; -} - -@end - -@implementation PINOperationQueue - -- (instancetype)initWithMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations -{ - return [self initWithMaxConcurrentOperations:maxConcurrentOperations concurrentQueue:dispatch_queue_create("PINOperationQueue Concurrent Queue", DISPATCH_QUEUE_CONCURRENT)]; -} - -- (instancetype)initWithMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations concurrentQueue:(dispatch_queue_t)concurrentQueue -{ - if (self = [super init]) { - NSAssert(maxConcurrentOperations > 0, @"Max concurrent operations must be greater than 0."); - _maxConcurrentOperations = maxConcurrentOperations; - _operationReferenceCount = 0; - - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - //mutex must be recursive to allow scheduling of operations from within operations - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&_lock, &attr); - - _group = dispatch_group_create(); - - _serialQueue = dispatch_queue_create("PINOperationQueue Serial Queue", DISPATCH_QUEUE_SERIAL); - - _concurrentQueue = concurrentQueue; - - //Create a queue with max - 1 because this plus the serial queue add up to max. - _concurrentSemaphore = dispatch_semaphore_create(_maxConcurrentOperations - 1); - _semaphoreQueue = dispatch_queue_create("PINOperationQueue Serial Semaphore Queue", DISPATCH_QUEUE_SERIAL); - - _queuedOperations = [[NSMutableOrderedSet alloc] init]; - _lowPriorityOperations = [[NSMutableOrderedSet alloc] init]; - _defaultPriorityOperations = [[NSMutableOrderedSet alloc] init]; - _highPriorityOperations = [[NSMutableOrderedSet alloc] init]; - - _referenceToOperations = [NSMapTable weakToWeakObjectsMapTable]; - _identifierToOperations = [NSMapTable weakToWeakObjectsMapTable]; - } - return self; -} - -- (void)dealloc -{ - pthread_mutex_destroy(&_lock); -} - -+ (instancetype)sharedOperationQueue -{ - static PINOperationQueue *sharedOperationQueue = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedOperationQueue = [[PINOperationQueue alloc] initWithMaxConcurrentOperations:MAX([[NSProcessInfo processInfo] activeProcessorCount], 2)]; - }); - return sharedOperationQueue; -} - -- (id <PINOperationReference>)nextOperationReference -{ - [self lock]; - id <PINOperationReference> reference = [NSNumber numberWithUnsignedInteger:++_operationReferenceCount]; - [self unlock]; - return reference; -} - -// Deprecated -- (id <PINOperationReference>)addOperation:(dispatch_block_t)block -{ - return [self scheduleOperation:block]; -} - -- (id <PINOperationReference>)scheduleOperation:(dispatch_block_t)block -{ - return [self scheduleOperation:block withPriority:PINOperationQueuePriorityDefault]; -} - -// Deprecated -- (id <PINOperationReference>)addOperation:(dispatch_block_t)block withPriority:(PINOperationQueuePriority)priority -{ - return [self scheduleOperation:block withPriority:priority]; -} - -- (id <PINOperationReference>)scheduleOperation:(dispatch_block_t)block withPriority:(PINOperationQueuePriority)priority -{ - PINOperation *operation = [PINOperation operationWithBlock:^(id data) { block(); } - reference:[self nextOperationReference] - priority:priority - identifier:nil - data:nil - completion:nil]; - [self lock]; - [self locked_addOperation:operation]; - [self unlock]; - - [self scheduleNextOperations:NO]; - - return operation.reference; -} - -// Deprecated -- (id<PINOperationReference>)addOperation:(PINOperationBlock)block - withPriority:(PINOperationQueuePriority)priority - identifier:(NSString *)identifier - coalescingData:(id)coalescingData - dataCoalescingBlock:(PINOperationDataCoalescingBlock)dataCoalescingBlock - completion:(dispatch_block_t)completion -{ - return [self scheduleOperation:block - withPriority:priority - identifier:identifier - coalescingData:coalescingData - dataCoalescingBlock:dataCoalescingBlock - completion:completion]; -} - -- (id<PINOperationReference>)scheduleOperation:(PINOperationBlock)block - withPriority:(PINOperationQueuePriority)priority - identifier:(NSString *)identifier - coalescingData:(id)coalescingData - dataCoalescingBlock:(PINOperationDataCoalescingBlock)dataCoalescingBlock - completion:(dispatch_block_t)completion -{ - id<PINOperationReference> reference = nil; - BOOL isNewOperation = NO; - - [self lock]; - PINOperation *operation = nil; - if (identifier != nil && (operation = [_identifierToOperations objectForKey:identifier]) != nil) { - // There is an exisiting operation with the provided identifier, let's coalesce these operations - if (dataCoalescingBlock != nil) { - operation.data = dataCoalescingBlock(operation.data, coalescingData); - } - - [operation addCompletion:completion]; - } else { - isNewOperation = YES; - operation = [PINOperation operationWithBlock:block - reference:[self nextOperationReference] - priority:priority - identifier:identifier - data:coalescingData - completion:completion]; - [self locked_addOperation:operation]; - } - reference = operation.reference; - [self unlock]; - - if (isNewOperation) { - [self scheduleNextOperations:NO]; - } - - return reference; -} - -- (void)locked_addOperation:(PINOperation *)operation -{ - NSMutableOrderedSet *queue = [self operationQueueWithPriority:operation.priority]; - - dispatch_group_enter(_group); - [queue addObject:operation]; - [_queuedOperations addObject:operation]; - [_referenceToOperations setObject:operation forKey:operation.reference]; - if (operation.identifier != nil) { - [_identifierToOperations setObject:operation forKey:operation.identifier]; - } -} - -- (void)cancelAllOperations -{ - [self lock]; - for (PINOperation *operation in [[_referenceToOperations copy] objectEnumerator]) { - [self locked_cancelOperation:operation.reference]; - } - [self unlock]; -} - - -- (BOOL)cancelOperation:(id <PINOperationReference>)operationReference -{ - [self lock]; - BOOL success = [self locked_cancelOperation:operationReference]; - [self unlock]; - return success; -} - -- (NSUInteger)maxConcurrentOperations -{ - [self lock]; - NSUInteger maxConcurrentOperations = _maxConcurrentOperations; - [self unlock]; - return maxConcurrentOperations; -} - -- (void)setMaxConcurrentOperations:(NSUInteger)maxConcurrentOperations -{ - NSAssert(maxConcurrentOperations > 0, @"Max concurrent operations must be greater than 0."); - [self lock]; - __block NSInteger difference = maxConcurrentOperations - _maxConcurrentOperations; - _maxConcurrentOperations = maxConcurrentOperations; - [self unlock]; - - if (difference == 0) { - return; - } - - dispatch_async(_semaphoreQueue, ^{ - while (difference != 0) { - if (difference > 0) { - dispatch_semaphore_signal(self->_concurrentSemaphore); - difference--; - } else { - dispatch_semaphore_wait(self->_concurrentSemaphore, DISPATCH_TIME_FOREVER); - difference++; - } - } - }); -} - -#pragma mark - private methods - -- (BOOL)locked_cancelOperation:(id <PINOperationReference>)operationReference -{ - PINOperation *operation = [_referenceToOperations objectForKey:operationReference]; - BOOL success = [self locked_removeOperation:operation]; - if (success) { - dispatch_group_leave(_group); - } - return success; -} - -- (void)setOperationPriority:(PINOperationQueuePriority)priority withReference:(id <PINOperationReference>)operationReference -{ - [self lock]; - PINOperation *operation = [_referenceToOperations objectForKey:operationReference]; - if (operation && operation.priority != priority) { - NSMutableOrderedSet *oldQueue = [self operationQueueWithPriority:operation.priority]; - [oldQueue removeObject:operation]; - - operation.priority = priority; - - NSMutableOrderedSet *queue = [self operationQueueWithPriority:priority]; - [queue addObject:operation]; - } - [self unlock]; -} - -/** - Schedule next operations schedules the next operation by queue order onto the serial queue if - it's available and one operation by priority order onto the concurrent queue. - */ -- (void)scheduleNextOperations:(BOOL)onlyCheckSerial -{ - [self lock]; - - //get next available operation in order, ignoring priority and run it on the serial queue - if (_serialQueueBusy == NO) { - PINOperation *operation = [self locked_nextOperationByQueue]; - if (operation) { - _serialQueueBusy = YES; - dispatch_async(_serialQueue, ^{ - operation.block(operation.data); - for (dispatch_block_t completion in operation.completions) { - completion(); - } - dispatch_group_leave(self->_group); - - [self lock]; - self->_serialQueueBusy = NO; - [self unlock]; - - //see if there are any other operations - [self scheduleNextOperations:YES]; - }); - } - } - - NSInteger maxConcurrentOperations = _maxConcurrentOperations; - - [self unlock]; - - if (onlyCheckSerial) { - return; - } - - //if only one concurrent operation is set, let's just use the serial queue for executing it - if (maxConcurrentOperations < 2) { - return; - } - - dispatch_async(_semaphoreQueue, ^{ - dispatch_semaphore_wait(self->_concurrentSemaphore, DISPATCH_TIME_FOREVER); - [self lock]; - PINOperation *operation = [self locked_nextOperationByPriority]; - [self unlock]; - - if (operation) { - dispatch_async(self->_concurrentQueue, ^{ - operation.block(operation.data); - for (dispatch_block_t completion in operation.completions) { - completion(); - } - dispatch_group_leave(self->_group); - dispatch_semaphore_signal(self->_concurrentSemaphore); - }); - } else { - dispatch_semaphore_signal(self->_concurrentSemaphore); - } - }); -} - -- (NSMutableOrderedSet *)operationQueueWithPriority:(PINOperationQueuePriority)priority -{ - switch (priority) { - case PINOperationQueuePriorityLow: - return _lowPriorityOperations; - - case PINOperationQueuePriorityDefault: - return _defaultPriorityOperations; - - case PINOperationQueuePriorityHigh: - return _highPriorityOperations; - - default: - NSAssert(NO, @"Invalid priority set"); - return _defaultPriorityOperations; - } -} - -//Call with lock held -- (PINOperation *)locked_nextOperationByPriority -{ - PINOperation *operation = [_highPriorityOperations firstObject]; - if (operation == nil) { - operation = [_defaultPriorityOperations firstObject]; - } - if (operation == nil) { - operation = [_lowPriorityOperations firstObject]; - } - if (operation) { - [self locked_removeOperation:operation]; - } - return operation; -} - -//Call with lock held -- (PINOperation *)locked_nextOperationByQueue -{ - PINOperation *operation = [_queuedOperations firstObject]; - [self locked_removeOperation:operation]; - return operation; -} - -- (void)waitUntilAllOperationsAreFinished -{ - [self scheduleNextOperations:NO]; - dispatch_group_wait(_group, DISPATCH_TIME_FOREVER); -} - -//Call with lock held -- (BOOL)locked_removeOperation:(PINOperation *)operation -{ - if (operation) { - NSMutableOrderedSet *priorityQueue = [self operationQueueWithPriority:operation.priority]; - if ([priorityQueue containsObject:operation]) { - [priorityQueue removeObject:operation]; - [_queuedOperations removeObject:operation]; - if (operation.identifier) { - [_identifierToOperations removeObjectForKey:operation.identifier]; - } - return YES; - } - } - return NO; -} - -- (void)lock -{ - pthread_mutex_lock(&_lock); -} - -- (void)unlock -{ - pthread_mutex_unlock(&_lock); -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationTypes.h b/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationTypes.h deleted file mode 100644 index be7293d..0000000 --- a/BFRImageViewerDemo/Pods/PINOperation/Source/PINOperationTypes.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// PINOperationTypes.h -// PINOperation -// -// Created by Adlai Holler on 1/10/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -typedef NS_ENUM(NSUInteger, PINOperationQueuePriority) { - PINOperationQueuePriorityLow, - PINOperationQueuePriorityDefault, - PINOperationQueuePriorityHigh, -}; diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/LICENSE b/BFRImageViewerDemo/Pods/PINRemoteImage/LICENSE deleted file mode 100644 index d0381d6..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/README.md b/BFRImageViewerDemo/Pods/PINRemoteImage/README.md deleted file mode 100644 index d192821..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/README.md +++ /dev/null @@ -1,252 +0,0 @@ -# PINRemoteImage - -## Fast, non-deadlocking parallel image downloader and cache for iOS - -[](https://cocoapods.org/pods/PINRemoteImage) -[](https://github.com/Carthage/Carthage) -[](https://github.com/pinterest/PINRemoteImage/actions?query=workflow%3ACI+branch%3Amaster) - -[PINRemoteImageManager](Source/Classes/PINRemoteImageManager.h) is an image downloading, processing and caching manager. It uses the concept of download and processing tasks to ensure that even if multiple calls to download or process an image are made, it only occurs one time (unless an item is no longer in the cache). PINRemoteImageManager is backed by **GCD** and safe to **access** from **multiple threads** simultaneously. It ensures that images are decoded off the main thread so that animation performance isn't affected. None of its exposed methods allow for synchronous access. However, it is optimized to call completions on the calling thread if an item is in its memory cache. - -PINRemoteImage supports downloading many types of files. It, of course, **supports** both **PNGs** and **JPGs**. It also supports decoding **WebP** images if Google's library is available. It even supports **GIFs** and **Animated WebP** via PINAnimatedImageView. - -PINRemoteImage also has two methods to improve the experience of downloading images on slow network connections. The first is support for **progressive JPGs**. This isn't any old support for progressive JPGs though: PINRemoteImage adds an attractive blur to progressive scans before returning them. - - - -[PINRemoteImageCategoryManager](Pod/Classes/PINRemoteImageCategoryManager.h) defines a protocol which UIView subclasses can implement and provide easy access to -PINRemoteImageManager's methods. There are **built-in categories** on **UIImageView**, **PINAnimatedImageView** and **UIButton**, and it's very easy to implement a new category. See [UIImageView+PINRemoteImage](/Pod/Classes/Image Categories/UIImageView+PINRemoteImage.h) of the existing categories for reference. - - -### Download an image and set it on an image view: - -**Objective-C** -```objc -UIImageView *imageView = [[UIImageView alloc] init]; -[imageView pin_setImageFromURL:[NSURL URLWithString:@"http://pinterest.com/kitten.jpg"]]; -``` - -**Swift** -```swift -let imageView = UIImageView() -imageView.pin_setImage(from: URL(string: "https://pinterest.com/kitten.jpg")!) -``` - -### Download a progressive jpeg and get attractive blurred updates: - -**Objective-C** -```objc -UIImageView *imageView = [[UIImageView alloc] init]; -[imageView setPin_updateWithProgress:YES]; -[imageView pin_setImageFromURL:[NSURL URLWithString:@"http://pinterest.com/progressiveKitten.jpg"]]; -``` - -**Swift** -```swift -let imageView = UIImageView() -imageView.pin_updateWithProgress = true -imageView.pin_setImage(from: URL(string: "https://pinterest.com/progressiveKitten.jpg")!) -``` - -### Download a WebP file - -**Objective-C** -```objc -UIImageView *imageView = [[UIImageView alloc] init]; -[imageView pin_setImageFromURL:[NSURL URLWithString:@"http://pinterest.com/googleKitten.webp"]]; -``` - -**Swift** -```swift -let imageView = UIImageView() -imageView.pin_setImage(from: URL(string: "https://pinterest.com/googleKitten.webp")!) -``` - -### Download a GIF and display with PINAnimatedImageView - -**Objective-C** -```objc -PINAnimatedImageView *animatedImageView = [[PINAnimatedImageView alloc] init]; -[animatedImageView pin_setImageFromURL:[NSURL URLWithString:@"http://pinterest.com/flyingKitten.gif"]]; -``` - -**Swift** -```swift -let animatedImageView = PINAnimatedImageView() -animatedImageView.pin_setImage(from: URL(string: "http://pinterest.com/flyingKitten.gif")!) -``` - -### Download and process an image - -**Objective-C** -```objc -UIImageView *imageView = [[UIImageView alloc] init]; -[self.imageView pin_setImageFromURL:[NSURL URLWithString:@"https://i.pinimg.com/736x/5b/c6/c5/5bc6c5387ff6f104fd642f2b375efba3.jpg"] processorKey:@"rounded" processor:^UIImage *(PINRemoteImageManagerResult *result, NSUInteger *cost) - { - CGSize targetSize = CGSizeMake(200, 300); - CGRect imageRect = CGRectMake(0, 0, targetSize.width, targetSize.height); - UIGraphicsBeginImageContext(imageRect.size); - UIBezierPath *bezierPath = [UIBezierPath bezierPathWithRoundedRect:imageRect cornerRadius:7.0]; - [bezierPath addClip]; - - CGFloat sizeMultiplier = MAX(targetSize.width / result.image.size.width, targetSize.height / result.image.size.height); - - CGRect drawRect = CGRectMake(0, 0, result.image.size.width * sizeMultiplier, result.image.size.height * sizeMultiplier); - if (CGRectGetMaxX(drawRect) > CGRectGetMaxX(imageRect)) { - drawRect.origin.x -= (CGRectGetMaxX(drawRect) - CGRectGetMaxX(imageRect)) / 2.0; - } - if (CGRectGetMaxY(drawRect) > CGRectGetMaxY(imageRect)) { - drawRect.origin.y -= (CGRectGetMaxY(drawRect) - CGRectGetMaxY(imageRect)) / 2.0; - } - - [result.image drawInRect:drawRect]; - - UIImage *processedImage = UIGraphicsGetImageFromCurrentImageContext(); - UIGraphicsEndImageContext(); - return processedImage; - }]; -``` - -**Swift** -```swift -let imageView = FLAnimatedImageView() -imageView.pin_setImage(from: URL(string: "https://i.pinimg.com/736x/5b/c6/c5/5bc6c5387ff6f104fd642f2b375efba3.jpg")!, processorKey: "rounded") { (result, unsafePointer) -> UIImage? in - - guard let image = result.image else { return nil } - - let radius : CGFloat = 7.0 - let targetSize = CGSize(width: 200, height: 300) - let imageRect = CGRect(x: 0, y: 0, width: targetSize.width, height: targetSize.height) - - UIGraphicsBeginImageContext(imageRect.size) - - let bezierPath = UIBezierPath(roundedRect: imageRect, cornerRadius: radius) - bezierPath.addClip() - - let widthMultiplier : CGFloat = targetSize.width / image.size.width - let heightMultiplier : CGFloat = targetSize.height / image.size.height - let sizeMultiplier = max(widthMultiplier, heightMultiplier) - - var drawRect = CGRect(x: 0, y: 0, width: image.size.width * sizeMultiplier, height: image.size.height * sizeMultiplier) - if (drawRect.maxX > imageRect.maxX) { - drawRect.origin.x -= (drawRect.maxX - imageRect.maxX) / 2 - } - if (drawRect.maxY > imageRect.maxY) { - drawRect.origin.y -= (drawRect.maxY - imageRect.maxY) / 2 - } - - image.draw(in: drawRect) - - UIColor.red.setStroke() - bezierPath.lineWidth = 5.0 - bezierPath.stroke() - - let ctx = UIGraphicsGetCurrentContext() - ctx?.setBlendMode(CGBlendMode.overlay) - ctx?.setAlpha(0.5) - - let logo = UIImage(named: "white-pinterest-logo") - ctx?.scaleBy(x: 1.0, y: -1.0) - ctx?.translateBy(x: 0.0, y: -drawRect.size.height) - - if let coreGraphicsImage = logo?.cgImage { - ctx?.draw(coreGraphicsImage, in: CGRect(x: 90, y: 10, width: logo!.size.width, height: logo!.size.height)) - } - - let processedImage = UIGraphicsGetImageFromCurrentImageContext() - UIGraphicsEndImageContext() - - return processedImage - -} -``` - -### Handle Authentication - -**Objective-C** -```objc -[[PINRemoteImageManager sharedImageManager] setAuthenticationChallenge:^(NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, PINRemoteImageManagerAuthenticationChallengeCompletionHandler aCompletion) { -aCompletion(NSURLSessionAuthChallengePerformDefaultHandling, nil)]; -``` - -**Swift** -```swift -PINRemoteImageManager.shared().setAuthenticationChallenge { (task, challenge, completion) in - completion?(.performDefaultHandling, nil) -} -``` - -### Support for high resolution images -Currently there are two ways PINRemoteImage is supporting high resolution images: -1. If the URL contains an `_2x.` or an `_3x.` postfix it will be automatically handled by PINRemoteImage and the resulting image will be returned at the right scale. -2. If it's not possible to provide an URL with an `_2x.` or `_3x.` postfix, you can also handle it with a completion handler: -```objc -NSURL *url = ...; -__weak UIImageView *weakImageView = self.imageView; -[self.imageView pin_setImageFromURL:url completion:^(PINRemoteImageManagerResult * _Nonnull result) { - CGFloat scale = UIScreen.mainScreen.scale; - if (scale > 1.0) { - UIImage *image = result.image; - weakImageView.image = [UIImage imageWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; - } -}]; -``` - -### Set some limits -``` -// cache is an instance of PINCache as long as you haven't overridden defaultImageCache -PINCache *cache = (PINCache *)[[PINRemoteImageManager sharedImageManager] cache]; -// Max memory cost is based on number of pixels, we estimate the size of one hundred 600x600 images as our max memory image cache. -[[cache memoryCache] setCostLimit:600 * [[UIScreen mainScreen] scale] * 600 * [[UIScreen mainScreen] scale] * 100]; - -// ~50 MB -[[cache diskCache] setByteLimit:50 * 1024 * 1024]; -// 30 days -[[cache diskCache] setAgeLimit:60 * 60 * 24 * 30]; -``` - -## Installation - -### CocoaPods - -Add [PINRemoteImage](http://cocoapods.org/?q=name%3APINRemoteImage) to your `Podfile` and run `pod install`. - -If you'd like to use WebP images, add [PINRemoteImage/WebP](http://cocoapods.org/?q=name%3APINRemoteImage) to your `Podfile` and run `pod install`. - - -### Carthage - -Add `github "pinterest/PINRemoteImage"` to your Cartfile . See [Carthage's readme](https://github.com/Carthage/Carthage) for more information on integrating Carthage-built frameworks into your project. - -### Manually - -[Download the latest tag](https://github.com/Pinterest/PINRemoteImage/tags) and drag the `Pod/Classes` folder into your Xcode project. You must also manually link against [PINCache](https://github.com/pinterest/PINCache). - -Install the docs by double clicking the `.docset` file under `docs/`, or view them online at [cocoadocs.org](http://cocoadocs.org/docsets/PINRemoteImage/) - -### Git Submodule - -You can set up PINRemoteImage as a submodule of your repo instead of cloning and copying all the files into your repo. Add the submodule using the commands below and then follow the manual instructions above. - - git submodule add https://github.com/pinterest/PINRemoteImage.git - git submodule update --init - - - -## Requirements - -__PINRemoteImage__ requires iOS 7.0 or greater. - -## Contact - -[Garrett Moon](mailto:garrett@pinterest.com) -[@garrettmoon](https://twitter.com/garrettmoon) -[Pinterest](https://www.pinterest.com/garrettlunar/) - -## License - -Copyright 2015 Pinterest, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. [See the License](LICENSE.txt) for the specific language governing permissions and limitations under the License. diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImage.m deleted file mode 100644 index 9204b4e..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImage.m +++ /dev/null @@ -1,126 +0,0 @@ -// -// PINAnimatedImage.m -// PINRemoteImage -// -// Created by Garrett Moon on 9/17/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINAnimatedImage.h" - -NSErrorDomain const kPINAnimatedImageErrorDomain = @"kPINAnimatedImageErrorDomain"; - -//http://nullsleep.tumblr.com/post/16524517190/animated-gif-minimum-frame-delay-browser -const Float32 kPINAnimatedImageDefaultDuration = 0.1; - -@interface PINAnimatedImage () -{ - CFTimeInterval _totalDuration; -} -@end - -@implementation PINAnimatedImage - -+ (NSInteger)maximumFramesPerSecond -{ - static dispatch_once_t onceToken; - static NSInteger maximumFramesPerSecond = 60; - - dispatch_once(&onceToken, ^{ -#if PIN_TARGET_IOS - if (@available(iOS 10.3, tvOS 10.3, *)) { - maximumFramesPerSecond = 0; - for (UIScreen *screen in [UIScreen screens]) { - if ([screen maximumFramesPerSecond] > maximumFramesPerSecond) { - maximumFramesPerSecond = [screen maximumFramesPerSecond]; - } - } - } -#endif - }); - return maximumFramesPerSecond; -} - -- (instancetype)init -{ - if (self = [super init]) { - _totalDuration = -1; - } - return self; -} - -- (CFTimeInterval)durationAtIndex:(NSUInteger)index -{ - NSAssert(NO, @"Must be overridden by subclass"); - return 0; -} - -- (size_t)frameCount -{ - NSAssert(NO, @"Must be overridden by subclass"); - return 0; -} - - -- (CFTimeInterval)totalDuration -{ - if (_totalDuration == -1) { - _totalDuration = 0; - for (NSUInteger idx = 0; idx < self.frameCount; idx++) { - _totalDuration += [self durationAtIndex:idx]; - } - } - - return _totalDuration; -} - -- (NSUInteger)frameInterval -{ - return MAX(self.minimumFrameInterval * [PINAnimatedImage maximumFramesPerSecond], 1); -} - -//Credit to FLAnimatedImage ( https://github.com/Flipboard/FLAnimatedImage ) for display link interval calculations -- (NSTimeInterval)minimumFrameInterval -{ - static dispatch_once_t onceToken; - static NSTimeInterval kGreatestCommonDivisorPrecision; - dispatch_once(&onceToken, ^{ - kGreatestCommonDivisorPrecision = 2.0 / (1.0 / [PINAnimatedImage maximumFramesPerSecond]); - }); - - // Scales the frame delays by `kGreatestCommonDivisorPrecision` - // then converts it to an UInteger for in order to calculate the GCD. - NSUInteger scaledGCD = lrint([self durationAtIndex:0] * kGreatestCommonDivisorPrecision); - for (NSUInteger durationIdx = 1; durationIdx < self.frameCount; durationIdx++) { - CFTimeInterval duration = [self durationAtIndex:durationIdx]; - scaledGCD = gcd(lrint(duration * kGreatestCommonDivisorPrecision), scaledGCD); - } - - // Reverse to scale to get the value back into seconds. - return (scaledGCD / kGreatestCommonDivisorPrecision); -} - -// This likely isn't the most efficient but it's easy to reason about and we don't call it -// with super large numbers. -static NSUInteger gcd(NSUInteger a, NSUInteger b) -{ - // http://en.wikipedia.org/wiki/Greatest_common_divisor - NSCAssert(a > 0 && b > 0, @"A and B must be greater than 0"); - - while (a != b) { - if (a > b) { - a = a - b; - } else { - b = b - a; - } - } - return a; -} - -// Used only in testing -+ (NSUInteger)greatestCommonDivisorOfA:(NSUInteger)a andB:(NSUInteger)b -{ - return gcd(a, b); -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImageView.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImageView.m deleted file mode 100644 index e54fa7e..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINAnimatedImageView.m +++ /dev/null @@ -1,443 +0,0 @@ -// -// PINAnimatedImageView.m -// Pods -// -// Created by Garrett Moon on 4/17/18. -// - -#import "PINAnimatedImageView.h" - -#import "PINRemoteLock.h" -#import "PINDisplayLink.h" -#import "PINImage+DecodedImage.h" -#import "PINRemoteWeakProxy.h" - -@interface PINAnimatedImageView () -{ - CFTimeInterval _playHead; - NSUInteger _playedLoops; - NSUInteger _lastSuccessfulFrameIndex; - CFTimeInterval *_durations; -} - -@property (nonatomic, assign) CGImageRef frameImage; -@property (nonatomic, strong) PINDisplayLink *displayLink; - -@property (nonatomic, assign) CFTimeInterval lastDisplayLinkFire; - -@end - -@implementation PINAnimatedImageView - -@synthesize animatedImage = _animatedImage; -@synthesize displayLink = _displayLink; -@synthesize playbackPaused = _playbackPaused; -@synthesize animatedImageRunLoopMode = _animatedImageRunLoopMode; - -- (instancetype)initWithAnimatedImage:(PINCachedAnimatedImage *)animatedImage -{ - if (self = [super initWithFrame:CGRectZero]) { - [self commonInit:animatedImage]; - } - return self; -} - -- (instancetype)initWithFrame:(CGRect)frame -{ - if (self = [super initWithFrame:frame]) { - [self commonInit:nil]; - } - return self; -} - -- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder -{ - if (self = [super initWithCoder:aDecoder]) { - [self commonInit:nil]; - } - return self; -} - -- (void)commonInit:(PINCachedAnimatedImage *)animatedImage -{ - _animatedImage = animatedImage; - _animatedImageRunLoopMode = NSRunLoopCommonModes; - _durations = NULL; - - if (animatedImage) { - [self initializeAnimatedImage:animatedImage]; - } -} - -- (void)initializeAnimatedImage:(nonnull PINCachedAnimatedImage *)animatedImage -{ - PINWeakify(self); - animatedImage.coverImageReadyCallback = ^(PINImage *coverImage) { - dispatch_async(dispatch_get_main_queue(), ^{ - PINStrongify(self); - // In this case the lock is already gone we have to call the unlocked version therefore - [self coverImageCompleted:coverImage]; - }); - }; - - animatedImage.playbackReadyCallback = ^{ - dispatch_async(dispatch_get_main_queue(), ^{ - // In this case the lock is already gone we have to call the unlocked version therefore - PINStrongify(self); - [self checkIfShouldAnimate]; - }); - }; - if (animatedImage.playbackReady) { - [self checkIfShouldAnimate]; - } - - [self resetDurationsWithAnimatedImage:animatedImage]; -} - -- (void)dealloc -{ - if (_frameImage) { - CGImageRelease(_frameImage); - } - if (_durations) { - free(_durations); - } -} - -#pragma mark - Public - -- (void)setAnimatedImage:(PINCachedAnimatedImage *)animatedImage -{ - PINAssertMain(); - if (_animatedImage == animatedImage && animatedImage.playbackReady) { - return; - } - - PINCachedAnimatedImage *previousAnimatedImage = _animatedImage; - - _animatedImage = animatedImage; - - if (animatedImage != nil) { - [self initializeAnimatedImage:animatedImage]; - } else { - // Clean up after ourselves. - self.layer.contents = nil; - [self setCoverImage:nil]; - } - - // Animated Image can take a while to dealloc, let's try and do it off main. - __block PINCachedAnimatedImage *strongAnimatedImage = previousAnimatedImage; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - strongAnimatedImage = nil; - }); -} - -- (PINCachedAnimatedImage *)animatedImage -{ - PINAssertMain(); - return _animatedImage; -} - -- (NSString *)animatedImageRunLoopMode -{ - PINAssertMain(); - return _animatedImageRunLoopMode; -} - -- (void)setAnimatedImageRunLoopMode:(NSString *)newRunLoopMode -{ - PINAssertMain(); - - NSString *runLoopMode = newRunLoopMode ?: NSRunLoopCommonModes; - - if (_displayLink != nil) { - [_displayLink removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:_animatedImageRunLoopMode]; - [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:runLoopMode]; - } - _animatedImageRunLoopMode = runLoopMode; -} - -- (BOOL)isPlaybackPaused -{ - PINAssertMain(); - return _playbackPaused; -} - -- (void)setPlaybackPaused:(BOOL)playbackPaused -{ - PINAssertMain(); - - _playbackPaused = playbackPaused; - [self checkIfShouldAnimate]; -} - -- (void)coverImageCompleted:(PINImage *)coverImage -{ - PINAssertMain(); - BOOL setCoverImage = (_displayLink == nil) || _displayLink.paused; - - if (setCoverImage) { - [self setCoverImage:coverImage]; - } -} - -- (void)setCoverImage:(PINImage *)coverImage -{ - PINAssertMain(); - if (_frameImage) { - CGImageRelease(_frameImage); - } - _frameImage = CGImageRetain([coverImage CGImage]); -} - -#pragma mark - Animating - -- (void)checkIfShouldAnimate -{ - PINAssertMain(); - BOOL shouldAnimate = _playbackPaused == NO && _animatedImage.playbackReady && [self canBeVisible]; - if (shouldAnimate) { - [self startAnimating]; - } else { - [self stopAnimating]; - } -} - -- (void)startAnimating -{ - PINAssertMain(); - - if (_playbackPaused) { - return; - } - - if (_animatedImage.playbackReady == NO) { - return; - } - - if ([self canBeVisible] == NO) { - return; - } - - NSUInteger frameInterval = self.animatedImage.frameInterval; - - if (_displayLink == nil) { - _playHead = 0; - _displayLink = [PINDisplayLink displayLinkWithTarget:[PINRemoteWeakProxy weakProxyWithTarget:self] selector:@selector(displayLinkFired:)]; -#if PIN_TARGET_IOS - if (@available(iOS 10.0, tvOS 10.0, *)) { - // Convert from display link fractional value to fps (note: frameInterval is always at least 1) - NSInteger frameRate = ceil([PINAnimatedImage maximumFramesPerSecond] / ((double) frameInterval)); - _displayLink.preferredFramesPerSecond = frameRate; - } else { -#endif - _displayLink.frameInterval = frameInterval; -#if PIN_TARGET_IOS - } -#endif - _lastSuccessfulFrameIndex = NSUIntegerMax; - - [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:self.animatedImageRunLoopMode]; - } else { - _displayLink.paused = NO; - } -} - -- (void)stopAnimating -{ - PINAssertMain(); - - _displayLink.paused = YES; - _lastDisplayLinkFire = 0; - - [_animatedImage clearAnimatedImageCache]; -} - -#pragma mark - Overrides - -- (PINImage *)image -{ - PINAssertMain(); - if (_animatedImage) { - return [PINImage imageWithCGImage:_frameImage]; - } - return [super image]; -} - -- (CGImageRef)imageRef -{ - PINAssertMain(); - PINImage *underlyingImage = nil; - if (_animatedImage) { - return _frameImage; - } else if ((underlyingImage = [super image])) { - return (CGImageRef)CFAutorelease(CFRetain([underlyingImage CGImage])); - } - return nil; -} - -- (void)setImage:(PINImage *)image -{ - PINAssertMain(); - if (image) { - self.animatedImage = nil; - } - - super.image = image; -} - -- (void)displayLayer:(CALayer *)layer -{ - PINAssertMain(); - layer.contents = (__bridge id)[self imageRef]; -} - -#if PIN_TARGET_MAC - -- (void)_setImage:(PINImage *)image -{ - super.image = image; -} - -- (void)setAlphaValue:(CGFloat)alphaValue -{ - [super setAlphaValue:alphaValue]; - [self updateAnimationForPossibleVisibility]; -} - -- (void)viewDidMoveToWindow -{ - [super viewDidMoveToWindow]; - [self updateAnimationForPossibleVisibility]; -} - -- (void)viewDidMoveToSuperview -{ - [super viewDidMoveToSuperview]; - [self updateAnimationForPossibleVisibility]; -} -#else -- (void)setAlpha:(CGFloat)alpha -{ - [super setAlpha:alpha]; - [self updateAnimationForPossibleVisibility]; -} - -- (void)didMoveToWindow -{ - [super didMoveToWindow]; - [self updateAnimationForPossibleVisibility]; -} - -- (void)didMoveToSuperview -{ - [super didMoveToSuperview]; - [self updateAnimationForPossibleVisibility]; -} -#endif - -- (void)setHidden:(BOOL)hidden -{ - [super setHidden:hidden]; - [self updateAnimationForPossibleVisibility]; -} - -#pragma mark - Display Link Callbacks - -- (BOOL)canBeVisible -{ -#if PIN_TARGET_MAC - return self.window && self.superview && self.isHidden == NO && self.alphaValue > 0.0; -#else - return self.window && self.superview && self.isHidden == NO && self.alpha > 0.0; -#endif -} - -- (void)updateAnimationForPossibleVisibility -{ - [self checkIfShouldAnimate]; -} - -- (void)displayLinkFired:(PINDisplayLink *)displayLink -{ - PINAssertMain(); - CFTimeInterval timeBetweenLastFire; - if (_lastDisplayLinkFire == 0) { - timeBetweenLastFire = 0; - } else { - timeBetweenLastFire = CACurrentMediaTime() - self.lastDisplayLinkFire; - } - - self.lastDisplayLinkFire = CACurrentMediaTime(); - - _playHead += timeBetweenLastFire; - - while (_playHead > self.animatedImage.totalDuration) { - // Set playhead to zero to keep from showing different frames on different playthroughs - _playHead = 0; - _playedLoops++; - } - - if (self.animatedImage.loopCount > 0 && _playedLoops >= self.animatedImage.loopCount) { - [self stopAnimating]; - return; - } - - NSUInteger frameIndex = [self frameIndexAtPlayHeadPosition:_playHead]; - if (frameIndex == _lastSuccessfulFrameIndex) { - return; - } - CGImageRef frameImage = [self.animatedImage imageAtIndex:frameIndex]; - - if (frameImage == nil) { - //Pause the display link until we get a file ready notification - displayLink.paused = YES; - self.lastDisplayLinkFire = 0; - } else { - if (_frameImage) { - CGImageRelease(_frameImage); - } - _frameImage = CGImageRetain(frameImage); - _lastSuccessfulFrameIndex = frameIndex; -#if PIN_TARGET_MAC - [self _setImage:[NSImage imageWithCGImage:_frameImage]]; -#else - [self.layer setNeedsDisplay]; -#endif - } -} - -- (void)resetDurationsWithAnimatedImage:(PINCachedAnimatedImage *)animatedImage -{ - PINAssertMain(); - if (!animatedImage) { - return; - } - if (_durations) { - free(_durations); - } - _durations = malloc(sizeof(CFTimeInterval) * animatedImage.frameCount); - CFTimeInterval sum = 0.0f; - for (int i = 0; i < animatedImage.frameCount; i++) { - sum += [animatedImage durationAtIndex:i]; - _durations[i] = sum; - } -} - -- (NSUInteger)frameIndexAtPlayHeadPosition:(CFTimeInterval)playHead -{ - PINAssertMain(); - int low = 0, high = (int)_animatedImage.frameCount - 1; - - while (low <= high) { - int mid = low + (high - low) / 2; - if (_durations[mid] < playHead) { - low = mid + 1; - } else { - high = mid - 1; - } - } - return MAX(MIN(low, (int)_animatedImage.frameCount - 1), 0); -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINCachedAnimatedImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINCachedAnimatedImage.m deleted file mode 100644 index 8f41063..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINCachedAnimatedImage.m +++ /dev/null @@ -1,528 +0,0 @@ -// -// PINCachedAnimatedImage.m -// PINRemoteImage -// -// Created by Garrett Moon on 9/17/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINCachedAnimatedImage.h" - -#import "PINRemoteLock.h" -#import "PINGIFAnimatedImage.h" -#if PIN_WEBP -#import "PINWebPAnimatedImage.h" -#endif - -#if SWIFT_PACKAGE -@import PINOperation; -#else -#import <PINOperation/PINOperation.h> -#endif - -#import "NSData+ImageDetectors.h" - -static const NSUInteger kFramesToRenderForLargeFrames = 4; -static const NSUInteger kFramesToRenderMinimum = 2; - -static const CFTimeInterval kSecondsAfterMemWarningToMinimumCache = 1; -static const CFTimeInterval kSecondsAfterMemWarningToLargeCache = 5; -static const CFTimeInterval kSecondsAfterMemWarningToAllCache = 10; -#if PIN_TARGET_IOS -static const CFTimeInterval kSecondsBetweenMemoryWarnings = 15; -#endif - -@interface PINCachedAnimatedImage () <PINCachedAnimatedFrameProvider> -{ - // Since _animatedImage is set on init it is thread-safe. - id <PINAnimatedImage> _animatedImage; - - PINImage *_coverImage; - PINAnimatedImageInfoReady _coverImageReadyCallback; - dispatch_block_t _playbackReadyCallback; - NSMutableDictionary *_frameCache; - NSInteger _frameRenderCount; // Number of frames to cache until playback is ready. - BOOL _playbackReady; - PINOperationQueue *_operationQueue; - dispatch_queue_t _cachingQueue; - - NSUInteger _playhead; - BOOL _notifyOnReady; - NSMutableIndexSet *_cachedOrCachingFrames; - PINRemoteLock *_lock; - BOOL _cacheCleared; // Flag used to cancel any caching operations after clear cache is called. -} - -@property (atomic, strong) NSDate *lastMemoryWarning; - -// Set to YES if we continually see memory warnings after ramping up the number of cached frames. -@property (atomic, assign) BOOL cachingFramesCausingMemoryWarnings; - -@end - -@implementation PINCachedAnimatedImage - -- (instancetype)initWithAnimatedImageData:(NSData *)animatedImageData -{ - if ([animatedImageData pin_isAnimatedGIF]) { - return [self initWithAnimatedImage:[[PINGIFAnimatedImage alloc] initWithAnimatedImageData:animatedImageData]]; - } -#if PIN_WEBP - if ([animatedImageData pin_isAnimatedWebP]) { - return [self initWithAnimatedImage:[[PINWebPAnimatedImage alloc] initWithAnimatedImageData:animatedImageData]]; - } -#endif - return nil; -} - -- (instancetype)initWithAnimatedImage:(id <PINAnimatedImage>)animatedImage -{ - if (self = [super init]) { - _animatedImage = animatedImage; - _frameCache = [[NSMutableDictionary alloc] init]; - _frameRenderCount = 0; - _playhead = 0; - _notifyOnReady = YES; - _cachedOrCachingFrames = [[NSMutableIndexSet alloc] init]; - _lock = [[PINRemoteLock alloc] initWithName:@"PINCachedAnimatedImage Lock"]; - -#if PIN_TARGET_IOS - _lastMemoryWarning = [NSDate distantPast]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(didReceiveMemoryWarningNotification:) - name:UIApplicationDidReceiveMemoryWarningNotification - object:nil]; -#endif - - _operationQueue = [[PINOperationQueue alloc] initWithMaxConcurrentOperations:kFramesToRenderForLargeFrames]; - _cachingQueue = dispatch_queue_create("Caching Queue", DISPATCH_QUEUE_SERIAL); - - // dispatch later so that blocks can be set after init this runloop - PINWeakify(self); - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - PINStrongify(self); - [self imageAtIndex:0]; - }); - } - return self; -} - -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver:self]; -} - -#if PIN_TARGET_IOS -- (void)didReceiveMemoryWarningNotification:(NSNotification *)notification -{ - NSDate *now = [NSDate date]; - if (-[self.lastMemoryWarning timeIntervalSinceDate:now] < kSecondsBetweenMemoryWarnings) { - self.cachingFramesCausingMemoryWarnings = YES; - } - self.lastMemoryWarning = now; - [self cleanupFrames]; -} -#endif - -- (PINImage *)coverImage -{ - __block PINImage *coverImage = nil; - __block PINAnimatedImageInfoReady coverImageReadyCallback = nil; - [_lock lockWithBlock:^{ - if (self->_coverImage == nil) { - CGImageRef coverImageRef = [self->_animatedImage imageAtIndex:0 cacheProvider:self]; - BOOL notifyCallback = [self _locked_updateCoverImage:coverImageRef]; - coverImageReadyCallback = notifyCallback ? self->_coverImageReadyCallback : nil; - } - coverImage = self->_coverImage; - }]; - if (coverImageReadyCallback) { - coverImageReadyCallback(coverImage); - } - return coverImage; -} - -// Update _coverImage property and return if it should notify the callback -- (BOOL)_locked_updateCoverImage:(CGImageRef)coverImageRef -{ - BOOL notifyCallback = NO; - if (coverImageRef) { - notifyCallback = (_coverImage == nil && coverImageRef != nil); -#if PIN_TARGET_IOS - _coverImage = [UIImage imageWithCGImage:coverImageRef]; -#elif PIN_TARGET_MAC - _coverImage = [[NSImage alloc] initWithCGImage:coverImageRef size:CGSizeMake(_animatedImage.width, _animatedImage.height)]; -#endif - } else { - _coverImage = nil; - } - return notifyCallback; -} - -- (BOOL)coverImageReady -{ - __block PINImage *coverImage = nil; - __block PINAnimatedImageInfoReady coverImageReadyCallback = nil; - [_lock lockWithBlock:^{ - if (self->_coverImage == nil) { - CGImageRef coverImageRef = (__bridge CGImageRef)[self->_frameCache objectForKey:@(0)]; - if (coverImageRef) { - BOOL notifyCallback = [self _locked_updateCoverImage:coverImageRef]; - coverImageReadyCallback = notifyCallback ? self->_coverImageReadyCallback : nil; - } - } - - coverImage = self->_coverImage; - }]; - if (coverImageReadyCallback) { - coverImageReadyCallback(coverImage); - } - return (coverImage != nil); -} - -#pragma mark - passthrough -- (CGSize)size -{ - return CGSizeMake(_animatedImage.width, _animatedImage.height); -} - -- (NSData *)data -{ - return _animatedImage.data; -} - -- (CFTimeInterval)totalDuration -{ - return _animatedImage.totalDuration; -} - -- (NSUInteger)frameInterval -{ - return _animatedImage.frameInterval; -} - -- (size_t)loopCount -{ - return _animatedImage.loopCount; -} - -- (size_t)frameCount -{ - return _animatedImage.frameCount; -} - -- (NSError *)error -{ - return _animatedImage.error; -} - -- (CGImageRef)imageAtIndex:(NSUInteger)index -{ - __block CGImageRef imageRef; - __block BOOL cachingDisabled = NO; - [_lock lockWithBlock:^{ - // Reset cache cleared flag if it's been set. - self->_cacheCleared = NO; - imageRef = (__bridge CGImageRef)[self->_frameCache objectForKey:@(index)]; - - self->_playhead = index; - if (imageRef == NULL) { - if ([self framesToCache] == 0) { - // We're not caching so we should just generate the frame. - cachingDisabled = YES; - } else { - PINLog(@"cache miss, aww."); - self->_notifyOnReady = YES; - } - } - - // Retain and autorelease while we have the lock, another thread could remove it from the cache - // and allow it to be released. - if (imageRef) { - CGImageRetain(imageRef); - CFAutorelease(imageRef); - } - }]; - - if (cachingDisabled && imageRef == NULL) { - imageRef = [_animatedImage imageAtIndex:index cacheProvider:self]; - } else { - PINWeakify(self); - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - PINStrongify(self); - [self updateCache]; - }); - } - - return imageRef; -} - -- (void)_updateCacheOnQueue -{ - // Kick off, in order, caching frames which need to be cached - NSRange endKeepRange; - NSRange beginningKeepRange; - - [self getKeepRanges:&endKeepRange beginningKeepRange:&beginningKeepRange]; - - [self->_lock lockWithBlock:^{ - for (NSUInteger idx = endKeepRange.location; idx < NSMaxRange(endKeepRange); idx++) { - if ([self->_cachedOrCachingFrames containsIndex:idx] == NO) { - [self _locked_cacheFrame:idx]; - } - } - - if (beginningKeepRange.location != NSNotFound) { - for (NSUInteger idx = beginningKeepRange.location; idx < NSMaxRange(beginningKeepRange); idx++) { - if ([self->_cachedOrCachingFrames containsIndex:idx] == NO) { - [self _locked_cacheFrame:idx]; - } - } - } - }]; -} - -- (void)updateCache -{ - PINWeakify(self); - // skip if we don't have any frames to cache - if ([self framesToCache] > 0) { - [_operationQueue scheduleOperation:^{ - PINStrongify(self); - [self _updateCacheOnQueue]; - }]; - } - - [_operationQueue scheduleOperation:^{ - PINStrongify(self); - [self cleanupFrames]; - }]; -} - -- (void)getKeepRanges:(nonnull out NSRange *)endKeepRangeIn beginningKeepRange:(nonnull out NSRange *)beginningKeepRangeIn -{ - __block NSRange endKeepRange; - __block NSRange beginningKeepRange; - - NSUInteger framesToCache = [self framesToCache]; - - [self->_lock lockWithBlock:^{ - // find the range of frames we want to keep - endKeepRange = NSMakeRange(self->_playhead, framesToCache); - beginningKeepRange = NSMakeRange(NSNotFound, 0); - if (NSMaxRange(endKeepRange) > self->_animatedImage.frameCount) { - beginningKeepRange = NSMakeRange(0, NSMaxRange(endKeepRange) - self->_animatedImage.frameCount); - endKeepRange.length = self->_animatedImage.frameCount - self->_playhead; - } - }]; - - if (endKeepRangeIn) { - *endKeepRangeIn = endKeepRange; - } - if (beginningKeepRangeIn) { - *beginningKeepRangeIn = beginningKeepRange; - } -} - -- (void)cleanupFrames -{ - NSRange endKeepRange; - NSRange beginningKeepRange; - [self getKeepRanges:&endKeepRange beginningKeepRange:&beginningKeepRange]; - - [_lock lockWithBlock:^{ - NSMutableIndexSet *removedFrames = [[NSMutableIndexSet alloc] init]; - PINLog(@"Checking if frames need removing: %lu", _cachedOrCachingFrames.count); - [self->_cachedOrCachingFrames enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - BOOL shouldKeepFrame = NSLocationInRange(idx, endKeepRange); - if (beginningKeepRange.location != NSNotFound) { - shouldKeepFrame |= NSLocationInRange(idx, beginningKeepRange); - } - if (shouldKeepFrame == NO) { - [removedFrames addIndex:idx]; - [self->_frameCache removeObjectForKey:@(idx)]; - PINLog(@"Removing: %lu", (unsigned long)idx); - } - }]; - [self->_cachedOrCachingFrames removeIndexes:removedFrames]; - }]; -} - -- (void)_cacheWithFrameIndex:(NSUInteger)frameIndex -{ - CGImageRef imageRef = [self->_animatedImage imageAtIndex:frameIndex cacheProvider:self]; - PINLog(@"Generating: %lu", (unsigned long)frameIndex); - - if (imageRef) { - __block PINImage *coverImage = nil; - __block PINAnimatedImageInfoReady coverImageReadyCallback = nil; - [self->_lock lockWithBlock:^{ - [self->_frameCache setObject:(__bridge id _Nonnull)(imageRef) forKey:@(frameIndex)]; - - // Update the cover image - if (frameIndex == 0) { - BOOL notifyCallback = [self _locked_updateCoverImage:imageRef]; - coverImageReadyCallback = notifyCallback ? self->_coverImageReadyCallback : nil; - coverImage = self->_coverImage; - } - - self->_frameRenderCount--; - NSAssert(self->_frameRenderCount >= 0, @"playback ready is less than zero, something is wrong :("); - - PINLog(@"Frames left: %ld", (long)_frameRenderCount); - - dispatch_block_t notify = nil; - if (self->_frameRenderCount == 0 && self->_notifyOnReady) { - self->_notifyOnReady = NO; - if (self->_playbackReadyCallback) { - notify = self->_playbackReadyCallback; - [self->_operationQueue scheduleOperation:^{ - notify(); - }]; - } - } - }]; - if (coverImageReadyCallback) { - coverImageReadyCallback(coverImage); - } - } -} - -- (void)_locked_cacheFrame:(NSUInteger)frameIndex -{ - if ([_cachedOrCachingFrames containsIndex:frameIndex] == NO && _cacheCleared == NO) { - PINLog(@"Requesting: %lu", (unsigned long)frameIndex); - [_cachedOrCachingFrames addIndex:frameIndex]; - _frameRenderCount++; - - PINWeakify(self); - dispatch_async(_cachingQueue, ^{ - PINStrongify(self); - [self _cacheWithFrameIndex:frameIndex]; - }); - } -} - -// Returns the number of frames that should be cached -- (NSUInteger)framesToCache -{ - unsigned long long totalBytes = [NSProcessInfo processInfo].physicalMemory; - NSUInteger framesToCache = 0; - - NSUInteger frameCost = _animatedImage.bytesPerFrame; - if (frameCost * _animatedImage.frameCount < totalBytes / 250) { - // If the total number of bytes takes up less than a 250th of total memory, lets just cache 'em all. - framesToCache = _animatedImage.frameCount; - } else if (frameCost < totalBytes / 1000) { - // If the cost of a frame is less than 1000th of physical memory, cache 4 frames to smooth animation. - framesToCache = kFramesToRenderForLargeFrames; - } else if (frameCost < totalBytes / 500) { - // Oooph, lets just try to get ahead of things by one. - framesToCache = kFramesToRenderMinimum; - } else { - // No caching :( - framesToCache = 0; - } - - // If it's been less than 5 seconds, we're not caching - CFTimeInterval timeSinceLastWarning = -[self.lastMemoryWarning timeIntervalSinceNow]; - if (self.cachingFramesCausingMemoryWarnings || timeSinceLastWarning < kSecondsAfterMemWarningToMinimumCache) { - framesToCache = 0; - } else if (timeSinceLastWarning < kSecondsAfterMemWarningToLargeCache) { - framesToCache = MIN(framesToCache, kFramesToRenderMinimum); - } else if (timeSinceLastWarning < kSecondsAfterMemWarningToAllCache) { - framesToCache = MIN(framesToCache, kFramesToRenderForLargeFrames); - } - - return framesToCache; -} - -- (CFTimeInterval)durationAtIndex:(NSUInteger)index -{ - return [_animatedImage durationAtIndex:index]; -} - -- (BOOL)playbackReady -{ - __block BOOL playbackReady = NO; - [_lock lockWithBlock:^{ - if (self->_playbackReady == NO) { - self->_playbackReady = self->_frameRenderCount == 0; - } - playbackReady = self->_playbackReady; - }]; - return playbackReady; -} - -- (dispatch_block_t)playbackReadyCallback -{ - __block dispatch_block_t playbackReadyCallback = nil; - [_lock lockWithBlock:^{ - playbackReadyCallback = self->_playbackReadyCallback; - }]; - return playbackReadyCallback; -} - -- (void)setPlaybackReadyCallback:(dispatch_block_t)playbackReadyCallback -{ - [_lock lockWithBlock:^{ - self->_playbackReadyCallback = playbackReadyCallback; - }]; -} - -- (PINAnimatedImageInfoReady)coverImageReadyCallback -{ - __block PINAnimatedImageInfoReady coverImageReadyCallback; - [_lock lockWithBlock:^{ - coverImageReadyCallback = self->_coverImageReadyCallback; - }]; - return coverImageReadyCallback; -} - -- (void)setCoverImageReadyCallback:(PINAnimatedImageInfoReady)coverImageReadyCallback -{ - [_lock lockWithBlock:^{ - self->_coverImageReadyCallback = coverImageReadyCallback; - }]; -} - -- (void)_clearAnimatedImageCache -{ - [self->_lock lockWithBlock:^{ - self->_cacheCleared = YES; - self->_coverImage = nil; - [self->_cachedOrCachingFrames enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - [self->_frameCache removeObjectForKey:@(idx)]; - }]; - [self->_cachedOrCachingFrames removeAllIndexes]; - }]; -} - -/** - @abstract Clear any cached data. Called when playback is paused. - */ -- (void)clearAnimatedImageCache -{ - PINWeakify(self); - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - PINStrongify(self); - [self _clearAnimatedImageCache]; - }); -} - -# pragma mark - PINCachedAnimatedFrameProvider - -- (CGImageRef)cachedFrameImageAtIndex:(NSUInteger)index -{ - __block CGImageRef imageRef; - [_lock lockWithBlock:^{ - imageRef = (__bridge CGImageRef)[self->_frameCache objectForKey:@(index)]; - if (imageRef) { - CGImageRetain(imageRef); - CFAutorelease(imageRef); - } - }]; - return imageRef; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINGIFAnimatedImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINGIFAnimatedImage.m deleted file mode 100644 index 2b5016f..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINGIFAnimatedImage.m +++ /dev/null @@ -1,166 +0,0 @@ -// -// PINGIFAnimatedImage.m -// PINRemoteImage -// -// Created by Garrett Moon on 9/17/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINGIFAnimatedImage.h" - -#import <ImageIO/ImageIO.h> -#if PIN_TARGET_IOS -#import <MobileCoreServices/UTCoreTypes.h> -#elif PIN_TARGET_MAC -#import <CoreServices/CoreServices.h> -#endif - -#import "PINImage+DecodedImage.h" -#import "NSData+ImageDetectors.h" - -@interface PINGIFAnimatedImage () -{ - NSData *_animatedImageData; - CGImageSourceRef _imageSource; - uint32_t _width; - uint32_t _height; - BOOL _hasAlpha; - size_t _frameCount; - size_t _loopCount; - CFTimeInterval *_durations; - NSError *_error; -} -@end - -@implementation PINGIFAnimatedImage - -- (instancetype)initWithAnimatedImageData:(NSData *)animatedImageData -{ - if (self = [super init]) { - _animatedImageData = animatedImageData; - _imageSource = - CGImageSourceCreateWithData((CFDataRef)animatedImageData, - (CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceTypeIdentifierHint: - (__bridge NSString *)kUTTypeGIF, - (__bridge NSString *)kCGImageSourceShouldCache: - (__bridge NSNumber *)kCFBooleanFalse}); - if (_imageSource && [animatedImageData pin_isGIF]) { - _frameCount = (uint32_t)CGImageSourceGetCount(_imageSource); - NSDictionary *imageProperties = (__bridge_transfer NSDictionary *)CGImageSourceCopyProperties(_imageSource, nil); - _loopCount = (uint32_t)[[[imageProperties objectForKey:(__bridge NSString *)kCGImagePropertyGIFDictionary] - objectForKey:(__bridge NSString *)kCGImagePropertyGIFLoopCount] unsignedLongValue]; - _durations = malloc(sizeof(CFTimeInterval) * _frameCount); - imageProperties = (__bridge_transfer NSDictionary *) - CGImageSourceCopyPropertiesAtIndex(_imageSource, - 0, - (CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceShouldCache: - (__bridge NSNumber *)kCFBooleanFalse}); - _width = (uint32_t)[(NSNumber *)imageProperties[(__bridge NSString *)kCGImagePropertyPixelWidth] unsignedIntegerValue]; - _height = (uint32_t)[(NSNumber *)imageProperties[(__bridge NSString *)kCGImagePropertyPixelHeight] unsignedIntegerValue]; - - for (NSUInteger frameIdx = 0; frameIdx < _frameCount; frameIdx++) { - _durations[frameIdx] = [PINGIFAnimatedImage frameDurationAtIndex:frameIdx source:_imageSource]; - } - } else { - return nil; - } - } - return self; -} - -+ (Float32)frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source -{ - Float32 frameDuration = kPINAnimatedImageDefaultDuration; - NSDictionary *frameProperties = (__bridge_transfer NSDictionary *)CGImageSourceCopyPropertiesAtIndex(source, index, nil); - // use unclamped delay time before delay time before default - NSNumber *unclamedDelayTime = frameProperties[(__bridge NSString *)kCGImagePropertyGIFDictionary][(__bridge NSString *)kCGImagePropertyGIFUnclampedDelayTime]; - if (unclamedDelayTime != nil) { - frameDuration = [unclamedDelayTime floatValue]; - } else { - NSNumber *delayTime = frameProperties[(__bridge NSString *)kCGImagePropertyGIFDictionary][(__bridge NSString *)kCGImagePropertyGIFDelayTime]; - if (delayTime != nil) { - frameDuration = [delayTime floatValue]; - } - } - - static dispatch_once_t onceToken; - static Float32 maximumFrameDuration; - dispatch_once(&onceToken, ^{ - maximumFrameDuration = 1.0 / [PINAnimatedImage maximumFramesPerSecond]; - }); - - if (frameDuration < maximumFrameDuration) { - frameDuration = kPINAnimatedImageDefaultDuration; - } - - return frameDuration; -} - -- (void)dealloc -{ - if (_imageSource) { - CFRelease(_imageSource); - } - if (_durations) { - free(_durations); - } -} - -- (NSData *)data -{ - return _animatedImageData; -} - -- (size_t)frameCount -{ - return _frameCount; -} - -- (size_t)loopCount -{ - return _loopCount; -} - -- (uint32_t)width -{ - return _width; -} - -- (uint32_t)height -{ - return _height; -} - -- (uint32_t)bytesPerFrame -{ - return _width * _height * 4; -} - -- (NSError *)error -{ - return _error; -} - -- (CFTimeInterval)durationAtIndex:(NSUInteger)index -{ - return _durations[index]; -} - -- (CGImageRef)imageAtIndex:(NSUInteger)index cacheProvider:(nullable id<PINCachedAnimatedFrameProvider>)cacheProvider -{ - // I believe this is threadsafe as CGImageSource *seems* immutable… - CGImageRef imageRef = - CGImageSourceCreateImageAtIndex(_imageSource, - index, - (CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceShouldCache: - (__bridge NSNumber *)kCFBooleanFalse}); - if (imageRef) { - CGImageRef decodedImageRef = [PINImage pin_decodedImageRefWithCGImageRef:imageRef]; - CGImageRelease(imageRef); - imageRef = decodedImageRef; - } - - return imageRef; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINWebPAnimatedImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINWebPAnimatedImage.m deleted file mode 100644 index da13aa4..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/AnimatedImages/PINWebPAnimatedImage.m +++ /dev/null @@ -1,403 +0,0 @@ -// -// PINWebPAnimatedImage.m -// PINRemoteImage -// -// Created by Garrett Moon on 9/14/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#if PIN_WEBP - -#import "PINWebPAnimatedImage.h" - -#import "NSData+ImageDetectors.h" - -#if SWIFT_PACKAGE -@import libwebp; -#else -#import "webp/demux.h" -#endif - -@interface PINWebPAnimatedImage () -{ - NSData *_animatedImageData; - WebPData _underlyingData; - WebPDemuxer *_demux; - CGImageRef previousFrame; - uint32_t _width; - uint32_t _height; - BOOL _hasAlpha; - size_t _frameCount; - size_t _loopCount; - CGColorRef _backgroundColor; - CFTimeInterval *_durations; - NSError *_error; -} - -@end - -static void releaseData(void *info, const void *data, size_t size) -{ - WebPFree((void *)data); -} - -@implementation PINWebPAnimatedImage - -- (instancetype)initWithAnimatedImageData:(NSData *)animatedImageData -{ - if (self = [super init]) { - _animatedImageData = animatedImageData; - _underlyingData.bytes = [animatedImageData bytes]; - _underlyingData.size = [animatedImageData length]; - _demux = WebPDemux(&_underlyingData); - - if (_demux != NULL) { - _width = WebPDemuxGetI(_demux, WEBP_FF_CANVAS_WIDTH); - _height = WebPDemuxGetI(_demux, WEBP_FF_CANVAS_HEIGHT); - _frameCount = WebPDemuxGetI(_demux, WEBP_FF_FRAME_COUNT); - _loopCount = WebPDemuxGetI(_demux, WEBP_FF_LOOP_COUNT); - uint32_t flags = WebPDemuxGetI(_demux, WEBP_FF_FORMAT_FLAGS); - _hasAlpha = flags & ALPHA_FLAG; - _durations = malloc(sizeof(CFTimeInterval) * _frameCount); - - uint32_t backgroundColorInt = WebPDemuxGetI(_demux, WEBP_FF_BACKGROUND_COLOR); - CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB(); - CGFloat components[4]; - components[0] = (CGFloat)(((backgroundColorInt & 0xFF000000) >> 24)/255.0); - components[1] = (CGFloat)(((backgroundColorInt & 0x00FF0000) >> 16)/255.0); - components[2] = (CGFloat)(((backgroundColorInt & 0x0000FF00) >> 8)/255.0); - components[3] = (CGFloat)((backgroundColorInt & 0x000000FF)/255.0); - _backgroundColor = CGColorCreate(rgbColorSpace, components); - CGColorSpaceRelease(rgbColorSpace); - - // Iterate over the frames to gather duration - WebPIterator iter; - if (WebPDemuxGetFrame(_demux, 1, &iter)) { - do { - CFTimeInterval duration = iter.duration / 1000.0; - static dispatch_once_t onceToken; - static CFTimeInterval maximumDuration; - dispatch_once(&onceToken, ^{ - maximumDuration = 1.0 / [PINAnimatedImage maximumFramesPerSecond]; - }); - if (duration < maximumDuration) { - duration = kPINAnimatedImageDefaultDuration; - } - _durations[iter.frame_num - 1] = duration; - } while (WebPDemuxNextFrame(&iter)); - WebPDemuxReleaseIterator(&iter); - } - } else { - return nil; - } - } - return self; -} - -- (void)dealloc -{ - if (_demux) { - WebPDemuxDelete(_demux); - } - if (_durations) { - free(_durations); - } - if (_backgroundColor) { - CGColorRelease(_backgroundColor); - } -} - -- (NSData *)data -{ - return _animatedImageData; -} - -- (size_t)frameCount -{ - return _frameCount; -} - -- (size_t)loopCount -{ - return _loopCount; -} - -- (uint32_t)width -{ - return _width; -} - -- (uint32_t)height -{ - return _height; -} - -- (uint32_t)bytesPerFrame -{ - return _width * _height * (_hasAlpha ? 4 : 3); -} - -- (NSError *)error -{ - return _error; -} - -- (CFTimeInterval)durationAtIndex:(NSUInteger)index -{ - return _durations[index]; -} - -- (CGImageRef)canvasWithPreviousFrame:(CGImageRef)previousFrame - previousFrameRect:(CGRect)previousFrameRect - clearPreviousFrame:(BOOL)clearPreviousFrame - backgroundColor:(CGColorRef)backgroundColor - image:(CGImageRef)image - clearCurrentFrame:(BOOL)clearCurrentFrame - atRect:(CGRect)rect -{ - CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); - CGContextRef context = CGBitmapContextCreate(NULL, - _width, - _height, - 8, - 0, - colorSpaceRef, - _hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNone); - if (backgroundColor) { - CGContextSetFillColorWithColor(context, backgroundColor); - } - - if (previousFrame) { - CGContextDrawImage(context, CGRectMake(0, 0, _width, _height), previousFrame); - if (clearPreviousFrame) { - CGContextFillRect(context, previousFrameRect); - } - } - - if (image) { - CGRect currentRect = CGRectMake(rect.origin.x, _height - rect.size.height - rect.origin.y, rect.size.width, rect.size.height); - if (clearCurrentFrame) { - CGContextFillRect(context, currentRect); - } - CGContextDrawImage(context, currentRect, image); - } - - CGImageRef canvas = CGBitmapContextCreateImage(context); - if (canvas) { - CFAutorelease(canvas); - } - CGContextRelease(context); - CGColorSpaceRelease(colorSpaceRef); - - return canvas; -} - -- (CGImageRef)rawImageWithIterator:(WebPIterator)iterator -{ - CGImageRef imageRef = NULL; - uint8_t *data = NULL; - int pixelLength = 0; - - if (iterator.has_alpha) { - data = WebPDecodeRGBA(iterator.fragment.bytes, iterator.fragment.size, NULL, NULL); - pixelLength = 4; - } else { - data = WebPDecodeRGB(iterator.fragment.bytes, iterator.fragment.size, NULL, NULL); - pixelLength = 3; - } - - if (data) { - CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, data, iterator.width * iterator.height * pixelLength, releaseData); - - CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); - CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; - - if (iterator.has_alpha) { - bitmapInfo |= kCGImageAlphaLast; - } else { - bitmapInfo |= kCGImageAlphaNone; - } - - CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; - imageRef = CGImageCreate(iterator.width, - iterator.height, - 8, - 8 * pixelLength, - pixelLength * iterator.width, - colorSpaceRef, - bitmapInfo, - provider, - NULL, - NO, - renderingIntent); - - CGColorSpaceRelease(colorSpaceRef); - CGDataProviderRelease(provider); - } - - if (imageRef) { - CFAutorelease(imageRef); - } - - return imageRef; -} - -- (CGImageRef)imageAtIndex:(NSUInteger)index cacheProvider:(nullable id<PINCachedAnimatedFrameProvider>)cacheProvider -{ - PINLog(@"Drawing webp image at index: %lu", (unsigned long)index); - // This all *appears* to be threadsafe as I believe demux is immutable… - WebPIterator iterator, previousIterator; - - if (index > 0) { - if (WebPDemuxGetFrame(_demux, (int)index, &previousIterator) == NO) { - return nil; - } - } - if (WebPDemuxGetFrame(_demux, (int)index + 1, &iterator) == NO) { - return nil; - } - - BOOL isKeyFrame = [self isKeyFrame:&iterator previousIterator:(index > 0) ? &previousIterator : nil]; - - CGImageRef imageRef = [self rawImageWithIterator:iterator]; - CGImageRef canvas = NULL; - - if (imageRef) { - if (isKeyFrame) { - // If the current frame is a keyframe, we can just copy it into a blank - // canvas. - if (iterator.x_offset == 0 && iterator.y_offset == 0 && iterator.width == _width && iterator.height == _height) { - // Output will be the same size as the canvas, just return it directly. - canvas = imageRef; - } else { - canvas = [self canvasWithPreviousFrame:nil - previousFrameRect:CGRectZero - clearPreviousFrame:NO - backgroundColor:_backgroundColor - image:imageRef - clearCurrentFrame:iterator.blend_method == WEBP_MUX_NO_BLEND - atRect:CGRectMake(iterator.x_offset, iterator.y_offset, iterator.width, iterator.height)]; - } - } else { - // If we have a cached image provider, try to get the last frame from them - CGImageRef previousFrame = [cacheProvider cachedFrameImageAtIndex:index - 1]; - if (previousFrame) { - // We need an iterator from the previous frame to dispose to background if - // necessary. - WebPDemuxReleaseIterator(&previousIterator); - WebPDemuxGetFrame(_demux, (int)index, &previousIterator); - CGRect previousFrameRect = CGRectMake(previousIterator.x_offset, _height - previousIterator.height - previousIterator.y_offset, previousIterator.width, previousIterator.height); - canvas = [self canvasWithPreviousFrame:previousFrame - previousFrameRect:previousFrameRect - clearPreviousFrame:previousIterator.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND - backgroundColor:_backgroundColor - image:imageRef - clearCurrentFrame:iterator.blend_method == WEBP_MUX_NO_BLEND - atRect:CGRectMake(iterator.x_offset, iterator.y_offset, iterator.width, iterator.height)]; - } else if (index > 0) { - // Sadly, we need to draw *all* the frames from the previous key frame previousIterator to the current one :( - CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); - CGContextRef context = CGBitmapContextCreate(NULL, - _width, - _height, - 8, - 0, - colorSpaceRef, - _hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNone); - CGContextSetFillColorWithColor(context, _backgroundColor); - - while (previousIterator.frame_num <= iterator.frame_num) { - CGImageRef previousFrame = [self rawImageWithIterator:previousIterator]; - if (previousFrame) { - CGRect previousFrameRect = CGRectMake(previousIterator.x_offset, _height - previousIterator.height - previousIterator.y_offset, previousIterator.width, previousIterator.height); - if (previousIterator.blend_method == WEBP_MUX_NO_BLEND) { - CGContextFillRect(context, previousFrameRect); - } - - if (previousIterator.frame_num == iterator.frame_num) { - CGContextDrawImage(context, previousFrameRect, previousFrame); - // We have to break here because we're not getting the next frame! Basically - // the while loop is a sham and only here to illustrate what we want to iterate. - break; - } else { - if (previousIterator.dispose_method == WEBP_MUX_DISPOSE_BACKGROUND) { - CGContextFillRect(context, previousFrameRect); - } else { - CGContextDrawImage(context, previousFrameRect, previousFrame); - } - WebPDemuxNextFrame(&previousIterator); - } - } - } - - canvas = CGBitmapContextCreateImage(context); - if (canvas) { - CFAutorelease(canvas); - } - CGContextRelease(context); - CGColorSpaceRelease(colorSpaceRef); - } - } - } - - WebPDemuxReleaseIterator(&iterator); - if (index > 0) { - WebPDemuxReleaseIterator(&previousIterator); - } - - return canvas; -} - -// Checks to see if the iterator is a 'key frame' without taking previous frames into -// account. -- (BOOL)helperIsKeyFrame:(WebPIterator *)iterator -{ - if (iterator->frame_num == 1) { - //The first frame is always a key frame - return YES; - } else if ((iterator->has_alpha == NO || iterator->blend_method == WEBP_MUX_NO_BLEND) && iterator->width == _width && iterator->height == _height) { - //If the current frame has no alpha, or we're instructed not to blend, just make sure this fills the canvas. - return YES; - } - return NO; -} - -// Checks if the iterator is at a 'key frame' and rewinds previousIterator back to the last -// key frame if it's not. If this frame *is* a keyframe, the previousIterator's position is undefined. -// This takes previous frames into account to determine if the current frame is key. -- (BOOL)isKeyFrame:(WebPIterator *)iterator previousIterator:(WebPIterator *)previousIterator -{ - if ([self helperIsKeyFrame:iterator]) { - // Check if we're a key frame regardless of previous frame. - return YES; - } - - if (previousIterator == nil) { - return NO; - } - - BOOL previousFrameMadeThisKeyFrame = previousIterator->dispose_method == WEBP_MUX_DISPOSE_BACKGROUND; - BOOL foundKeyframe = NO; - while (foundKeyframe == NO) { - if ([self helperIsKeyFrame:previousIterator] || - (previousIterator->dispose_method == WEBP_MUX_DISPOSE_BACKGROUND && previousIterator->width == _width && previousIterator->height == _height)) { - foundKeyframe = YES; - } else { - // we need to rewind previous back to see if it was a keyframe - WebPDemuxPrevFrame(previousIterator); - if (previousIterator->dispose_method == WEBP_MUX_DISPOSE_BACKGROUND) { - // need to check previous frame - continue; - } else { - previousFrameMadeThisKeyFrame = NO; - continue; - } - } - } - - return previousFrameMadeThisKeyFrame; -} - -@end - -#endif diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSData+ImageDetectors.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSData+ImageDetectors.m deleted file mode 100644 index f58f557..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSData+ImageDetectors.m +++ /dev/null @@ -1,139 +0,0 @@ -// -// NSData+ImageDetectors.m -// Pods -// -// Created by Garrett Moon on 11/19/14. -// -// - -#import "NSData+ImageDetectors.h" - -#if PIN_WEBP - #if SWIFT_PACKAGE - @import libwebp; - #else - #import "webp/demux.h" - #endif -#endif - -@implementation NSData (PINImageDetectors) - -- (BOOL)pin_isGIF -{ - const NSInteger length = 3; - Byte firstBytes[length]; - if ([self length] >= length) { - [self getBytes:&firstBytes length:length]; - //G, I, F - if (firstBytes[0] == 0x47 && firstBytes[1] == 0x49 && firstBytes[2] == 0x46) { - return YES; - } - } - return NO; -} - -#define BREAK_IF_INVALID(position) if (position >= length) break; - -static inline BOOL advancePositionWithCount(NSUInteger *position, NSUInteger length, NSUInteger count) -{ - if (*position + count >= length) { - return NO; - } - *position = *position + count; - - return YES; -} - -static inline BOOL advancePositionWithBytes(NSUInteger *position, Byte *bytes, NSUInteger length, NSUInteger count) -{ - BOOL readAgain; - do { - readAgain = NO; - if (*position + count >= length ) { - return NO; - } - *position = *position + count; - NSUInteger bytesToAdvance = *(bytes + *position); - if (bytesToAdvance == 0xFF) { - readAgain = YES; - count = 0; - } - // Advance the byte read as well. - bytesToAdvance++; - - if (*position + bytesToAdvance >= length) { - return NO; - } - *position = *position + bytesToAdvance; - } while (readAgain); - - return YES; -} - -- (BOOL)pin_isAnimatedGIF -{ - if ([self pin_isGIF] == NO) { - return NO; - } - - Byte *bytes = (Byte *)self.bytes; - NSUInteger length = self.length; - NSUInteger position = 0; - NSUInteger GCECount = 0; - - while (bytes && position < length) { - // Look for Graphic Control Extension - if (*(bytes + position) == 0x21) { - if (!advancePositionWithCount(&position, length, 1)) break; - if (*(bytes + position) == 0xF9) { - GCECount++; - if (GCECount > 1) { - break; - } - // Found GCE, advance to image. Next byte is size of GCE - if (!advancePositionWithBytes(&position, bytes, length, 1)) break; - // Advance 1 for 00 at the end of GCE - if (!advancePositionWithCount(&position, length, 1)) break; - // Advance image descriptor - if (!advancePositionWithCount(&position, length, 11)) break; - // Advance image - if (!advancePositionWithBytes(&position, bytes, length, 0)) break; - // Advance 1 for 00 at the end of image - if (!advancePositionWithCount(&position, length, 1)) break; - } - continue; - } - if (!advancePositionWithCount(&position, length, 1)) break; - } - - return GCECount > 1; -} - -#if PIN_WEBP -- (BOOL)pin_isWebP -{ - const NSInteger length = 12; - Byte firstBytes[length]; - if ([self length] >= length) { - [self getBytes:&firstBytes length:length]; - //R, I, F, F, -, -, -, -, W, E, B, P - if (firstBytes[0] == 0x52 && firstBytes[1] == 0x49 && firstBytes[2] == 0x46 && firstBytes[3] == 0x46 && firstBytes[8] == 0x57 && firstBytes[9] == 0x45 && firstBytes[10] == 0x42 && firstBytes[11] == 0x50) { - return YES; - } - } - return NO; -} - -- (BOOL)pin_isAnimatedWebP -{ - WebPBitstreamFeatures features; - if (WebPGetFeatures([self bytes], [self length], &features) == VP8_STATUS_OK) { - return features.has_animation; - } - - return NO; -} - -#endif - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h deleted file mode 100644 index a145372..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// NSHTTPURLResponse+MaxAge.m -// -// Created by Kevin Smith on 6/15/18. -// -// - -#import <Foundation/Foundation.h> - -@interface NSHTTPURLResponse (MaxAge) - -- (NSNumber *)findMaxAge; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.m deleted file mode 100644 index 6acdcc9..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/NSHTTPURLResponse+MaxAge.m +++ /dev/null @@ -1,71 +0,0 @@ -// -// NSHTTPURLResponse+MaxAge.m -// -// Created by Kevin Smith on 6/15/18. -// -// - -#import "NSHTTPURLResponse+MaxAge.h" - -@implementation NSHTTPURLResponse (MaxAge) - -static NSDateFormatter *sharedFormatter; -static dispatch_once_t sharedFormatterToken; - -+ (NSDateFormatter *)RFC7231PreferredDateFormatter -{ - dispatch_once(&sharedFormatterToken, ^{ - NSLocale *enUSPOSIXLocale; - - sharedFormatter = [[NSDateFormatter alloc] init]; - - enUSPOSIXLocale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"]; - - [sharedFormatter setLocale:enUSPOSIXLocale]; - [sharedFormatter setDateFormat:@"E, d MMM yyyy HH:mm:ss Z"]; - - }); - return sharedFormatter; -} - -- (NSNumber *)findMaxAge -{ - NSDictionary * headerFields = [self allHeaderFields]; - NSNumber *maxAge = nil; - - for (NSString * component in [headerFields[@"Cache-Control"] componentsSeparatedByString:@","]) { - NSString * trimmed = [[component stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] lowercaseString]; - - if ([trimmed isEqualToString:@"no-store"] || [trimmed isEqualToString:@"must-revalidate"] || [trimmed isEqualToString:@"no-cache"]) { - maxAge = @(0); - break; - } else { - // max-age - NSArray<NSString *> * split = [trimmed componentsSeparatedByString:@"max-age="]; - if ([split count] == 2) { - // if the max-age provided is invalid (does not parse into an - // int), we wind up with 0 which will be treated as do-not-cache. - // This is the RFC defined behavior for a malformed "expires" header, - // and while I cannot find any explicit instruction of how to behave - // with a malformed "max-age" header, it seems like a reasonable approach. - maxAge = @([split[1] integerValue]); - } else if ([split count] > 2) { - // very weird case "maxage=maxage=123" - maxAge = @(0); - } - } - } - - // If there is a Cache-Control header with the "max-age" directive in the response, the Expires header is ignored. - if (!maxAge && headerFields[@"Expires"]) { - NSString * expires = headerFields[@"Expires"]; - NSDate * date = [[NSHTTPURLResponse RFC7231PreferredDateFormatter] dateFromString:expires]; - - // Invalid dates (notably "0") or dates in the past must not be cached (RFC7231 5.3) - maxAge = @((NSInteger) MAX(([date timeIntervalSinceNow]), 0)); - } - - return maxAge; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.h deleted file mode 100644 index 08d0e5a..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// UIImage+DecodedImage.h -// Pods -// -// Created by Garrett Moon on 11/19/14. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -#if !PIN_TARGET_IOS -@interface NSImage (PINiOSMapping) - -@property(nonatomic, readonly, nullable) CGImageRef CGImage; - -+ (nullable NSImage *)imageWithData:(nonnull NSData *)imageData; -+ (nullable NSImage *)imageWithContentsOfFile:(nonnull NSString *)path; -+ (nonnull NSImage *)imageWithCGImage:(nonnull CGImageRef)imageRef; - -@end -#endif - -NSData * __nullable PINImageJPEGRepresentation(PINImage * __nonnull image, CGFloat compressionQuality); -NSData * __nullable PINImagePNGRepresentation(PINImage * __nonnull image); - -@interface PINImage (PINDecodedImage) - -+ (nullable PINImage *)pin_decodedImageWithData:(nonnull NSData *)data; -+ (nullable PINImage *)pin_decodedImageWithData:(nonnull NSData *)data skipDecodeIfPossible:(BOOL)skipDecodeIfPossible; -+ (nullable PINImage *)pin_decodedImageWithCGImageRef:(nonnull CGImageRef)imageRef; -#if PIN_TARGET_IOS -+ (nullable PINImage *)pin_decodedImageWithCGImageRef:(nonnull CGImageRef)imageRef orientation:(UIImageOrientation) orientation; -#endif -+ (nullable CGImageRef)pin_decodedImageRefWithCGImageRef:(nonnull CGImageRef)imageRef; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.m deleted file mode 100644 index da75e5b..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+DecodedImage.m +++ /dev/null @@ -1,325 +0,0 @@ -// -// UIImage+DecodedImage.m -// Pods -// -// Created by Garrett Moon on 11/19/14. -// -// - -#import "PINImage+DecodedImage.h" - -#import <ImageIO/ImageIO.h> - -#ifdef PIN_WEBP -#import "PINImage+WebP.h" -#endif - -#import "NSData+ImageDetectors.h" - -NS_INLINE BOOL pin_CGImageRefIsOpaque(CGImageRef imageRef) { - CGImageAlphaInfo alpha = CGImageGetAlphaInfo(imageRef); - switch (alpha) { - case kCGImageAlphaNone: - case kCGImageAlphaNoneSkipLast: - case kCGImageAlphaNoneSkipFirst: - return YES; - default: - return NO; - } -} - -#if PIN_TARGET_IOS -NS_INLINE void pin_degreesFromOrientation(UIImageOrientation orientation, void (^completion)(CGFloat degrees, BOOL horizontalFlip, BOOL verticalFlip)) { - switch (orientation) { - case UIImageOrientationUp: // default orientation - completion(0.0, NO, NO); - break; - case UIImageOrientationDown: // 180 deg rotation - completion(180.0, NO, NO); - break; - case UIImageOrientationLeft: - completion(270.0, NO, NO); // 90 deg CCW - break; - case UIImageOrientationRight: - completion(90.0, NO, NO); // 90 deg CW - break; - case UIImageOrientationUpMirrored: // as above but image mirrored along other axis. horizontal flip - completion(0.0, YES, NO); - break; - case UIImageOrientationDownMirrored: // horizontal flip - completion(180.0, YES, NO); - break; - case UIImageOrientationLeftMirrored: // vertical flip - completion(270.0, NO, YES); - break; - case UIImageOrientationRightMirrored: // vertical flip - completion(90.0, NO, YES); - break; - } -} -#endif - -#if !PIN_TARGET_IOS -@implementation NSImage (PINiOSMapping) - -- (CGImageRef)CGImage -{ - NSGraphicsContext *context = [NSGraphicsContext currentContext]; - NSRect rect = NSMakeRect(0.0, 0.0, self.size.width, self.size.height); - return [self CGImageForProposedRect:&rect context:context hints:NULL]; -} - -+ (NSImage *)imageWithData:(NSData *)imageData; -{ - return [[self alloc] initWithData:imageData]; -} - -+ (NSImage *)imageWithContentsOfFile:(NSString *)path -{ - return path ? [[self alloc] initWithContentsOfFile:path] : nil; -} - -+ (NSImage *)imageWithCGImage:(CGImageRef)imageRef -{ - return [[self alloc] initWithCGImage:imageRef size:CGSizeZero]; -} - -@end -#endif - -NSData * __nullable PINImageJPEGRepresentation(PINImage * __nonnull image, CGFloat compressionQuality) -{ -#if PIN_TARGET_IOS - return UIImageJPEGRepresentation(image, compressionQuality); -#elif PIN_TARGET_MAC - NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; - NSDictionary *imageProperties = @{NSImageCompressionFactor : @(compressionQuality)}; - return [imageRep representationUsingType:NSJPEGFileType properties:imageProperties]; -#endif -} - -NSData * __nullable PINImagePNGRepresentation(PINImage * __nonnull image) { -#if PIN_TARGET_IOS - return UIImagePNGRepresentation(image); -#elif PIN_TARGET_MAC - NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]]; - NSDictionary *imageProperties = @{NSImageCompressionFactor : @1}; - return [imageRep representationUsingType:NSPNGFileType properties:imageProperties]; -#endif -} - - -@implementation PINImage (PINDecodedImage) - -+ (PINImage *)pin_decodedImageWithData:(NSData *)data -{ - return [self pin_decodedImageWithData:data skipDecodeIfPossible:NO]; -} - -+ (PINImage *)pin_decodedImageWithData:(NSData *)data skipDecodeIfPossible:(BOOL)skipDecodeIfPossible -{ - if (data == nil) { - return nil; - } - -#if PIN_WEBP - if ([data pin_isWebP]) { - return [PINImage pin_imageWithWebPData:data]; - } -#endif - - PINImage *decodedImage = nil; - - CGImageSourceRef imageSourceRef = CGImageSourceCreateWithData((CFDataRef)data, NULL); - - if (imageSourceRef) { - CGImageRef imageRef = CGImageSourceCreateImageAtIndex(imageSourceRef, 0, (CFDictionaryRef)@{(NSString *)kCGImageSourceShouldCache : (NSNumber *)kCFBooleanFalse}); - if (imageRef) { -#if PIN_TARGET_IOS - UIImageOrientation orientation = pin_UIImageOrientationFromImageSource(imageSourceRef); - if (skipDecodeIfPossible) { - decodedImage = [PINImage imageWithCGImage:imageRef scale:1.0 orientation:orientation]; - } else { - decodedImage = [self pin_decodedImageWithCGImageRef:imageRef orientation:orientation]; - } -#elif PIN_TARGET_MAC - if (skipDecodeIfPossible) { - CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); - decodedImage = [[NSImage alloc] initWithCGImage:imageRef size:imageSize]; - } else { - decodedImage = [self pin_decodedImageWithCGImageRef:imageRef]; - } -#endif - CGImageRelease(imageRef); - } - - CFRelease(imageSourceRef); - } - - return decodedImage; -} - -+ (PINImage *)pin_decodedImageWithCGImageRef:(CGImageRef)imageRef -{ -#if PIN_TARGET_IOS - return [self pin_decodedImageWithCGImageRef:imageRef orientation:UIImageOrientationUp]; -} - -+ (PINImage *)pin_decodedImageWithCGImageRef:(CGImageRef)imageRef orientation:(UIImageOrientation)orientation -{ -#endif -#if PIN_TARGET_IOS - if (@available(iOS 10.0, tvOS 10.0, *)) { - return [self pin_decodedImageUsingGraphicsImageRendererRefWithCGImageRef:imageRef scale:1.0 orientation:orientation]; - } else { - return [UIImage imageWithCGImage:[self pin_decodedImageRefWithCGImageRef:imageRef] scale:1.0 orientation:orientation]; - } -#elif PIN_TARGET_MAC - return [[NSImage alloc] initWithCGImage:[self pin_decodedImageRefWithCGImageRef:imageRef] size:NSZeroSize]; -#endif -} - -#if PIN_TARGET_IOS -+ (PINImage *)pin_decodedImageUsingGraphicsImageRendererRefWithCGImageRef:(CGImageRef)imageRef - scale:(CGFloat)scale - orientation:(UIImageOrientation)orientation API_AVAILABLE(ios(10.0), tvos(10.0)) { - UIGraphicsImageRendererFormat *format = nil; - if (@available(iOS 11.0, tvOS 11.0, *)) { - format = [UIGraphicsImageRendererFormat preferredFormat]; - } else { - format = [UIGraphicsImageRendererFormat defaultFormat]; - } - - format.scale = scale; - format.opaque = pin_CGImageRefIsOpaque(imageRef); - - __block CGFloat radians = 0.0; - __block BOOL doHorizontalFlip = NO; - __block BOOL doVerticalFlip = NO; - - pin_degreesFromOrientation(orientation, ^(CGFloat degrees, BOOL horizontalFlip, BOOL verticalFlip) { - // Convert degrees to radians - radians = [[[NSMeasurement alloc] initWithDoubleValue:degrees - unit:[NSUnitAngle degrees]] - measurementByConvertingToUnit:[NSUnitAngle radians]].doubleValue; - doHorizontalFlip = horizontalFlip; - doVerticalFlip = verticalFlip; - }); - - // Create rotation out of radians - CGAffineTransform transform = CGAffineTransformMakeRotation(radians); - - // Grab image size - CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); - - // Rotate rect by transformation - CGRect rotatedRect = CGRectApplyAffineTransform(CGRectMake(0.0, 0.0, imageSize.width, imageSize.height), transform); - - // Use graphics renderer to render image - UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:rotatedRect.size format:format]; - - return [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) { - CGContextRef ctx = rendererContext.CGContext; - - // Flip the default coordinate system for iOS/tvOS: https://developer.apple.com/library/archive/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW4 - CGContextTranslateCTM(ctx, rotatedRect.size.width / 2.0, rotatedRect.size.height / 2.0); - CGContextScaleCTM(ctx, (doHorizontalFlip ? -1.0 : 1.0), (doVerticalFlip ? 1.0 : -1.0)); - - // Apply transformation - CGContextConcatCTM(ctx, transform); - - // Draw image - CGContextDrawImage(ctx, CGRectMake(-(imageSize.width / 2.0), -(imageSize.height / 2.0), imageSize.width, imageSize.height), imageRef); - }]; -} -#endif - -+ (CGImageRef)pin_decodedImageRefWithCGImageRef:(CGImageRef)imageRef -{ - CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); - - CGBitmapInfo info = pin_CGImageRefIsOpaque(imageRef) ? (kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Host) : (kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); - CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); - - //Use UIGraphicsBeginImageContext parameters from docs: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKitFunctionReference/#//apple_ref/c/func/UIGraphicsBeginImageContextWithOptions - CGContextRef ctx = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, - 8, - 0, - colorspace, - info); - - CGColorSpaceRelease(colorspace); - - if (ctx) { - CGContextSetBlendMode(ctx, kCGBlendModeCopy); - CGContextDrawImage(ctx, CGRectMake(0, 0, imageSize.width, imageSize.height), imageRef); - - CGImageRef decodedImageRef = CGBitmapContextCreateImage(ctx); - if (decodedImageRef) { - CFAutorelease(decodedImageRef); - } - CGContextRelease(ctx); - return decodedImageRef; - - } - - return imageRef; -} - -#if PIN_TARGET_IOS -UIImageOrientation pin_UIImageOrientationFromImageSource(CGImageSourceRef imageSourceRef) { - UIImageOrientation orientation = UIImageOrientationUp; - - if (imageSourceRef != nil) { - NSDictionary *dict = (NSDictionary *)CFBridgingRelease(CGImageSourceCopyPropertiesAtIndex(imageSourceRef, 0, NULL)); - - if (dict != nil) { - - NSNumber* exifOrientation = dict[(id)kCGImagePropertyOrientation]; - if (exifOrientation != nil) { - - switch (exifOrientation.intValue) { - case 1: /*kCGImagePropertyOrientationUp*/ - orientation = UIImageOrientationUp; - break; - - case 2: /*kCGImagePropertyOrientationUpMirrored*/ - orientation = UIImageOrientationUpMirrored; - break; - - case 3: /*kCGImagePropertyOrientationDown*/ - orientation = UIImageOrientationDown; - break; - - case 4: /*kCGImagePropertyOrientationDownMirrored*/ - orientation = UIImageOrientationDownMirrored; - break; - case 5: /*kCGImagePropertyOrientationLeftMirrored*/ - orientation = UIImageOrientationLeftMirrored; - break; - - case 6: /*kCGImagePropertyOrientationRight*/ - orientation = UIImageOrientationRight; - break; - - case 7: /*kCGImagePropertyOrientationRightMirrored*/ - orientation = UIImageOrientationRightMirrored; - break; - - case 8: /*kCGImagePropertyOrientationLeft*/ - orientation = UIImageOrientationLeft; - break; - - default: - break; - } - } - } - } - - return orientation; -} - -#endif - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.h deleted file mode 100644 index b82f931..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// UIImage+ScaledImage.h -// Pods -// -// Created by Michael Schneider on 2/9/17. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -@interface PINImage (PINScaledImage) - -- (PINImage *)pin_scaledImageForKey:(NSString *)key; -+ (PINImage *)pin_scaledImageForImage:(PINImage *)image withKey:(NSString *)key; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.m deleted file mode 100644 index 9c4326e..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+ScaledImage.m +++ /dev/null @@ -1,56 +0,0 @@ -// -// UIImage+ScaledImage.m -// Pods -// -// Created by Michael Schneider on 2/9/17. -// -// - -#import "PINImage+ScaledImage.h" - -static inline PINImage *PINScaledImageForKey(NSString * __nullable key, PINImage * __nullable image) { - if (image == nil) { - return nil; - } - -#if PIN_TARGET_IOS - - NSCAssert(image.CGImage != NULL, @"CGImage should not be NULL"); - - CGFloat scale = 1.0; - if (key.length >= 8) { - if ([key rangeOfString:@"_2x."].location != NSNotFound || - [key rangeOfString:@"@2x."].location != NSNotFound) { - scale = 2.0; - } - - if ([key rangeOfString:@"_3x."].location != NSNotFound || - [key rangeOfString:@"@3x."].location != NSNotFound) { - scale = 3.0; - } - } - - if (scale != image.scale) { - return [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; - } - - return image; - -#elif PIN_TARGET_MAC - return image; -#endif -} - -@implementation PINImage (ScaledImage) - -- (PINImage *)pin_scaledImageForKey:(NSString *)key -{ - return PINScaledImageForKey(key, self); -} - -+ (PINImage *)pin_scaledImageForImage:(PINImage *)image withKey:(NSString *)key -{ - return PINScaledImageForKey(key, image); -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.h deleted file mode 100644 index 8c38407..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// UIImage+WebP.h -// Pods -// -// Created by Garrett Moon on 11/18/14. -// -// - -#import "PINRemoteImageMacros.h" - -#if PIN_WEBP - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -@interface PINImage (PINWebP) - -+ (PINImage *)pin_imageWithWebPData:(NSData *)webPData; - -@end - -#endif diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.m deleted file mode 100644 index d2021d3..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINImage+WebP.m +++ /dev/null @@ -1,87 +0,0 @@ -// -// UIImage+WebP.m -// Pods -// -// Created by Garrett Moon on 11/18/14. -// -// - -#import "PINImage+WebP.h" - -#if PIN_WEBP - -#if SWIFT_PACKAGE -@import libwebp; -#else -#import "webp/decode.h" -#endif - -static void releaseData(void *info, const void *data, size_t size) -{ - WebPFree((void *)data); -} - -@implementation PINImage (PINWebP) - -+ (PINImage *)pin_imageWithWebPData:(NSData *)webPData -{ - WebPBitstreamFeatures features; - if (WebPGetFeatures([webPData bytes], [webPData length], &features) == VP8_STATUS_OK) { - // Decode the WebP image data into a RGBA value array - int height, width; - uint8_t *data = NULL; - int pixelLength = 0; - - if (features.has_alpha) { - data = WebPDecodeRGBA([webPData bytes], [webPData length], &width, &height); - pixelLength = 4; - } else { - data = WebPDecodeRGB([webPData bytes], [webPData length], &width, &height); - pixelLength = 3; - } - - if (data) { - CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, data, width * height * pixelLength, releaseData); - - CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); - CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault; - - if (features.has_alpha) { - bitmapInfo |= kCGImageAlphaLast; - } else { - bitmapInfo |= kCGImageAlphaNone; - } - - CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; - CGImageRef imageRef = CGImageCreate(width, - height, - 8, - 8 * pixelLength, - pixelLength * width, - colorSpaceRef, - bitmapInfo, - provider, - NULL, - NO, - renderingIntent); - - PINImage *image = nil; -#if PIN_TARGET_IOS - image = [UIImage imageWithCGImage:imageRef]; -#elif PIN_TARGET_MAC - image = [[self alloc] initWithCGImage:imageRef size:CGSizeZero]; -#endif - - CGImageRelease(imageRef); - CGColorSpaceRelease(colorSpaceRef); - CGDataProviderRelease(provider); - - return image; - } - } - return nil; -} - -@end - -#endif diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINRemoteImageTask+Subclassing.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINRemoteImageTask+Subclassing.h deleted file mode 100644 index 8e0c600..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/Categories/PINRemoteImageTask+Subclassing.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// PINRemoteImageTask+Subclassing.h -// PINRemoteImage -// -// Created by Garrett Moon on 5/22/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINRemoteImageTask.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface PINRemoteImageTask (Subclassing) - -- (NSMutableDictionary *)l_callbackBlocks; -- (BOOL)l_cancelWithUUID:(NSUUID *)UUID; - -@end - -NS_ASSUME_NONNULL_END diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINAnimatedImageView+PINRemoteImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINAnimatedImageView+PINRemoteImage.m deleted file mode 100644 index 34edd84..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINAnimatedImageView+PINRemoteImage.m +++ /dev/null @@ -1,119 +0,0 @@ -// -// PINAnimatedImageView+PINRemoteImage.m -// Pods -// -// Created by Garrett Moon on 4/19/18. -// - -#import "PINAnimatedImageView+PINRemoteImage.h" - -#import "PINAnimatedImage.h" - -@implementation PINAnimatedImageView (PINRemoteImage) - -- (void)pin_setImageFromURL:(NSURL *)url -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage]; -} - -- (void)pin_setImageFromURL:(NSURL *)url completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url processorKey:processorKey processor:processor]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage processorKey:processorKey processor:processor]; -} - -- (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url processorKey:processorKey processor:processor completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:@[url] placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion]; -} - -- (void)pin_setImageFromURLs:(NSArray *)urls -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls]; -} - -- (void)pin_setImageFromURLs:(NSArray *)urls placeholderImage:(PINImage *)placeholderImage -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls placeholderImage:placeholderImage]; -} - -- (void)pin_setImageFromURLs:(NSArray *)urls placeholderImage:(PINImage *)placeholderImage completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls placeholderImage:placeholderImage completion:completion]; -} - -- (void)pin_cancelImageDownload -{ - [PINRemoteImageCategoryManager cancelImageDownloadOnView:self]; -} - -- (NSUUID *)pin_downloadImageOperationUUID -{ - return [PINRemoteImageCategoryManager downloadImageOperationUUIDOnView:self]; -} - -- (void)pin_setDownloadImageOperationUUID:(NSUUID *)downloadImageOperationUUID -{ - [PINRemoteImageCategoryManager setDownloadImageOperationUUID:downloadImageOperationUUID onView:self]; -} - -- (BOOL)pin_updateWithProgress -{ - return [PINRemoteImageCategoryManager updateWithProgressOnView:self]; -} - -- (void)setPin_updateWithProgress:(BOOL)updateWithProgress -{ - [PINRemoteImageCategoryManager setUpdateWithProgressOnView:updateWithProgress onView:self]; -} - -- (void)pin_setPlaceholderWithImage:(PINImage *)image -{ - self.image = image; -} - -- (void)pin_updateUIWithRemoteImageManagerResult:(PINRemoteImageManagerResult *)result -{ - if (result.alternativeRepresentation && [result.alternativeRepresentation isKindOfClass:[PINCachedAnimatedImage class]]) { - self.animatedImage = (PINCachedAnimatedImage *)result.alternativeRepresentation; - } else if (result.image) { - self.image = result.image; - } -} - -- (void)pin_clearImages -{ - self.animatedImage = nil; - self.image = nil; -} - -- (BOOL)pin_ignoreGIFs -{ - return NO; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINButton+PINRemoteImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINButton+PINRemoteImage.m deleted file mode 100644 index 50f5d80..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINButton+PINRemoteImage.m +++ /dev/null @@ -1,131 +0,0 @@ -// -// UIButton+PINRemoteImage.m -// Pods -// -// Created by Garrett Moon on 8/18/14. -// -// - -#import "PINButton+PINRemoteImage.h" - -@implementation PINButton (PINRemoteImage) - -- (void)pin_setImageFromURL:(NSURL *)url -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage]; -} - -- (void)pin_setImageFromURL:(NSURL *)url completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url processorKey:processorKey processor:processor]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage processorKey:processorKey processor:processor]; -} - -- (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url processorKey:processorKey processor:processor completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:url?@[url]:nil placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion]; -} - -- (void)pin_setImageFromURLs:(NSArray <NSURL *> *)urls -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls]; -} - -- (void)pin_setImageFromURLs:(NSArray <NSURL *> *)urls placeholderImage:(PINImage *)placeholderImage -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls placeholderImage:placeholderImage]; -} - -- (void)pin_setImageFromURLs:(NSArray <NSURL *> *)urls placeholderImage:(PINImage *)placeholderImage completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls placeholderImage:placeholderImage completion:completion]; -} - -- (void)pin_cancelImageDownload -{ - [PINRemoteImageCategoryManager cancelImageDownloadOnView:self]; -} - -- (NSUUID *)pin_downloadImageOperationUUID -{ - return [PINRemoteImageCategoryManager downloadImageOperationUUIDOnView:self]; -} - -- (void)pin_setDownloadImageOperationUUID:(NSUUID *)downloadImageOperationUUID -{ - [PINRemoteImageCategoryManager setDownloadImageOperationUUID:downloadImageOperationUUID onView:self]; -} - -- (BOOL)pin_updateWithProgress -{ - return [PINRemoteImageCategoryManager updateWithProgressOnView:self]; -} - -- (void)setPin_updateWithProgress:(BOOL)updateWithProgress -{ - [PINRemoteImageCategoryManager setUpdateWithProgressOnView:updateWithProgress onView:self]; -} - -- (void)pin_setPlaceholderWithImage:(PINImage *)image -{ -#if PIN_TARGET_IOS - [self setImage:image forState:UIControlStateNormal]; -#elif PIN_TARGET_MAC - [self setImage:image]; -#endif -} - -- (void)pin_updateUIWithRemoteImageManagerResult:(PINRemoteImageManagerResult *)result -{ - if (result.image) { -#if PIN_TARGET_IOS - [self setImage:result.image forState:UIControlStateNormal]; - [self setNeedsLayout]; -#elif PIN_TARGET_MAC - [self setImage:result.image]; - [self setNeedsLayout:YES]; -#endif - } -} - -- (void)pin_clearImages -{ -#if PIN_TARGET_IOS - [self setImage:nil forState:UIControlStateNormal]; - [self setNeedsLayout]; -#elif PIN_TARGET_MAC - [self setImage:nil]; - [self setNeedsLayout:YES]; -#endif -} - -- (BOOL)pin_ignoreGIFs -{ - return YES; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINImageView+PINRemoteImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINImageView+PINRemoteImage.m deleted file mode 100644 index 1e6a6ab..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/ImageCategories/PINImageView+PINRemoteImage.m +++ /dev/null @@ -1,127 +0,0 @@ -// -// UIImageView+PINRemoteImage.m -// Pods -// -// Created by Garrett Moon on 8/17/14. -// -// - -#import "PINImageView+PINRemoteImage.h" - -@implementation PINImageView (PINRemoteImage) - -- (void)pin_setImageFromURL:(NSURL *)url -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage]; -} - -- (void)pin_setImageFromURL:(NSURL *)url completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url processorKey:processorKey processor:processor]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url placeholderImage:placeholderImage processorKey:processorKey processor:processor]; -} - -- (void)pin_setImageFromURL:(NSURL *)url processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURL:url processorKey:processorKey processor:processor completion:completion]; -} - -- (void)pin_setImageFromURL:(NSURL *)url placeholderImage:(PINImage *)placeholderImage processorKey:(NSString *)processorKey processor:(PINRemoteImageManagerImageProcessor)processor completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:url?@[url]:nil placeholderImage:placeholderImage processorKey:processorKey processor:processor completion:completion]; -} - -- (void)pin_setImageFromURLs:(NSArray <NSURL *> *)urls -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls]; -} - -- (void)pin_setImageFromURLs:(NSArray <NSURL *> *)urls placeholderImage:(PINImage *)placeholderImage -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls placeholderImage:placeholderImage]; -} - -- (void)pin_setImageFromURLs:(NSArray <NSURL *> *)urls placeholderImage:(PINImage *)placeholderImage completion:(PINRemoteImageManagerImageCompletion)completion -{ - [PINRemoteImageCategoryManager setImageOnView:self fromURLs:urls placeholderImage:placeholderImage completion:completion]; -} - -- (void)pin_cancelImageDownload -{ - [PINRemoteImageCategoryManager cancelImageDownloadOnView:self]; -} - -- (NSUUID *)pin_downloadImageOperationUUID -{ - return [PINRemoteImageCategoryManager downloadImageOperationUUIDOnView:self]; -} - -- (void)pin_setDownloadImageOperationUUID:(NSUUID *)downloadImageOperationUUID -{ - [PINRemoteImageCategoryManager setDownloadImageOperationUUID:downloadImageOperationUUID onView:self]; -} - -- (BOOL)pin_updateWithProgress -{ - return [PINRemoteImageCategoryManager updateWithProgressOnView:self]; -} - -- (void)setPin_updateWithProgress:(BOOL)updateWithProgress -{ - [PINRemoteImageCategoryManager setUpdateWithProgressOnView:updateWithProgress onView:self]; -} - -- (void)pin_setPlaceholderWithImage:(PINImage *)image -{ - self.image = image; -} - -- (void)pin_updateUIWithRemoteImageManagerResult:(PINRemoteImageManagerResult *)result -{ - if (result.image) { - self.image = result.image; - -#if PIN_TARGET_IOS - [self setNeedsLayout]; -#elif PIN_TARGET_MAC - [self setNeedsLayout:YES]; -#endif - } -} - -- (void)pin_clearImages -{ - self.image = nil; - -#if PIN_TARGET_IOS - [self setNeedsLayout]; -#elif PIN_TARGET_MAC - [self setNeedsLayout:YES]; -#endif -} - -- (BOOL)pin_ignoreGIFs -{ - return YES; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINAlternateRepresentationProvider.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINAlternateRepresentationProvider.m deleted file mode 100644 index ea87911..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINAlternateRepresentationProvider.m +++ /dev/null @@ -1,30 +0,0 @@ -// -// PINAlternateRepresentationProvider.m -// Pods -// -// Created by Garrett Moon on 3/17/16. -// -// - -#import "PINAlternateRepresentationProvider.h" - -#import "PINCachedAnimatedImage.h" -#import "NSData+ImageDetectors.h" - -@implementation PINAlternateRepresentationProvider - -- (id)alternateRepresentationWithData:(NSData *)data options:(PINRemoteImageManagerDownloadOptions)options -{ -#if PIN_WEBP - if ([data pin_isAnimatedGIF] || [data pin_isAnimatedWebP]) { - return [[PINCachedAnimatedImage alloc] initWithAnimatedImageData:data]; - } -#else - if ([data pin_isAnimatedGIF]) { - return [[PINCachedAnimatedImage alloc] initWithAnimatedImageData:data]; - } -#endif - return nil; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.h deleted file mode 100644 index 0b43e7b..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// PINDisplayLink.h -// Pods -// -// Created by Garrett Moon on 4/23/18. -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#define PINDisplayLink CADisplayLink -#elif PIN_TARGET_MAC -@interface PINDisplayLink : NSObject - -+ (PINDisplayLink *)displayLinkWithTarget:(id)target selector:(SEL)sel; -- (void)addToRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode; -- (void)removeFromRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode; - -@property(getter=isPaused, nonatomic) BOOL paused; -@property(nonatomic) NSInteger frameInterval; - -@end -#endif diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.m deleted file mode 100644 index 8235265..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINDisplayLink.m +++ /dev/null @@ -1,133 +0,0 @@ -// -// PINDisplayLink.m -// Pods -// -// Created by Garrett Moon on 4/23/18. -// - -#import "PINDisplayLink.h" - -#if PIN_TARGET_MAC - -#if SWIFT_PACKAGE -@import CoreVideo.CVDisplayLink; -#else -#import <CoreVideo/CoreVideo.h> -#endif - -@interface PINDisplayLink () - -@property (nonatomic, readonly) id target; -@property (nonatomic, readonly) SEL selector; -@property (nonatomic, readonly) NSRunLoop *runloop; -@property (nonatomic, readonly) NSRunLoopMode mode; - -- (void)displayLinkFired; - -@end - -static CVReturn displayLinkFired (CVDisplayLinkRef displayLink, - const CVTimeStamp *inNow, - const CVTimeStamp *inOutputTime, - CVOptionFlags flagsIn, - CVOptionFlags *flagsOut, - void *displayLinkContext) -{ - PINDisplayLink *link = (__bridge PINDisplayLink *)displayLinkContext; - [link displayLinkFired]; - return kCVReturnSuccess; -} - -@implementation PINDisplayLink -{ - CVDisplayLinkRef _displayLinkRef; - - BOOL _paused; - NSInteger _frameInterval; -} - -+ (PINDisplayLink *)displayLinkWithTarget:(id)target selector:(SEL)sel -{ - return [[PINDisplayLink alloc] initWithTarget:target selector:sel]; -} - -- (PINDisplayLink *)initWithTarget:(id)target selector:(SEL)sel -{ - if (self = [super init]) { - _target = target; - _selector = sel; - CVDisplayLinkCreateWithActiveCGDisplays(&_displayLinkRef); - CVDisplayLinkSetOutputCallback(_displayLinkRef, &displayLinkFired, (__bridge void * _Nullable)(self)); - } - return self; -} - -- (void)dealloc -{ - if (_displayLinkRef) { - CVDisplayLinkRelease(_displayLinkRef); - } -} - -- (void)displayLinkFired -{ - dispatch_async(dispatch_get_main_queue(), ^{ - [self.runloop performSelector:self.selector target:self.target argument:self order:NSUIntegerMax modes:@[self.mode]]; - }); -} - -- (void)addToRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode -{ - PINAssertMain(); - NSAssert(runloop && mode, @"Must set a runloop and a mode."); - _runloop = runloop; - _mode = mode; - if (_paused == NO) { - CVDisplayLinkStart(_displayLinkRef); - } -} - -- (void)removeFromRunLoop:(NSRunLoop *)runloop forMode:(NSRunLoopMode)mode -{ - _runloop = nil; - _mode = nil; - if (_paused == NO) { - CVDisplayLinkStop(_displayLinkRef); - } -} - -- (BOOL)isPaused -{ - PINAssertMain(); - return _paused; -} - -- (void)setPaused:(BOOL)paused -{ - PINAssertMain(); - if (_paused == paused) { - return; - } - - _paused = paused; - if (paused) { - CVDisplayLinkStop(_displayLinkRef); - } else { - CVDisplayLinkStart(_displayLinkRef); - } -} - -- (NSInteger)frameInterval -{ - PINAssertMain(); - return _frameInterval; -} - -- (void)setFrameInterval:(NSInteger)frameInterval -{ - PINAssertMain(); - _frameInterval = frameInterval; -} - -@end -#endif diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINProgressiveImage.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINProgressiveImage.m deleted file mode 100644 index 8d530b9..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINProgressiveImage.m +++ /dev/null @@ -1,464 +0,0 @@ -// -// PINProgressiveImage.m -// Pods -// -// Created by Garrett Moon on 2/9/15. -// -// - -#import "PINProgressiveImage.h" - -#import <ImageIO/ImageIO.h> -#import <Accelerate/Accelerate.h> - -#import "PINRemoteImage.h" -#import "PINImage+DecodedImage.h" -#import "PINRemoteImageDownloadTask.h" -#import "PINSpeedRecorder.h" - -@interface PINProgressiveImage () - -@property (nonatomic, strong) NSURLSessionDataTask *dataTask; -@property (nonatomic, strong) NSMutableData *mutableData; -@property (nonatomic, assign) int64_t expectedNumberOfBytes; -@property (nonatomic, assign) CGImageSourceRef imageSource; -@property (nonatomic, assign) CGSize size; -@property (nonatomic, assign) BOOL isProgressiveJPEG; -@property (nonatomic, assign) NSUInteger currentThreshold; -@property (nonatomic, assign) NSUInteger startingBytes; -@property (nonatomic, assign) NSUInteger scannedByte; -@property (nonatomic, assign) NSInteger sosCount; -@property (nonatomic, strong) PINRemoteLock *lock; -#if DEBUG -@property (nonatomic, assign) CFTimeInterval scanTime; -#endif - -@end - -@implementation PINProgressiveImage - -@synthesize progressThresholds = _progressThresholds; -@synthesize estimatedRemainingTimeThreshold = _estimatedRemainingTimeThreshold; - -- (nonnull instancetype)initWithDataTask:(nonnull NSURLSessionDataTask *)dataTask -{ - if (self = [super init]) { - self.lock = [[PINRemoteLock alloc] initWithName:@"PINProgressiveImage"]; - - _dataTask = dataTask; - _imageSource = CGImageSourceCreateIncremental(NULL);; - self.size = CGSizeZero; - self.isProgressiveJPEG = NO; - self.currentThreshold = 0; - self.progressThresholds = @[@0.00, @0.35, @0.65]; - self.estimatedRemainingTimeThreshold = -1; - self.sosCount = 0; - self.scannedByte = 0; -#if DEBUG - self.scanTime = 0; -#endif - } - return self; -} - -- (void)dealloc -{ - [self.lock lock]; - if (self.imageSource) { - CFRelease(_imageSource); - } - [self.lock unlock]; -} - -#pragma mark - public - -- (void)setProgressThresholds:(NSArray *)progressThresholds -{ - // There's no reason to set an empty progress thresholds array, instead don't use the progressive feature - if (progressThresholds.count > 0) { - [self.lock lock]; - _progressThresholds = [progressThresholds copy]; - [self.lock unlock]; - } -} - -- (NSArray *)progressThresholds -{ - [self.lock lock]; - NSArray *progressThresholds = _progressThresholds; - [self.lock unlock]; - return progressThresholds; -} - -- (void)setEstimatedRemainingTimeThreshold:(CFTimeInterval)estimatedRemainingTimeThreshold -{ - [self.lock lock]; - _estimatedRemainingTimeThreshold = estimatedRemainingTimeThreshold; - [self.lock unlock]; -} - -- (CFTimeInterval)estimatedRemainingTimeThreshold -{ - [self.lock lock]; - CFTimeInterval estimatedRemainingTimeThreshold = _estimatedRemainingTimeThreshold; - [self.lock unlock]; - return estimatedRemainingTimeThreshold; -} - -- (CFTimeInterval)estimatedRemainingTime -{ - __block CFTimeInterval estimatedRemainingTime; - [self.lock lockWithBlock:^{ - estimatedRemainingTime = [self l_estimatedRemainingTime]; - }]; - return estimatedRemainingTime; -} - -- (CFTimeInterval)l_estimatedRemainingTime -{ - if (_dataTask.countOfBytesExpectedToReceive == NSURLSessionTransferSizeUnknown) { - return MAXFLOAT; - } - NSUInteger remainingBytes = (NSUInteger)_dataTask.countOfBytesExpectedToReceive - (NSUInteger)_dataTask.countOfBytesReceived; - if (remainingBytes == 0) { - return 0; - } - - float bytesPerSecond = [[PINSpeedRecorder sharedRecorder] weightedAdjustedBytesPerSecondForHost:[_dataTask.currentRequest.URL host]]; - if (bytesPerSecond == -1) { - return MAXFLOAT; - } - return remainingBytes / bytesPerSecond; -} - -- (void)updateProgressiveImageWithData:(nonnull NSData *)data expectedNumberOfBytes:(int64_t)expectedNumberOfBytes isResume:(BOOL)isResume -{ - [self.lock lock]; - if (isResume) { - NSAssert(self.mutableData == nil, @"If we're resuming, data shouldn't be setup yet."); - self.startingBytes = data.length; - } - - if (self.mutableData == nil) { - NSUInteger bytesToAlloc = 0; - if (expectedNumberOfBytes > 0) { - bytesToAlloc = (NSUInteger)expectedNumberOfBytes; - } - self.mutableData = [[NSMutableData alloc] initWithCapacity:bytesToAlloc]; - self.expectedNumberOfBytes = expectedNumberOfBytes; - } - [self.mutableData appendData:data]; - - while ([self l_hasCompletedFirstScan] == NO && self.scannedByte < self.mutableData.length) { - #if DEBUG - CFTimeInterval start = CACurrentMediaTime(); - #endif - NSUInteger startByte = self.scannedByte; - if (startByte > 0) { - startByte--; - } - if ([self l_scanForSOSinData:self.mutableData startByte:startByte scannedByte:&_scannedByte]) { - self.sosCount++; - } - #if DEBUG - CFTimeInterval total = CACurrentMediaTime() - start; - self.scanTime += total; - #endif - } - - if (self.imageSource) { - CGImageSourceUpdateData(self.imageSource, (CFDataRef)self.mutableData, NO); - } - [self.lock unlock]; -} - -- (PINImage *)currentImageBlurred:(BOOL)blurred maxProgressiveRenderSize:(CGSize)maxProgressiveRenderSize renderedImageQuality:(out CGFloat *)renderedImageQuality -{ - [self.lock lock]; - if (self.imageSource == nil) { - [self.lock unlock]; - return nil; - } - - if (self.currentThreshold == _progressThresholds.count) { - [self.lock unlock]; - return nil; - } - - if (_estimatedRemainingTimeThreshold > 0 && [self l_estimatedRemainingTime] < _estimatedRemainingTimeThreshold) { - [self.lock unlock]; - return nil; - } - - if ([self l_hasCompletedFirstScan] == NO) { - [self.lock unlock]; - return nil; - } - - #if DEBUG - if (self.scanTime > 0) { - PINLog(@"scan time: %f", self.scanTime); - self.scanTime = 0; - } - #endif - - PINImage *currentImage = nil; - - //Size information comes after JFIF so jpeg properties should be available at or before size? - if (self.size.width <= 0 || self.size.height <= 0) { - //attempt to get size info - NSDictionary *imageProperties = (NSDictionary *)CFBridgingRelease(CGImageSourceCopyPropertiesAtIndex(self.imageSource, 0, NULL)); - CGSize size = self.size; - if (size.width <= 0 && imageProperties[(NSString *)kCGImagePropertyPixelWidth]) { - size.width = [imageProperties[(NSString *)kCGImagePropertyPixelWidth] floatValue]; - } - - if (size.height <= 0 && imageProperties[(NSString *)kCGImagePropertyPixelHeight]) { - size.height = [imageProperties[(NSString *)kCGImagePropertyPixelHeight] floatValue]; - } - - self.size = size; - - NSDictionary *jpegProperties = imageProperties[(NSString *)kCGImagePropertyJFIFDictionary]; - NSNumber *isProgressive = jpegProperties[(NSString *)kCGImagePropertyJFIFIsProgressive]; - self.isProgressiveJPEG = jpegProperties && [isProgressive boolValue]; - } - - if (self.size.width > maxProgressiveRenderSize.width || self.size.height > maxProgressiveRenderSize.height) { - [self.lock unlock]; - return nil; - } - - float progress = 0; - if (self.expectedNumberOfBytes > 0) { - progress = (float)self.mutableData.length / (float)self.expectedNumberOfBytes; - } - - //Don't bother if we're basically done - if (progress >= 0.99) { - [self.lock unlock]; - return nil; - } - - if (self.isProgressiveJPEG && self.size.width > 0 && self.size.height > 0 && progress > [_progressThresholds[self.currentThreshold] floatValue]) { - while (self.currentThreshold < _progressThresholds.count && progress > [_progressThresholds[self.currentThreshold] floatValue]) { - self.currentThreshold++; - } - PINLog(@"Generating preview image"); - CGImageRef image = CGImageSourceCreateImageAtIndex(self.imageSource, 0, NULL); - if (image) { - if (blurred) { - currentImage = [self l_postProcessImage:[PINImage imageWithCGImage:image] withProgress:progress]; - } else { - currentImage = [PINImage imageWithCGImage:image]; - } - CGImageRelease(image); - if (renderedImageQuality) { - *renderedImageQuality = progress; - } - } - } - - [self.lock unlock]; - return currentImage; -} - -- (NSData *)data -{ - [self.lock lock]; - NSData *data = [self.mutableData copy]; - [self.lock unlock]; - return data; -} - -#pragma mark - private - -- (BOOL)l_scanForSOSinData:(NSData *)data startByte:(NSUInteger)startByte scannedByte:(NSUInteger *)scannedByte -{ - //check if we have a complete scan - Byte scanMarker[2]; - //SOS marker - scanMarker[0] = 0xFF; - scanMarker[1] = 0xDA; - - //scan one byte back in case we only got half the SOS on the last data append - NSRange scanRange; - scanRange.location = startByte; - scanRange.length = data.length - scanRange.location; - NSRange sosRange = [data rangeOfData:[NSData dataWithBytes:scanMarker length:2] options:0 range:scanRange]; - if (sosRange.location != NSNotFound) { - if (scannedByte) { - *scannedByte = NSMaxRange(sosRange); - } - return YES; - } - if (scannedByte) { - *scannedByte = NSMaxRange(scanRange); - } - return NO; -} - -- (BOOL)l_hasCompletedFirstScan -{ - return self.sosCount >= 2; -} - -//Heavily cribbed from https://developer.apple.com/library/ios/samplecode/UIImageEffects/Listings/UIImageEffects_UIImageEffects_m.html#//apple_ref/doc/uid/DTS40013396-UIImageEffects_UIImageEffects_m-DontLinkElementID_9 -- (PINImage *)l_postProcessImage:(PINImage *)inputImage withProgress:(float)progress -{ - PINImage *outputImage = nil; - CGImageRef inputImageRef = CGImageRetain(inputImage.CGImage); - if (inputImageRef == nil) { - return nil; - } - - CGSize inputSize = inputImage.size; - if (inputSize.width < 1 || - inputSize.height < 1) { - CGImageRelease(inputImageRef); - return nil; - } - -#if PIN_TARGET_IOS - CGFloat imageScale = inputImage.scale; -#elif PIN_TARGET_MAC - // TODO: What scale factor should be used here? - CGFloat imageScale = [[NSScreen mainScreen] backingScaleFactor]; -#endif - - CGFloat radius = (inputImage.size.width / 25.0) * MAX(0, 1.0 - progress); - radius *= imageScale; - - //we'll round the radius to a whole number below anyway, - if (radius < FLT_EPSILON) { - CGImageRelease(inputImageRef); - return inputImage; - } - - CGContextRef ctx; -#if PIN_TARGET_IOS - UIGraphicsBeginImageContextWithOptions(inputSize, YES, imageScale); - ctx = UIGraphicsGetCurrentContext(); -#elif PIN_TARGET_MAC - ctx = CGBitmapContextCreate(0, inputSize.width, inputSize.height, 8, 0, [NSColorSpace genericRGBColorSpace].CGColorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little); -#endif - - if (ctx) { -#if PIN_TARGET_IOS - CGContextScaleCTM(ctx, 1.0, -1.0); - CGContextTranslateCTM(ctx, 0, -inputSize.height); -#endif - - vImage_Buffer effectInBuffer; - vImage_Buffer scratchBuffer; - - vImage_Buffer *inputBuffer; - vImage_Buffer *outputBuffer; - - vImage_CGImageFormat format = { - .bitsPerComponent = 8, - .bitsPerPixel = 32, - .colorSpace = NULL, - // (kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little) - // requests a BGRA buffer. - .bitmapInfo = kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Little, - .version = 0, - .decode = NULL, - .renderingIntent = kCGRenderingIntentDefault - }; - - vImage_Error e = vImageBuffer_InitWithCGImage(&effectInBuffer, &format, NULL, inputImage.CGImage, kvImagePrintDiagnosticsToConsole); - if (e == kvImageNoError) - { - e = vImageBuffer_Init(&scratchBuffer, effectInBuffer.height, effectInBuffer.width, format.bitsPerPixel, kvImageNoFlags); - if (e == kvImageNoError) { - inputBuffer = &effectInBuffer; - outputBuffer = &scratchBuffer; - - // A description of how to compute the box kernel width from the Gaussian - // radius (aka standard deviation) appears in the SVG spec: - // http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement - // - // For larger values of 's' (s >= 2.0), an approximation can be used: Three - // successive box-blurs build a piece-wise quadratic convolution kernel, which - // approximates the Gaussian kernel to within roughly 3%. - // - // let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) - // - // ... if d is odd, use three box-blurs of size 'd', centered on the output pixel. - // - if (radius - 2. < __FLT_EPSILON__) - radius = 2.; - uint32_t wholeRadius = floor((radius * 3. * sqrt(2 * M_PI) / 4 + 0.5) / 2); - - wholeRadius |= 1; // force wholeRadius to be odd so that the three box-blur methodology works. - - //calculate the size necessary for vImageBoxConvolve_ARGB8888, this does not actually do any operations. - NSInteger tempBufferSize = vImageBoxConvolve_ARGB8888(inputBuffer, outputBuffer, NULL, 0, 0, wholeRadius, wholeRadius, NULL, kvImageGetTempBufferSize | kvImageEdgeExtend); - void *tempBuffer = malloc(tempBufferSize); - - if (tempBuffer) { - //errors can be ignored because we've passed in allocated memory - vImageBoxConvolve_ARGB8888(inputBuffer, outputBuffer, tempBuffer, 0, 0, wholeRadius, wholeRadius, NULL, kvImageEdgeExtend); - vImageBoxConvolve_ARGB8888(outputBuffer, inputBuffer, tempBuffer, 0, 0, wholeRadius, wholeRadius, NULL, kvImageEdgeExtend); - vImageBoxConvolve_ARGB8888(inputBuffer, outputBuffer, tempBuffer, 0, 0, wholeRadius, wholeRadius, NULL, kvImageEdgeExtend); - - free(tempBuffer); - - //switch input and output - vImage_Buffer *temp = inputBuffer; - inputBuffer = outputBuffer; - outputBuffer = temp; - - CGImageRef effectCGImage = vImageCreateCGImageFromBuffer(inputBuffer, &format, &cleanupBuffer, NULL, kvImageNoAllocate, NULL); - if (effectCGImage == NULL) { - //if creating the cgimage failed, the cleanup buffer on input buffer will not be called, we must dealloc ourselves - free(inputBuffer->data); - } else { - // draw effect image - CGContextSaveGState(ctx); - CGContextDrawImage(ctx, CGRectMake(0, 0, inputSize.width, inputSize.height), effectCGImage); - CGContextRestoreGState(ctx); - CGImageRelease(effectCGImage); - } - - // Cleanup - free(outputBuffer->data); -#if PIN_TARGET_IOS - outputImage = UIGraphicsGetImageFromCurrentImageContext(); -#elif PIN_TARGET_MAC - CGImageRef outputImageRef = CGBitmapContextCreateImage(ctx); - outputImage = [[NSImage alloc] initWithCGImage:outputImageRef size:inputSize]; - CFRelease(outputImageRef); -#endif - - } - } else { - if (scratchBuffer.data) { - free(scratchBuffer.data); - } - free(effectInBuffer.data); - } - } else { - if (effectInBuffer.data) { - free(effectInBuffer.data); - } - } - } - -#if PIN_TARGET_IOS - UIGraphicsEndImageContext(); -#endif - - CGImageRelease(inputImageRef); - - return outputImage; -} - -// Helper function to handle deferred cleanup of a buffer. -static void cleanupBuffer(void *userData, void *buf_data) -{ - free(buf_data); -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.h deleted file mode 100644 index c669c3c..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PINRemoteImageBasicCache.h -// Pods -// -// Created by Aleksei Shevchenko on 7/28/16. -// -// - -#import <Foundation/Foundation.h> -#import "PINRemoteImageCaching.h" - -/** - * Simplistic <PINRemoteImageCacheProtocol> wrapper based on NSCache. - * - * No data is persisted on disk. The disk cache methods are no-op. - */ -@interface PINRemoteImageBasicCache : NSObject <PINRemoteImageCaching> - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.m deleted file mode 100644 index a3953ce..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageBasicCache.m +++ /dev/null @@ -1,99 +0,0 @@ -// -// PINRemoteImageBasicCache.m -// Pods -// -// Created by Aleksei Shevchenko on 7/28/16. -// -// - -#import "PINRemoteImageBasicCache.h" - -@interface PINRemoteImageBasicCache() -@property (nonatomic, strong) NSCache *cache; -@end - -@implementation PINRemoteImageBasicCache - -- (instancetype)init -{ - self = [super init]; - if (self) { - self.cache = [[NSCache alloc] init]; - } - return self; -} - -//****************************************************************************************************** -// Memory cache methods -//****************************************************************************************************** --(nullable id)objectFromMemoryForKey:(NSString *)key -{ - return [self.cache objectForKey:key]; -} - --(void)setObjectInMemory:(id)object forKey:(NSString *)key withCost:(NSUInteger)cost -{ - [self.cache setObject:object forKey:key cost:cost]; -} - -- (void)removeObjectForKeyFromMemory:(NSString *)key -{ - [self.cache removeObjectForKey:key]; -} - -//****************************************************************************************************** -// Disk cache methods -//****************************************************************************************************** --(nullable id)objectFromDiskForKey:(NSString *)key -{ - return nil; -} - --(void)objectFromDiskForKey:(NSString *)key completion:(PINRemoteImageCachingObjectBlock)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - if (completion) { - typeof(self) strongSelf = weakSelf; - completion(strongSelf, key, nil); - } - }); -} - --(void)setObjectOnDisk:(id)object forKey:(NSString *)key -{ - -} - -//****************************************************************************************************** -// Common methods, should apply to both in-memory and disk storage -//****************************************************************************************************** -- (BOOL)objectExistsForKey:(NSString *)key -{ - return [self.cache objectForKey:key] != nil; -} - -- (void)removeObjectForKey:(NSString *)key -{ - [self.cache removeObjectForKey:key]; -} - -- (void)removeObjectForKey:(NSString *)key completion:(PINRemoteImageCachingObjectBlock)completion -{ - __weak typeof(self) weakSelf = self; - id object = [self.cache objectForKey:key]; - [self.cache removeObjectForKey:key]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - if (completion) { - typeof(self) strongSelf = weakSelf; - completion(strongSelf, key, object); - } - }); -} - -- (void)removeAllObjects -{ - [self.cache removeAllObjects]; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.h deleted file mode 100644 index ebfbfc2..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// PINRemoteImageCallbacks.h -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageManager.h" - -@interface PINRemoteImageCallbacks : NSObject - -@property (atomic, strong, nullable) PINRemoteImageManagerImageCompletion completionBlock; -@property (atomic, strong, nullable) PINRemoteImageManagerImageCompletion progressImageBlock; -@property (atomic, strong, nullable) PINRemoteImageManagerProgressDownload progressDownloadBlock; -@property (assign, readonly) CFTimeInterval requestTime; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.m deleted file mode 100644 index f64795b..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCallbacks.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// PINRemoteImageCallbacks.m -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import "PINRemoteImageCallbacks.h" - -@implementation PINRemoteImageCallbacks - -- (instancetype)init -{ - if (self = [super init]) { - _requestTime = CACurrentMediaTime(); - } - return self; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCategoryManager.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCategoryManager.m deleted file mode 100644 index 54635d6..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageCategoryManager.m +++ /dev/null @@ -1,268 +0,0 @@ -// -// PINRemoteImageCategory.m -// Pods -// -// Created by Garrett Moon on 11/4/14. -// -// - -#import "PINRemoteImageCategoryManager.h" - -#import <objc/runtime.h> - -@implementation PINRemoteImageCategoryManager - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url -{ - [self setImageOnView:view fromURL:url placeholderImage:nil]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url - placeholderImage:(PINImage *)placeholderImage -{ - [self setImageOnView:view fromURL:url placeholderImage:placeholderImage completion:nil]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url - completion:(PINRemoteImageManagerImageCompletion)completion -{ - [self setImageOnView:view fromURL:url placeholderImage:nil completion:completion]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url - placeholderImage:(PINImage *)placeholderImage - completion:(PINRemoteImageManagerImageCompletion)completion -{ - [self setImageOnView:view - fromURLs:url?@[url]:nil - placeholderImage:placeholderImage - processorKey:nil - processor:nil - completion:completion]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor -{ - [self setImageOnView:view - fromURL:url - processorKey:processorKey - processor:processor - completion:nil]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url - placeholderImage:(PINImage *)placeholderImage - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor -{ - [self setImageOnView:view - fromURLs:url?@[url]:nil - placeholderImage:placeholderImage - processorKey:processorKey - processor:processor - completion:nil]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURL:(NSURL *)url - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor - completion:(PINRemoteImageManagerImageCompletion)completion -{ - [self setImageOnView:view - fromURLs:url?@[url]:nil - placeholderImage:nil - processorKey:processorKey - processor:processor - completion:completion]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURLs:(NSArray <NSURL *> *)urls -{ - [self setImageOnView:view - fromURLs:urls - placeholderImage:nil]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURLs:(NSArray <NSURL *> *)urls - placeholderImage:(PINImage *)placeholderImage -{ - [self setImageOnView:view - fromURLs:urls - placeholderImage:placeholderImage - completion:nil]; -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURLs:(NSArray <NSURL *> *)urls - placeholderImage:(PINImage *)placeholderImage - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self setImageOnView:view - fromURLs:urls - placeholderImage:placeholderImage - processorKey:nil - processor:nil - completion:completion]; -} - -+ (NSUUID *)downloadImageOperationUUIDOnView:(id <PINRemoteImageCategory>)view -{ - return (NSUUID *)objc_getAssociatedObject(view, @selector(downloadImageOperationUUIDOnView:)); -} - -+ (void)setDownloadImageOperationUUID:(NSUUID *)downloadImageOperationUUID onView:(id <PINRemoteImageCategory>)view -{ - objc_setAssociatedObject(view, @selector(downloadImageOperationUUIDOnView:), downloadImageOperationUUID, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -+ (BOOL)updateWithProgressOnView:(id <PINRemoteImageCategory>)view -{ - return [(NSNumber *)objc_getAssociatedObject(view, @selector(updateWithProgressOnView:)) boolValue]; -} - -+ (void)setUpdateWithProgressOnView:(BOOL)updateWithProgress onView:(id <PINRemoteImageCategory>)view -{ - objc_setAssociatedObject(view, @selector(updateWithProgressOnView:), [NSNumber numberWithBool:updateWithProgress], OBJC_ASSOCIATION_RETAIN); -} - -+ (void)cancelImageDownloadOnView:(id <PINRemoteImageCategory>)view -{ - if ([self downloadImageOperationUUIDOnView:view]) { - [[PINRemoteImageManager sharedImageManager] cancelTaskWithUUID:[self downloadImageOperationUUIDOnView:view]]; - [self setDownloadImageOperationUUID:nil onView:view]; - } -} - -+ (void)setImageOnView:(id <PINRemoteImageCategory>)view - fromURLs:(NSArray <NSURL *> *)urls - placeholderImage:(PINImage *)placeholderImage - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor - completion:(PINRemoteImageManagerImageCompletion)completion -{ - if (![NSThread isMainThread]) { - dispatch_async(dispatch_get_main_queue(), ^{ - [self setImageOnView:view - fromURLs:urls - placeholderImage:placeholderImage - processorKey:processorKey - processor:processor - completion:completion]; - }); - return; - } - - [self cancelImageDownloadOnView:view]; - - if (placeholderImage) { - [view pin_setPlaceholderWithImage:placeholderImage]; - } - - if (urls == nil || urls.count == 0) { - if (!placeholderImage) { - [view pin_clearImages]; - } - return; - } - - PINRemoteImageManagerDownloadOptions options; - if([view respondsToSelector:@selector(pin_defaultOptions)]) { - options = [view pin_defaultOptions]; - } else { - options = PINRemoteImageManagerDownloadOptionsNone; - } - - if ([view pin_ignoreGIFs]) { - options |= PINRemoteImageManagerDisallowAlternateRepresentations; - } - - PINRemoteImageManagerImageCompletion internalProgress = nil; - if ([self updateWithProgressOnView:view] && processorKey.length <= 0 && processor == nil) { - internalProgress = ^(PINRemoteImageManagerResult *result) - { - void (^mainQueue)(void) = ^{ - //if result.UUID is nil, we returned immediately and want this result - NSUUID *currentUUID = [self downloadImageOperationUUIDOnView:view]; - if (![currentUUID isEqual:result.UUID] && result.UUID != nil) { - return; - } - if (result.image) { - [view pin_updateUIWithRemoteImageManagerResult:result]; - - } - }; - if ([NSThread isMainThread]) { - mainQueue(); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - mainQueue(); - }); - } - }; - } - - PINRemoteImageManagerImageCompletion internalCompletion = ^(PINRemoteImageManagerResult *result) - { - void (^mainQueue)(void) = ^{ - //if result.UUID is nil, we returned immediately and want this result - NSUUID *currentUUID = [self downloadImageOperationUUIDOnView:view]; - if (![currentUUID isEqual:result.UUID] && result.UUID != nil) { - return; - } - [self setDownloadImageOperationUUID:nil onView:view]; - if (result.error) { - if (completion) { - completion(result); - } - return; - } - - [view pin_updateUIWithRemoteImageManagerResult:result]; - - if (completion) { - completion(result); - } - }; - if ([NSThread isMainThread]) { - mainQueue(); - } else { - dispatch_async(dispatch_get_main_queue(), ^{ - mainQueue(); - }); - } - }; - - NSUUID *downloadImageOperationUUID = nil; - if (urls.count > 1) { - downloadImageOperationUUID = [[PINRemoteImageManager sharedImageManager] downloadImageWithURLs:urls - options:options - progressImage:internalProgress - completion:internalCompletion]; - } else if (processorKey.length > 0 && processor) { - downloadImageOperationUUID = [[PINRemoteImageManager sharedImageManager] downloadImageWithURL:urls[0] - options:options - processorKey:processorKey - processor:processor - completion:internalCompletion]; - } else { - downloadImageOperationUUID = [[PINRemoteImageManager sharedImageManager] downloadImageWithURL:urls[0] - options:options - progressImage:internalProgress - completion:internalCompletion]; - } - - [self setDownloadImageOperationUUID:downloadImageOperationUUID onView:view]; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.h deleted file mode 100644 index 574a280..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// PINRemoteImageDownloadQueue.h -// PINRemoteImage -// -// Created by Garrett Moon on 3/1/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageManager.h" - -@class PINURLSessionManager; - -NS_ASSUME_NONNULL_BEGIN - -typedef void (^PINRemoteImageDownloadCompletion)(NSURLResponse * _Nullable response, NSError *error); - -@interface PINRemoteImageDownloadQueue : NSObject - -@property (atomic, assign) NSUInteger maxNumberOfConcurrentDownloads; - -- (instancetype)init NS_UNAVAILABLE; -+ (PINRemoteImageDownloadQueue *)queueWithMaxConcurrentDownloads:(NSUInteger)maxNumberOfConcurrentDownloads; - -- (NSURLSessionDataTask *)addDownloadWithSessionManager:(PINURLSessionManager *)sessionManager - request:(NSURLRequest *)request - priority:(PINRemoteImageManagerPriority)priority - completionHandler:(PINRemoteImageDownloadCompletion)completionHandler; - -/*** - This prevents a task from being run if it hasn't already started yet. It is the caller's responsibility to cancel - the task if it has already been started. - - @return BOOL Returns YES if the task was in the queue. - */ -- (BOOL)removeDownloadTaskFromQueue:(NSURLSessionDataTask *)downloadTask; - -/* - This sets the tasks priority of execution. It is the caller's responsibility to set the priority on the task itself - for NSURLSessionManager. - */ -- (void)setQueuePriority:(PINRemoteImageManagerPriority)priority forTask:(NSURLSessionDataTask *)downloadTask; - -NS_ASSUME_NONNULL_END - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.m deleted file mode 100644 index 07e70f2..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadQueue.m +++ /dev/null @@ -1,177 +0,0 @@ -// -// PINRemoteImageDownloadQueue.m -// PINRemoteImage -// -// Created by Garrett Moon on 3/1/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINRemoteImageDownloadQueue.h" - -#import "PINURLSessionManager.h" -#import "PINRemoteLock.h" - -@interface PINRemoteImageDownloadQueue () -{ - PINRemoteLock *_lock; - - NSMutableOrderedSet <NSURLSessionDataTask *> *_highPriorityQueuedOperations; - NSMutableOrderedSet <NSURLSessionDataTask *> *_defaultPriorityQueuedOperations; - NSMutableOrderedSet <NSURLSessionDataTask *> *_lowPriorityQueuedOperations; - NSMutableSet <NSURLSessionTask *> *_runningTasks; -} - -@end - -@implementation PINRemoteImageDownloadQueue - -@synthesize maxNumberOfConcurrentDownloads = _maxNumberOfConcurrentDownloads; - -+ (PINRemoteImageDownloadQueue *)queueWithMaxConcurrentDownloads:(NSUInteger)maxNumberOfConcurrentDownloads -{ - return [[PINRemoteImageDownloadQueue alloc] initWithMaxConcurrentDownloads:maxNumberOfConcurrentDownloads]; -} - -- (PINRemoteImageDownloadQueue *)initWithMaxConcurrentDownloads:(NSUInteger)maxNumberOfConcurrentDownloads -{ - if (self = [super init]) { - _maxNumberOfConcurrentDownloads = maxNumberOfConcurrentDownloads; - - _lock = [[PINRemoteLock alloc] initWithName:@"PINRemoteImageDownloadQueue Lock"]; - _highPriorityQueuedOperations = [[NSMutableOrderedSet alloc] init]; - _defaultPriorityQueuedOperations = [[NSMutableOrderedSet alloc] init]; - _lowPriorityQueuedOperations = [[NSMutableOrderedSet alloc] init]; - _runningTasks = [[NSMutableSet alloc] init]; - } - return self; -} - -- (NSUInteger)maxNumberOfConcurrentDownloads -{ - [self lock]; - NSUInteger maxNumberOfConcurrentDownloads = _maxNumberOfConcurrentDownloads; - [self unlock]; - return maxNumberOfConcurrentDownloads; -} - -- (void)setMaxNumberOfConcurrentDownloads:(NSUInteger)maxNumberOfConcurrentDownloads -{ - [self lock]; - _maxNumberOfConcurrentDownloads = maxNumberOfConcurrentDownloads; - [self unlock]; - - [self scheduleDownloadsIfNeeded]; -} - -- (NSURLSessionDataTask *)addDownloadWithSessionManager:(PINURLSessionManager *)sessionManager - request:(NSURLRequest *)request - priority:(PINRemoteImageManagerPriority)priority - completionHandler:(PINRemoteImageDownloadCompletion)completionHandler -{ - NSURLSessionDataTask *dataTask = [sessionManager dataTaskWithRequest:request - priority:priority - completionHandler:^(NSURLSessionTask *task, NSError *error) { - completionHandler(task.response, error); - [self lock]; - [self->_runningTasks removeObject:task]; - [self unlock]; - - [self scheduleDownloadsIfNeeded]; - }]; - - [self setQueuePriority:priority forTask:dataTask addIfNecessary:YES]; - - [self scheduleDownloadsIfNeeded]; - - return dataTask; -} - -- (void)scheduleDownloadsIfNeeded -{ - [self lock]; - while (_runningTasks.count < _maxNumberOfConcurrentDownloads) { - NSMutableOrderedSet <NSURLSessionDataTask *> *queue = nil; - if (_highPriorityQueuedOperations.count > 0) { - queue = _highPriorityQueuedOperations; - } else if (_defaultPriorityQueuedOperations.count > 0) { - queue = _defaultPriorityQueuedOperations; - } else if (_lowPriorityQueuedOperations.count > 0) { - queue = _lowPriorityQueuedOperations; - } - - if (!queue) { - break; - } - - NSURLSessionDataTask *task = [queue firstObject]; - [queue removeObjectAtIndex:0]; - [task resume]; - - [_runningTasks addObject:task]; - } - [self unlock]; -} - -- (BOOL)removeDownloadTaskFromQueue:(NSURLSessionDataTask *)downloadTask -{ - BOOL containsTask = NO; - [self lock]; - if ([_highPriorityQueuedOperations containsObject:downloadTask]) { - containsTask = YES; - [_highPriorityQueuedOperations removeObject:downloadTask]; - } else if ([_defaultPriorityQueuedOperations containsObject:downloadTask]) { - containsTask = YES; - [_defaultPriorityQueuedOperations removeObject:downloadTask]; - } else if ([_lowPriorityQueuedOperations containsObject:downloadTask]) { - containsTask = YES; - [_lowPriorityQueuedOperations removeObject:downloadTask]; - } - [self unlock]; - return containsTask; -} - -- (void)setQueuePriority:(PINRemoteImageManagerPriority)priority forTask:(NSURLSessionDataTask *)downloadTask -{ - [self setQueuePriority:priority forTask:downloadTask addIfNecessary:NO]; -} - -- (void)setQueuePriority:(PINRemoteImageManagerPriority)priority forTask:(NSURLSessionDataTask *)downloadTask addIfNecessary:(BOOL)addIfNecessary -{ - BOOL containsTask = [self removeDownloadTaskFromQueue:downloadTask]; - - if (containsTask || addIfNecessary) { - NSMutableOrderedSet <NSURLSessionDataTask *> *queue = nil; - [self lock]; - switch (priority) { - case PINRemoteImageManagerPriorityLow: - queue = _lowPriorityQueuedOperations; - break; - - case PINRemoteImageManagerPriorityDefault: - queue = _defaultPriorityQueuedOperations; - break; - - case PINRemoteImageManagerPriorityHigh: - queue = _highPriorityQueuedOperations; - break; - - default: - NSAssert(NO, @"invalid priority: %tu", priority); - break; - } - [queue addObject:downloadTask]; - [self unlock]; - } -} - -- (void)lock -{ - [_lock lock]; -} - -- (void)unlock -{ - [_lock unlock]; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.h deleted file mode 100644 index bcd434d..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// PINRemoteImageDownloadTask.h -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#if SWIFT_PACKAGE -@import PINOperation; -#else -#import <PINOperation/PINOperation.h> -#endif - -#import "PINRemoteImageManager+Private.h" -#import "PINRemoteImageTask.h" -#import "PINProgressiveImage.h" -#import "PINResume.h" - -@interface PINRemoteImageDownloadTask : PINRemoteImageTask - -@property (nonatomic, strong, nullable, readonly) NSURL *URL; -@property (nonatomic, copy, nullable) NSString *ifRange; -@property (nonatomic, copy, readonly, nullable) NSData *data; - -@property (nonatomic, readonly) CFTimeInterval estimatedRemainingTime; - -- (void)scheduleDownloadWithRequest:(nonnull NSURLRequest *)request - resume:(nullable PINResume *)resume - skipRetry:(BOOL)skipRetry - priority:(PINRemoteImageManagerPriority)priority - completionHandler:(nonnull PINRemoteImageManagerDataCompletion)completionHandler; - -- (void)didReceiveData:(nonnull NSData *)data; -- (void)didReceiveResponse:(nonnull NSURLResponse *)response; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.m deleted file mode 100644 index b1b261d..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageDownloadTask.m +++ /dev/null @@ -1,380 +0,0 @@ -// -// PINRemoteImageDownloadTask.m -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import "PINRemoteImageDownloadTask.h" - -#import "PINRemoteImageTask+Subclassing.h" -#import "PINRemoteImage.h" -#import "PINRemoteImageCallbacks.h" -#import "PINRemoteLock.h" -#import "PINSpeedRecorder.h" - -@interface PINRemoteImageDownloadTask () -{ - PINProgressiveImage *_progressImage; - PINResume *_resume; - id<PINRequestRetryStrategy> _retryStrategy; -} - -@end - -@implementation PINRemoteImageDownloadTask - -- (instancetype)initWithManager:(PINRemoteImageManager *)manager -{ - if (self = [super initWithManager:manager]) { - _retryStrategy = manager.retryStrategyCreationBlock(); - } - return self; -} - -- (void)callProgressDownload -{ - NSDictionary *callbackBlocks = self.callbackBlocks; - #if PINRemoteImageLogging - NSString *key = self.key; - #endif - - __block int64_t completedBytes; - __block int64_t totalBytes; - - [self.lock lockWithBlock:^{ - completedBytes = self->_progressImage.dataTask.countOfBytesReceived; - totalBytes = self->_progressImage.dataTask.countOfBytesExpectedToReceive; - }]; - - [callbackBlocks enumerateKeysAndObjectsUsingBlock:^(NSUUID *UUID, PINRemoteImageCallbacks *callback, BOOL *stop) { - PINRemoteImageManagerProgressDownload progressDownloadBlock = callback.progressDownloadBlock; - if (progressDownloadBlock != nil) { - PINLog(@"calling progress for UUID: %@ key: %@", UUID, key); - dispatch_async(self.manager.callbackQueue, ^ - { - progressDownloadBlock(completedBytes, totalBytes); - }); - } - }]; -} - -- (void)callProgressImageWithImage:(nonnull PINImage *)image renderedImageQuality:(CGFloat)renderedImageQuality -{ - NSDictionary *callbackBlocks = self.callbackBlocks; -#if PINRemoteImageLogging - NSString *key = self.key; -#endif - - - [callbackBlocks enumerateKeysAndObjectsUsingBlock:^(NSUUID *UUID, PINRemoteImageCallbacks *callback, BOOL *stop) { - PINRemoteImageManagerImageCompletion progressImageBlock = callback.progressImageBlock; - if (progressImageBlock != nil) { - PINLog(@"calling progress for UUID: %@ key: %@", UUID, key); - CFTimeInterval requestTime = callback.requestTime; - - dispatch_async(self.manager.callbackQueue, ^ - { - progressImageBlock([PINRemoteImageManagerResult imageResultWithImage:image - alternativeRepresentation:nil - requestLength:CACurrentMediaTime() - requestTime - resultType:PINRemoteImageResultTypeProgress - UUID:UUID - response:nil - error:nil - renderedImageQuality:renderedImageQuality]); - }); - } - }]; -} - -- (BOOL)cancelWithUUID:(NSUUID *)UUID resume:(PINResume **)resume -{ - __block BOOL noMoreCompletions; - __block PINResume *strongResume; - BOOL hasResume = resume != nil; - [self.lock lockWithBlock:^{ - if (hasResume) { - //consider skipping cancellation if there's a request for resume data and the time to start the connection is greater than - //the time remaining to download. - NSTimeInterval timeToFirstByte = [[PINSpeedRecorder sharedRecorder] weightedTimeToFirstByteForHost:self->_progressImage.dataTask.currentRequest.URL.host]; - if (self->_progressImage.estimatedRemainingTime <= timeToFirstByte) { - noMoreCompletions = NO; - return; - } - } - - noMoreCompletions = [super l_cancelWithUUID:UUID]; - - if (noMoreCompletions) { - [self.manager.urlSessionTaskQueue removeDownloadTaskFromQueue:self->_progressImage.dataTask]; - [self->_progressImage.dataTask cancel]; - - if (hasResume && self->_ifRange && self->_progressImage.dataTask.countOfBytesExpectedToReceive > 0 && self->_progressImage.dataTask.countOfBytesExpectedToReceive != NSURLSessionTransferSizeUnknown) { - NSData *progressData = self->_progressImage.data; - if (progressData.length > 0) { - strongResume = [PINResume resumeData:progressData ifRange:self->_ifRange totalBytes:self->_progressImage.dataTask.countOfBytesExpectedToReceive]; - } - } - - PINLog(@"Canceling download of URL: %@, UUID: %@", _progressImage.dataTask.originalRequest.URL, UUID); - } -#if PINRemoteImageLogging - else { - PINLog(@"Decrementing download of URL: %@, UUID: %@", _progressImage.dataTask.originalRequest.URL, UUID); - } -#endif - }]; - - if (hasResume) { - *resume = strongResume; - } - - return noMoreCompletions; -} - -- (void)setPriority:(PINRemoteImageManagerPriority)priority -{ - [super setPriority:priority]; - if (@available(iOS 8.0, macOS 10.10, tvOS 9.0, watchOS 2.0, *)) { - [self.lock lockWithBlock:^{ - NSURLSessionDataTask *dataTask = self->_progressImage.dataTask; - if (dataTask) { - dataTask.priority = dataTaskPriorityWithImageManagerPriority(priority); - [self.manager.urlSessionTaskQueue setQueuePriority:priority forTask:dataTask]; - } - }]; - } -} - -- (NSURL *)URL -{ - __block NSURL *url; - [self.lock lockWithBlock:^{ - url = self->_progressImage.dataTask.originalRequest.URL; - }]; - return url; -} - -- (nonnull PINRemoteImageManagerResult *)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - error:(nullable NSError *)error - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)UUID - response:(nonnull NSURLResponse *)response -{ - __block NSUInteger bytesSavedByResuming; - [self.lock lockWithBlock:^{ - bytesSavedByResuming = self->_resume.resumeData.length; - }]; - return [PINRemoteImageManagerResult imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:requestLength - resultType:resultType - UUID:UUID - response:response - error:error - bytesSavedByResuming:bytesSavedByResuming]; -} - -- (void)didReceiveData:(NSData *_Nonnull)data -{ - [self callProgressDownload]; - - __block int64_t expectedNumberOfBytes; - [self.lock lockWithBlock:^{ - expectedNumberOfBytes = self->_progressImage.dataTask.countOfBytesExpectedToReceive; - }]; - - [self updateData:data isResume:NO expectedBytes:expectedNumberOfBytes]; -} - -- (void)updateData:(NSData *)data isResume:(BOOL)isResume expectedBytes:(int64_t)expectedBytes -{ - __block PINProgressiveImage *progressImage; - __block BOOL hasProgressBlocks = NO; - [self.lock lockWithBlock:^{ - progressImage = self->_progressImage; - [[self l_callbackBlocks] enumerateKeysAndObjectsUsingBlock:^(NSUUID *UUID, PINRemoteImageCallbacks *callback, BOOL *stop) { - if (callback.progressImageBlock) { - hasProgressBlocks = YES; - *stop = YES; - } - }]; - }]; - - [progressImage updateProgressiveImageWithData:data expectedNumberOfBytes:expectedBytes isResume:isResume]; - - if (hasProgressBlocks) { - if (PINNSOperationSupportsBlur) { - [self.manager.concurrentOperationQueue scheduleOperation:^{ - CGFloat renderedImageQuality = 1.0; - PINImage *image = [progressImage currentImageBlurred:self.manager.shouldBlurProgressive maxProgressiveRenderSize:self.manager.maxProgressiveRenderSize renderedImageQuality:&renderedImageQuality]; - if (image) { - [self callProgressImageWithImage:image renderedImageQuality:renderedImageQuality]; - } - } withPriority:PINOperationQueuePriorityLow]; - } - } -} - -- (void)didReceiveResponse:(nonnull NSURLResponse *)response -{ - if ([response isKindOfClass:[NSHTTPURLResponse class]]) { - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; - - // Got partial data back for a resume - if (httpResponse.statusCode == 206) { - __block PINResume *resume; - [self.lock lockWithBlock:^{ - resume = self->_resume; - }]; - - [self updateData:resume.resumeData isResume:YES expectedBytes:resume.totalBytes]; - } else { - //Check if there's resume data and we didn't get back a 206, get rid of it - [self.lock lockWithBlock:^{ - self->_resume = nil; - }]; - } - - // Check to see if the server supports resume - if ([[httpResponse allHeaderFields][@"Accept-Ranges"] isEqualToString:@"bytes"]) { - NSString *ifRange = nil; - NSString *etag = nil; - - if ((etag = [httpResponse allHeaderFields][@"ETag"])) { - if ([etag hasPrefix:@"W/"] == NO) { - ifRange = etag; - } - } else { - ifRange = [httpResponse allHeaderFields][@"Last-Modified"]; - } - - if (ifRange.length > 0) { - [self.lock lockWithBlock:^{ - self->_ifRange = ifRange; - }]; - } - } - } -} - -- (void)scheduleDownloadWithRequest:(nonnull NSURLRequest *)request - resume:(nullable PINResume *)resume - skipRetry:(BOOL)skipRetry - priority:(PINRemoteImageManagerPriority)priority - completionHandler:(nonnull PINRemoteImageManagerDataCompletion)completionHandler -{ - [self scheduleDownloadWithRequest:request resume:resume skipRetry:skipRetry priority:priority isRetry:NO completionHandler:completionHandler]; -} - -- (void)scheduleDownloadWithRequest:(NSURLRequest *)request - resume:(PINResume *)resume - skipRetry:(BOOL)skipRetry - priority:(PINRemoteImageManagerPriority)priority - isRetry:(BOOL)isRetry - completionHandler:(PINRemoteImageManagerDataCompletion)completionHandler -{ - [self.lock lockWithBlock:^{ - if (self->_progressImage != nil || [self l_callbackBlocks].count == 0 || (isRetry == NO && self->_retryStrategy.numberOfRetries > 0)) { - return; - } - self->_resume = resume; - - NSURLRequest *adjustedRequest = request; - if (self->_resume) { - NSMutableURLRequest *mutableRequest = [request mutableCopy]; - NSMutableDictionary *headers = [[mutableRequest allHTTPHeaderFields] mutableCopy]; - headers[@"If-Range"] = self->_resume.ifRange; - headers[@"Range"] = [NSString stringWithFormat:@"bytes=%tu-", self->_resume.resumeData.length]; - mutableRequest.allHTTPHeaderFields = headers; - adjustedRequest = mutableRequest; - } - - self->_progressImage = [[PINProgressiveImage alloc] initWithDataTask:[self.manager.urlSessionTaskQueue addDownloadWithSessionManager:self.manager.sessionManager - request:adjustedRequest - priority:priority - completionHandler:^(NSURLResponse * _Nonnull response, NSError * _Nonnull remoteError) - { - [self.manager.concurrentOperationQueue scheduleOperation:^{ - NSError *error = remoteError; -#if PINRemoteImageLogging - if (error && error.code != NSURLErrorCancelled) { - PINLog(@"Failed downloading image: %@ with error: %@", request.URL, error); - } else if (error == nil && response.expectedContentLength == 0) { - PINLog(@"image is empty at URL: %@", request.URL); - } else { - PINLog(@"Finished downloading image: %@", request.URL); - } -#endif - - if (error.code != NSURLErrorCancelled) { - NSData *data = self.progressImage.data; - - if (error == nil && data == nil) { - error = [NSError errorWithDomain:PINRemoteImageManagerErrorDomain - code:PINRemoteImageManagerErrorImageEmpty - userInfo:nil]; - } - - __block BOOL retry = NO; - __block int64_t delay = 0; - [self.lock lockWithBlock:^{ - retry = skipRetry == NO && [self->_retryStrategy shouldRetryWithError:error]; - if (retry) { - // Clear out the existing progress image or else new data from retry will be appended - self->_progressImage = nil; - [self->_retryStrategy incrementRetryCount]; - delay = [self->_retryStrategy nextDelay]; - } - }]; - if (retry) { - PINLog(@"Retrying download of %@ in %lld seconds.", request.URL, delay); - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [self scheduleDownloadWithRequest:request resume:nil skipRetry:skipRetry priority:priority isRetry:YES completionHandler:completionHandler]; - }); - return; - } - - completionHandler(data, response, error); - } - }]; - }]]; - }]; -} - -- (PINProgressiveImage *)progressImage -{ - __block PINProgressiveImage *progressImage = nil; - [self.lock lockWithBlock:^{ - progressImage = self->_progressImage; - }]; - return progressImage; -} - -+ (BOOL)retriableError:(NSError *)remoteImageError -{ - if ([remoteImageError.domain isEqualToString:PINURLErrorDomain]) { - return remoteImageError.code >= 500; - } else if ([remoteImageError.domain isEqualToString:NSURLErrorDomain] && remoteImageError.code == NSURLErrorUnsupportedURL) { - return NO; - } else if ([remoteImageError.domain isEqualToString:PINRemoteImageManagerErrorDomain]) { - return NO; - } - return YES; -} - -- (CFTimeInterval)estimatedRemainingTime -{ - return self.progressImage.estimatedRemainingTime; -} - -- (NSData *)data -{ - return self.progressImage.data; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager+Private.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager+Private.h deleted file mode 100644 index 39550e3..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager+Private.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// PINRemoteImageManager+Private.h -// PINRemoteImage -// -// Created by Garrett Moon on 5/18/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#ifndef PINRemoteImageManager_Private_h -#define PINRemoteImageManager_Private_h - -#import "PINRemoteImageDownloadQueue.h" - -typedef void (^PINRemoteImageManagerDataCompletion)(NSData *data, NSURLResponse *response, NSError *error); - -@interface PINRemoteImageManager (PrivateExtension) - -@property (nonatomic, strong, readonly) dispatch_queue_t callbackQueue; -@property (nonatomic, strong, readonly) PINOperationQueue *concurrentOperationQueue; -@property (nonatomic, strong, readonly) PINRemoteImageDownloadQueue *urlSessionTaskQueue; -@property (nonatomic, strong, readonly) PINURLSessionManager *sessionManager; - -@property (nonatomic, readonly) NSArray <NSNumber *> *progressThresholds; -@property (nonatomic, readonly) NSTimeInterval estimatedRemainingTimeThreshold; -@property (nonatomic, readonly) BOOL shouldBlurProgressive; -@property (nonatomic, readonly) CGSize maxProgressiveRenderSize; - -@end - -#endif /* PINRemoteImageManager_Private_h */ diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager.m deleted file mode 100644 index 5ef8ac1..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManager.m +++ /dev/null @@ -1,1651 +0,0 @@ -// -// PINRemoteImageManager.m -// Pods -// -// Created by Garrett Moon on 8/17/14. -// -// - -#import "PINRemoteImageManager.h" - -#import <CommonCrypto/CommonDigest.h> - -#if SWIFT_PACKAGE -@import PINOperation; -#else -#import <PINOperation/PINOperation.h> -#endif - -#import <objc/runtime.h> - -#import "PINAlternateRepresentationProvider.h" -#import "PINRemoteImage.h" -#import "PINRemoteImageManagerConfiguration.h" -#import "PINRemoteLock.h" -#import "PINProgressiveImage.h" -#import "PINRemoteImageCallbacks.h" -#import "PINRemoteImageTask.h" -#import "PINRemoteImageProcessorTask.h" -#import "PINRemoteImageDownloadTask.h" -#import "PINResume.h" -#import "PINRemoteImageMemoryContainer.h" -#import "PINRemoteImageCaching.h" -#import "PINRequestRetryStrategy.h" -#import "PINRemoteImageDownloadQueue.h" -#import "PINRequestRetryStrategy.h" -#import "PINSpeedRecorder.h" -#import "PINURLSessionManager.h" - -#import "NSData+ImageDetectors.h" -#import "PINImage+DecodedImage.h" -#import "PINImage+ScaledImage.h" -#import "PINRemoteImageManager+Private.h" -#import "NSHTTPURLResponse+MaxAge.h" - -#if USE_PINCACHE -#import "PINCache+PINRemoteImageCaching.h" -#else -#import "PINRemoteImageBasicCache.h" -#endif - - -#define PINRemoteImageManagerDefaultTimeout 30.0 -//A limit of 200 characters is chosen because PINDiskCache -//may expand the length by encoding certain characters -#define PINRemoteImageManagerCacheKeyMaxLength 200 - -PINOperationQueuePriority operationPriorityWithImageManagerPriority(PINRemoteImageManagerPriority priority); -PINOperationQueuePriority operationPriorityWithImageManagerPriority(PINRemoteImageManagerPriority priority) { - switch (priority) { - case PINRemoteImageManagerPriorityLow: - return PINOperationQueuePriorityLow; - break; - - case PINRemoteImageManagerPriorityDefault: - return PINOperationQueuePriorityDefault; - break; - - case PINRemoteImageManagerPriorityHigh: - return PINOperationQueuePriorityHigh; - break; - } -} - -float dataTaskPriorityWithImageManagerPriority(PINRemoteImageManagerPriority priority) { - switch (priority) { - case PINRemoteImageManagerPriorityLow: - return 0.0; - break; - - case PINRemoteImageManagerPriorityDefault: - return 0.5; - break; - - case PINRemoteImageManagerPriorityHigh: - return 1.0; - break; - } -} - -// Reference: https://github.com/TextureGroup/Texture/blob/5dd5611/Source/Private/ASInternalHelpers.m#L60 -BOOL PINRemoteImageManagerSubclassOverridesSelector(Class subclass, SEL selector) -{ - Class superclass = [PINRemoteImageManager class]; - if (superclass == subclass) return NO; // Even if the class implements the selector, it doesn't override itself. - Method superclassMethod = class_getInstanceMethod(superclass, selector); - Method subclassMethod = class_getInstanceMethod(subclass, selector); - return (superclassMethod != subclassMethod); -} - -NSErrorDomain const PINRemoteImageManagerErrorDomain = @"PINRemoteImageManagerErrorDomain"; -NSString * const PINRemoteImageWeakTaskKey = @"PINRemoteImageWeakTaskKey"; -NSString * const PINRemoteImageCacheKeyResumePrefix = @"R-"; -typedef void (^PINRemoteImageManagerDataCompletion)(NSData *data, NSURLResponse *response, NSError *error); - -@interface PINRemoteImageWeakTask : NSObject - -@property (nonatomic, readonly, weak) PINRemoteImageTask *task; - -- (instancetype)initWithTask:(PINRemoteImageTask *)task; - -@end - -@implementation PINRemoteImageWeakTask - -- (instancetype)initWithTask:(PINRemoteImageTask *)task -{ - if (self = [super init]) { - _task = task; - } - return self; -} - -@end - -@interface PINRemoteImageManager () <PINURLSessionManagerDelegate> -{ - dispatch_queue_t _callbackQueue; - PINRemoteLock *_lock; - PINOperationQueue *_concurrentOperationQueue; - PINRemoteImageDownloadQueue *_urlSessionTaskQueue; - - // Necessary to have a strong reference to _defaultAlternateRepresentationProvider because _alternateRepProvider is __weak - PINAlternateRepresentationProvider *_defaultAlternateRepresentationProvider; - __weak PINAlternateRepresentationProvider *_alternateRepProvider; - NSURLSessionConfiguration *_sessionConfiguration; - -} - -@property (nonatomic, strong) id<PINRemoteImageCaching> cache; -@property (nonatomic, strong) PINURLSessionManager *sessionManager; -@property (nonatomic, strong) NSMutableDictionary <NSString *, __kindof PINRemoteImageTask *> *tasks; -@property (nonatomic, strong) NSHashTable <NSUUID *> *canceledTasks; -@property (nonatomic, strong) NSMapTable <NSUUID *, PINRemoteImageTask *> *UUIDToTask; -@property (nonatomic, strong) NSArray <NSNumber *> *progressThresholds; -@property (nonatomic, assign) BOOL shouldBlurProgressive; -@property (nonatomic, assign) CGSize maxProgressiveRenderSize; -@property (nonatomic, assign) NSTimeInterval estimatedRemainingTimeThreshold; -@property (nonatomic, strong) dispatch_queue_t callbackQueue; -@property (nonatomic, strong) PINOperationQueue *concurrentOperationQueue; -@property (nonatomic, strong) PINRemoteImageDownloadQueue *urlSessionTaskQueue; -@property (nonatomic, assign) float highQualityBPSThreshold; -@property (nonatomic, assign) float lowQualityBPSThreshold; -@property (nonatomic, assign) BOOL shouldUpgradeLowQualityImages; -@property (nonatomic, strong) PINRemoteImageManagerMetrics metricsCallback API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); -@property (nonatomic, copy) PINRemoteImageManagerAuthenticationChallenge authenticationChallengeHandler; -@property (nonatomic, copy) id<PINRequestRetryStrategy> (^retryStrategyCreationBlock)(void); -@property (nonatomic, copy) PINRemoteImageManagerRequestConfigurationHandler requestConfigurationHandler; -@property (nonatomic, strong) NSMutableDictionary <NSString *, NSString *> *httpHeaderFields; -@property (nonatomic, readonly) BOOL diskCacheTTLIsEnabled; -@property (nonatomic, readonly) BOOL memoryCacheTTLIsEnabled; -#if DEBUG -@property (nonatomic, assign) NSUInteger totalDownloads; -#endif - -@end - -#pragma mark PINRemoteImageManager - -@implementation PINRemoteImageManager - -static PINRemoteImageManager *sharedImageManager = nil; -static dispatch_once_t sharedDispatchToken; - -+ (instancetype)sharedImageManager -{ - dispatch_once(&sharedDispatchToken, ^{ - sharedImageManager = [[[self class] alloc] init]; - }); - return sharedImageManager; -} - -+ (void)setSharedImageManagerWithConfiguration:(NSURLSessionConfiguration *)configuration -{ - NSAssert(sharedImageManager == nil, @"sharedImageManager singleton is already configured"); - - dispatch_once(&sharedDispatchToken, ^{ - sharedImageManager = [[[self class] alloc] initWithSessionConfiguration:configuration]; - }); -} - -- (instancetype)init -{ - return [self initWithSessionConfiguration:nil]; -} - -- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)sessionConfiguration -{ - return [self initWithSessionConfiguration:sessionConfiguration alternativeRepresentationProvider:nil]; -} - -- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)sessionConfiguration alternativeRepresentationProvider:(id <PINRemoteImageManagerAlternateRepresentationProvider>)alternateRepProvider -{ - return [self initWithSessionConfiguration:sessionConfiguration alternativeRepresentationProvider:alternateRepProvider imageCache:nil managerConfiguration:nil]; -} - -- (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)sessionConfiguration - alternativeRepresentationProvider:(nullable id <PINRemoteImageManagerAlternateRepresentationProvider>)alternateRepDelegate - imageCache:(nullable id<PINRemoteImageCaching>)imageCache { - return [self initWithSessionConfiguration:sessionConfiguration alternativeRepresentationProvider:alternateRepDelegate imageCache:imageCache managerConfiguration:nil]; -} - --(nonnull instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)sessionConfiguration - alternativeRepresentationProvider:(id<PINRemoteImageManagerAlternateRepresentationProvider>)alternateRepProvider - imageCache:(id<PINRemoteImageCaching>)imageCache - managerConfiguration:(nullable PINRemoteImageManagerConfiguration *)managerConfiguration -{ - if (self = [super init]) { - PINRemoteImageManagerConfiguration *configuration = managerConfiguration; - if (!configuration) { - configuration = [[PINRemoteImageManagerConfiguration alloc] init]; - } - - if (imageCache) { - self.cache = imageCache; - } else if (PINRemoteImageManagerSubclassOverridesSelector([self class], @selector(defaultImageCache))) { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - self.cache = [self defaultImageCache]; -#pragma clang diagnostic pop - } else { - self.cache = [[self class] defaultImageCache]; - } - - if ([self.cache respondsToSelector:@selector(setObjectOnDisk:forKey:withAgeLimit:)] && - [self.cache respondsToSelector:@selector(setObjectInMemory:forKey:withCost:withAgeLimit:)] && - [self.cache respondsToSelector:@selector(diskCacheIsTTLCache)] && - [self.cache respondsToSelector:@selector(memoryCacheIsTTLCache)]) { - _diskCacheTTLIsEnabled = [self.cache diskCacheIsTTLCache]; - _memoryCacheTTLIsEnabled = [self.cache memoryCacheIsTTLCache]; - } - - _sessionConfiguration = [sessionConfiguration copy]; - if (!_sessionConfiguration) { - _sessionConfiguration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; - _sessionConfiguration.timeoutIntervalForRequest = PINRemoteImageManagerDefaultTimeout; - _sessionConfiguration.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData; - _sessionConfiguration.URLCache = nil; - _sessionConfiguration.HTTPMaximumConnectionsPerHost = PINRemoteImageHTTPMaximumConnectionsPerHost; - } - - _callbackQueue = dispatch_queue_create("PINRemoteImageManagerCallbackQueue", DISPATCH_QUEUE_CONCURRENT); - _lock = [[PINRemoteLock alloc] initWithName:@"PINRemoteImageManager"]; - - _concurrentOperationQueue = [[PINOperationQueue alloc] initWithMaxConcurrentOperations: configuration.maxConcurrentOperations]; - _urlSessionTaskQueue = [PINRemoteImageDownloadQueue queueWithMaxConcurrentDownloads:configuration.maxConcurrentDownloads]; - - self.sessionManager = [[PINURLSessionManager alloc] initWithSessionConfiguration:_sessionConfiguration]; - self.sessionManager.delegate = self; - - self.estimatedRemainingTimeThreshold = configuration.estimatedRemainingTimeThreshold; - - _highQualityBPSThreshold = configuration.highQualityBPSThreshold; - _lowQualityBPSThreshold = configuration.lowQualityBPSThreshold; - _shouldUpgradeLowQualityImages = configuration.shouldUpgradeLowQualityImages; - _shouldBlurProgressive = configuration.shouldBlurProgressive; - _maxProgressiveRenderSize = configuration.maxProgressiveRenderSize; - self.tasks = [[NSMutableDictionary alloc] init]; - self.canceledTasks = [[NSHashTable alloc] initWithOptions:NSHashTableWeakMemory capacity:5]; - self.UUIDToTask = [NSMapTable weakToWeakObjectsMapTable]; - - if (alternateRepProvider == nil) { - _defaultAlternateRepresentationProvider = [[PINAlternateRepresentationProvider alloc] init]; - alternateRepProvider = _defaultAlternateRepresentationProvider; - } - _alternateRepProvider = alternateRepProvider; - __weak typeof(self) weakSelf = self; - _retryStrategyCreationBlock = ^id<PINRequestRetryStrategy>{ - return [weakSelf defaultRetryStrategy]; - }; - _httpHeaderFields = [[NSMutableDictionary alloc] init]; - } - return self; -} - -- (id<PINRequestRetryStrategy>)defaultRetryStrategy { - return [[PINRequestExponentialRetryStrategy alloc] initWithRetryMaxCount:3 delayBase:4]; -} - -- (void)dealloc -{ - [self.sessionManager invalidateSessionAndCancelTasks]; -} - -- (id<PINRemoteImageCaching>)defaultImageCache { - return [PINRemoteImageManager defaultImageCache]; -} - -+ (id<PINRemoteImageCaching>)defaultImageCache { - return [PINRemoteImageManager defaultImageCacheEnablingTtl:NO]; -} - -+ (id<PINRemoteImageCaching>)defaultImageTtlCache { - return [PINRemoteImageManager defaultImageCacheEnablingTtl:YES]; -} - -+ (id<PINRemoteImageCaching>)defaultImageCacheEnablingTtl:(BOOL)enableTtl -{ -#if USE_PINCACHE - NSString * const kPINRemoteImageDiskCacheName = @"PINRemoteImageManagerCache"; - NSString * const kPINRemoteImageDiskCacheVersionKey = @"kPINRemoteImageDiskCacheVersionKey"; - const NSInteger kPINRemoteImageDiskCacheVersion = 1; - NSUserDefaults *pinDefaults = [[NSUserDefaults alloc] init]; - - NSString *cacheURLRoot = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) objectAtIndex:0]; - - if ([pinDefaults integerForKey:kPINRemoteImageDiskCacheVersionKey] != kPINRemoteImageDiskCacheVersion) { - //remove the old version of the disk cache - NSURL *diskCacheURL = [PINDiskCache cacheURLWithRootPath:cacheURLRoot prefix:PINDiskCachePrefix name:kPINRemoteImageDiskCacheName]; - NSFileManager *fileManager = [NSFileManager defaultManager]; - NSURL *dstURL = [[[NSURL alloc] initFileURLWithPath:NSTemporaryDirectory()] URLByAppendingPathComponent:kPINRemoteImageDiskCacheName]; - [fileManager moveItemAtURL:diskCacheURL toURL:dstURL error:nil]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [fileManager removeItemAtURL:dstURL error:nil]; - }); - [pinDefaults setInteger:kPINRemoteImageDiskCacheVersion forKey:kPINRemoteImageDiskCacheVersionKey]; - } - - PINCache *pinCache = [[PINCache alloc] initWithName:kPINRemoteImageDiskCacheName rootPath:cacheURLRoot serializer:^NSData * _Nonnull(id<NSCoding> _Nonnull object, NSString * _Nonnull key) { - id <NSCoding, NSObject> obj = (id <NSCoding, NSObject>)object; - if ([key hasPrefix:PINRemoteImageCacheKeyResumePrefix]) { - return [NSKeyedArchiver archivedDataWithRootObject:obj]; - } - return (NSData *)object; - } deserializer:^id<NSCoding> _Nonnull(NSData * _Nonnull data, NSString * _Nonnull key) { - if ([key hasPrefix:PINRemoteImageCacheKeyResumePrefix]) { - return [NSKeyedUnarchiver unarchiveObjectWithData:data]; - } - return data; - } keyEncoder:nil keyDecoder:nil ttlCache:enableTtl]; - - return pinCache; -#else - return [[PINRemoteImageBasicCache alloc] init]; -#endif -} - -- (void)lockOnMainThread -{ -#if !DEBUG - NSAssert(NO, @"lockOnMainThread should only be called for testing on debug builds!"); -#endif - [_lock lock]; -} - -- (void)lock -{ - NSAssert([NSThread isMainThread] == NO, @"lock should not be called from the main thread!"); - [_lock lock]; -} - -- (void)unlock -{ - [_lock unlock]; -} - -- (void)setValue:(nullable NSString *)value forHTTPHeaderField:(nullable NSString *)header { - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.httpHeaderFields[[header copy]] = [value copy]; - [strongSelf unlock]; - }); -} - -- (void)setRequestConfiguration:(PINRemoteImageManagerRequestConfigurationHandler)configurationBlock { - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.requestConfigurationHandler = configurationBlock; - [strongSelf unlock]; - }); -} - -- (void)setAuthenticationChallenge:(PINRemoteImageManagerAuthenticationChallenge)challengeBlock { - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.authenticationChallengeHandler = challengeBlock; - [strongSelf unlock]; - }); -} - -- (void)setMaxNumberOfConcurrentOperations:(NSInteger)maxNumberOfConcurrentOperations completion:(dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.concurrentOperationQueue.maxConcurrentOperations = maxNumberOfConcurrentOperations; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setMaxNumberOfConcurrentDownloads:(NSInteger)maxNumberOfConcurrentDownloads completion:(dispatch_block_t)completion -{ - NSAssert(maxNumberOfConcurrentDownloads <= PINRemoteImageHTTPMaximumConnectionsPerHost, @"maxNumberOfConcurrentDownloads must be less than or equal to %d", PINRemoteImageHTTPMaximumConnectionsPerHost); - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.urlSessionTaskQueue.maxNumberOfConcurrentDownloads = maxNumberOfConcurrentDownloads; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setEstimatedRemainingTimeThresholdForProgressiveDownloads:(NSTimeInterval)estimatedRemainingTimeThreshold completion:(dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.estimatedRemainingTimeThreshold = estimatedRemainingTimeThreshold; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setProgressThresholds:(NSArray *)progressThresholds completion:(dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.progressThresholds = progressThresholds; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setProgressiveRendersShouldBlur:(BOOL)shouldBlur completion:(nullable dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.shouldBlurProgressive = shouldBlur; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setProgressiveRendersMaxProgressiveRenderSize:(CGSize)maxProgressiveRenderSize completion:(nullable dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.maxProgressiveRenderSize = maxProgressiveRenderSize; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setHighQualityBPSThreshold:(float)highQualityBPSThreshold completion:(dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.highQualityBPSThreshold = highQualityBPSThreshold; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setLowQualityBPSThreshold:(float)lowQualityBPSThreshold completion:(dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.lowQualityBPSThreshold = lowQualityBPSThreshold; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setShouldUpgradeLowQualityImages:(BOOL)shouldUpgradeLowQualityImages completion:(dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf lock]; - strongSelf.shouldUpgradeLowQualityImages = shouldUpgradeLowQualityImages; - [strongSelf unlock]; - if (completion) { - completion(); - } - }); -} - -- (void)setMetricsCallback:(nullable PINRemoteImageManagerMetrics)metricsCallback completion:(nullable dispatch_block_t)completion -{ - __weak typeof(self) weakSelf = self; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - typeof(self) strongSelf = weakSelf; - [self lock]; - strongSelf.metricsCallback = metricsCallback; - [self unlock]; - if (completion) { - completion(); - } - }); -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:PINRemoteImageManagerDownloadOptionsNone - completion:completion]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:options - progressImage:nil - completion:completion]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:options - progressImage:progressImage - progressDownload:nil - completion:completion]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - progressDownload:(PINRemoteImageManagerProgressDownload)progressDownload - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:options - progressImage:nil - progressDownload:progressDownload - completion:completion]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(PINRemoteImageManagerProgressDownload)progressDownload - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:options - priority:PINRemoteImageManagerPriorityDefault - progressImage:progressImage - progressDownload:progressDownload - completion:completion]; -} - -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - priority:(PINRemoteImageManagerPriority)priority - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion; -{ - return [self downloadImageWithURL:url - options:options - priority:priority - processorKey:nil - processor:nil - progressImage:progressImage - progressDownload:progressDownload - completion:completion - inputUUID:nil]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:options - priority:PINRemoteImageManagerPriorityDefault - processorKey:processorKey - processor:processor - progressImage:nil - progressDownload:nil - completion:completion - inputUUID:nil]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor - progressDownload:(PINRemoteImageManagerProgressDownload)progressDownload - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURL:url - options:options - priority:PINRemoteImageManagerPriorityDefault - processorKey:processorKey - processor:processor - progressImage:nil - progressDownload:progressDownload - completion:completion - inputUUID:nil]; -} - -- (NSUUID *)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - priority:(PINRemoteImageManagerPriority)priority - processorKey:(NSString *)processorKey - processor:(PINRemoteImageManagerImageProcessor)processor - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(PINRemoteImageManagerProgressDownload)progressDownload - completion:(PINRemoteImageManagerImageCompletion)completion - inputUUID:(NSUUID *)UUID -{ - NSAssert((processor != nil && processorKey.length > 0) || (processor == nil && processorKey == nil), @"processor must not be nil and processorKey length must be greater than zero OR processor must be nil and processorKey must be nil"); - - Class taskClass; - if (processor && processorKey.length > 0) { - taskClass = [PINRemoteImageProcessorTask class]; - } else { - taskClass = [PINRemoteImageDownloadTask class]; - } - - NSString *key = [self cacheKeyForURL:url processorKey:processorKey]; - - if (url == nil) { - [self earlyReturnWithOptions:options url:nil key:key object:nil completion:completion]; - return nil; - } - - NSAssert([url isKindOfClass:[NSURL class]], @"url must be of type NSURL, if it's an NSString, we'll try to correct"); - if ([url isKindOfClass:[NSString class]]) { - url = [NSURL URLWithString:(NSString *)url]; - } - - if (UUID == nil) { - UUID = [NSUUID UUID]; - } - - if ((options & PINRemoteImageManagerDownloadOptionsIgnoreCache) == 0) { - //Check to see if the image is in memory cache and we're on the main thread. - //If so, special case this to avoid flashing the UI - id object = [self.cache objectFromMemoryForKey:key]; - if (object) { - if ([self earlyReturnWithOptions:options url:url key:key object:object completion:completion]) { - return nil; - } - } - } - - if ([url.scheme isEqualToString:@"data"]) { - NSData *data = [NSData dataWithContentsOfURL:url]; - if (data) { - if ([self earlyReturnWithOptions:options url:url key:key object:data completion:completion]) { - return nil; - } - } - } - - [_concurrentOperationQueue scheduleOperation:^ - { - [self lock]; - //check canceled tasks first - if ([self.canceledTasks containsObject:UUID]) { - PINLog(@"skipping starting %@ because it was canceled.", UUID); - [self unlock]; - return; - } - - PINRemoteImageTask *task = [self.tasks objectForKey:key]; - BOOL taskExisted = NO; - if (task == nil) { - task = [[taskClass alloc] initWithManager:self]; - PINLog(@"Task does not exist creating with key: %@, URL: %@, UUID: %@, task: %p", key, url, UUID, task); - task.key = key; - } else { - taskExisted = YES; - PINLog(@"Task exists, attaching with key: %@, URL: %@, UUID: %@, task: %@", key, url, UUID, task); - } - [task addCallbacksWithCompletionBlock:completion progressImageBlock:progressImage progressDownloadBlock:progressDownload withUUID:UUID]; - [self.tasks setObject:task forKey:key]; - // Relax :), task retain the UUID for us, it's ok to have a weak reference to UUID here. - [self.UUIDToTask setObject:task forKey:UUID]; - - NSAssert(taskClass == [task class], @"Task class should be the same!"); - [self unlock]; - - if (taskExisted == NO) { - [self.concurrentOperationQueue scheduleOperation:^ - { - [self objectForKey:key options:options completion:^(BOOL found, BOOL valid, PINImage *image, id alternativeRepresentation) { - if (found) { - if (valid) { - [self callCompletionsWithKey:key image:image alternativeRepresentation:alternativeRepresentation cached:YES response:nil error:nil finalized:YES]; - } else { - //Remove completion and try again - [self lock]; - PINRemoteImageTask *task = [self.tasks objectForKey:key]; - [task removeCallbackWithUUID:UUID]; - if (task.callbackBlocks.count == 0) { - [self.tasks removeObjectForKey:key]; - } - [self unlock]; - - //Skip early check - [self downloadImageWithURL:url - options:options | PINRemoteImageManagerDownloadOptionsSkipEarlyCheck - priority:priority - processorKey:processorKey - processor:processor - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - progressDownload:nil - completion:completion - inputUUID:UUID]; - } - } else { - if ([taskClass isSubclassOfClass:[PINRemoteImageProcessorTask class]]) { - //continue processing - [self downloadImageWithURL:url - options:options - priority:priority - key:key - processor:processor - UUID:UUID]; - } else if ([taskClass isSubclassOfClass:[PINRemoteImageDownloadTask class]]) { - //continue downloading - [self downloadImageWithURL:url - options:options - priority:priority - key:key - progressImage:progressImage - UUID:UUID]; - } - } - }]; - } withPriority:operationPriorityWithImageManagerPriority(priority)]; - } - } withPriority:operationPriorityWithImageManagerPriority(priority)]; - - return UUID; -} - -- (void)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - priority:(PINRemoteImageManagerPriority)priority - key:(NSString *)key - processor:(PINRemoteImageManagerImageProcessor)processor - UUID:(NSUUID *)UUID -{ - PINRemoteImageProcessorTask *task = nil; - [self lock]; - task = [self.tasks objectForKey:key]; - //check processing task still exists and download hasn't been started for another task - if (task == nil || task.downloadTaskUUID != nil) { - [self unlock]; - return; - } - - __weak typeof(self) weakSelf = self; - NSUUID *downloadTaskUUID = [self downloadImageWithURL:url - options:options | PINRemoteImageManagerDownloadOptionsSkipEarlyCheck - completion:^(PINRemoteImageManagerResult *result) - { - typeof(self) strongSelf = weakSelf; - NSUInteger processCost = 0; - NSError *error = result.error; - PINRemoteImageProcessorTask *task = nil; - [strongSelf lock]; - task = [strongSelf.tasks objectForKey:key]; - [strongSelf unlock]; - //check processing task still exists - if (task == nil) { - return; - } - if (result.image && error == nil) { - //If completionBlocks.count == 0, we've canceled before we were even able to start. - PINImage *image = processor(result, &processCost); - - if (image == nil) { - error = [NSError errorWithDomain:PINRemoteImageManagerErrorDomain - code:PINRemoteImageManagerErrorFailedToProcessImage - userInfo:nil]; - } - [strongSelf callCompletionsWithKey:key image:image alternativeRepresentation:nil cached:NO response:result.response error:error finalized:NO]; - - if (error == nil && image != nil) { - BOOL saveAsJPEG = (options & PINRemoteImageManagerSaveProcessedImageAsJPEG) != 0; - NSData *diskData = nil; - if (saveAsJPEG) { - diskData = PINImageJPEGRepresentation(image, 1.0); - } else { - diskData = PINImagePNGRepresentation(image); - } - - [strongSelf materializeAndCacheObject:image cacheInDisk:diskData additionalCost:processCost url:url key:key options:options outImage:nil outAltRep:nil]; - } - - [strongSelf callCompletionsWithKey:key image:image alternativeRepresentation:nil cached:NO response:result.response error:error finalized:YES]; - } else { - if (error == nil) { - error = [NSError errorWithDomain:PINRemoteImageManagerErrorDomain - code:PINRemoteImageManagerErrorFailedToFetchImageForProcessing - userInfo:nil]; - } - - [strongSelf callCompletionsWithKey:key image:nil alternativeRepresentation:nil cached:NO response:result.response error:error finalized:YES]; - } - }]; - task.downloadTaskUUID = downloadTaskUUID; - [self unlock]; -} - -- (void)downloadImageWithURL:(NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - priority:(PINRemoteImageManagerPriority)priority - key:(NSString *)key - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - UUID:(NSUUID *)UUID -{ - PINResume *resume = nil; - if ((options & PINRemoteImageManagerDownloadOptionsIgnoreCache) == NO) { - NSString *resumeKey = [self resumeCacheKeyForURL:url]; - resume = [self.cache objectFromDiskForKey:resumeKey]; - [self.cache removeObjectForKey:resumeKey completion:nil]; - } - - [self lock]; - PINRemoteImageDownloadTask *task = [self.tasks objectForKey:key]; - [self unlock]; - - [task scheduleDownloadWithRequest:[self requestWithURL:url task:task] - resume:resume - skipRetry:(options & PINRemoteImageManagerDownloadOptionsSkipRetry) - priority:priority - completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) - { - [self->_concurrentOperationQueue scheduleOperation:^ - { - NSError *remoteImageError = error; - PINImage *image = nil; - id alternativeRepresentation = nil; - NSNumber *maxAge = nil; - if (remoteImageError == nil) { - BOOL ignoreHeaders = (options & PINRemoteImageManagerDownloadOptionsIgnoreCacheControlHeaders) != 0; - if ((self.diskCacheTTLIsEnabled || self.memoryCacheTTLIsEnabled) && !ignoreHeaders) { - // examine Cache-Control headers (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) - if ([response isKindOfClass:[NSHTTPURLResponse class]]) { - NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response; - maxAge = [httpResponse findMaxAge]; - } - } - // Stores the object in the cache. - [self materializeAndCacheObject:data cacheInDisk:data additionalCost:0 maxAge:maxAge url:url key:key options:options outImage:&image outAltRep:&alternativeRepresentation]; - } - - if (error == nil && image == nil && alternativeRepresentation == nil) { - remoteImageError = [NSError errorWithDomain:PINRemoteImageManagerErrorDomain - code:PINRemoteImageManagerErrorFailedToDecodeImage - userInfo:nil]; - } - - [self callCompletionsWithKey:key image:image alternativeRepresentation:alternativeRepresentation cached:NO response:response error:remoteImageError finalized:YES]; - } withPriority:operationPriorityWithImageManagerPriority(priority)]; - }]; -} - --(BOOL)insertImageDataIntoCache:(nonnull NSData*)data - withURL:(nonnull NSURL *)url - processorKey:(nullable NSString *)processorKey - additionalCost:(NSUInteger)additionalCost -{ - - if (url != nil) { - NSString *key = [self cacheKeyForURL:url processorKey:processorKey]; - - PINRemoteImageManagerDownloadOptions options = PINRemoteImageManagerDownloadOptionsSkipDecode | PINRemoteImageManagerDownloadOptionsSkipEarlyCheck; - PINRemoteImageMemoryContainer *container = [[PINRemoteImageMemoryContainer alloc] init]; - container.data = data; - - return [self materializeAndCacheObject:container cacheInDisk:data additionalCost:additionalCost url:url key:key options:options outImage: nil outAltRep: nil]; - } - - return NO; -} - -- (BOOL)earlyReturnWithOptions:(PINRemoteImageManagerDownloadOptions)options url:(NSURL *)url key:(NSString *)key object:(id)object completion:(PINRemoteImageManagerImageCompletion)completion -{ - PINImage *image = nil; - id alternativeRepresentation = nil; - PINRemoteImageResultType resultType = PINRemoteImageResultTypeNone; - - BOOL allowEarlyReturn = !(PINRemoteImageManagerDownloadOptionsSkipEarlyCheck & options); - - if (url != nil && object != nil) { - resultType = PINRemoteImageResultTypeMemoryCache; - [self materializeAndCacheObject:object url:url key:key options:options outImage:&image outAltRep:&alternativeRepresentation]; - } - - if (completion && ((image || alternativeRepresentation) || (url == nil))) { - //If we're on the main thread, special case to call completion immediately - NSError *error = nil; - if (!url) { - error = [NSError errorWithDomain:NSURLErrorDomain - code:NSURLErrorUnsupportedURL - userInfo:@{ NSLocalizedDescriptionKey : @"unsupported URL" }]; - } - PINRemoteImageManagerResult *result = [PINRemoteImageManagerResult imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:0 - resultType:resultType - UUID:nil - response:nil - error:error]; - if (allowEarlyReturn && [NSThread isMainThread]) { - completion(result); - } else { - dispatch_async(self.callbackQueue, ^{ - completion(result); - }); - } - return YES; - } - return NO; -} - -- (NSURLRequest *)requestWithURL:(NSURL *)url task:(PINRemoteImageTask *)task -{ - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; - - NSMutableDictionary *headers = [self.httpHeaderFields mutableCopy]; - - if (headers.count > 0) { - request.allHTTPHeaderFields = headers; - } - - if (_requestConfigurationHandler) { - request = [_requestConfigurationHandler(request) mutableCopy]; - } - - PINRemoteImageWeakTask *weakTask = [[PINRemoteImageWeakTask alloc] initWithTask:task]; - [NSURLProtocol setProperty:weakTask forKey:PINRemoteImageWeakTaskKey inRequest:request]; - - return request; -} - -- (void)callCompletionsWithKey:(NSString *)key - image:(PINImage *)image - alternativeRepresentation:(id)alternativeRepresentation - cached:(BOOL)cached - response:(NSURLResponse *)response - error:(NSError *)error - finalized:(BOOL)finalized -{ - [self lock]; - PINRemoteImageDownloadTask *task = [self.tasks objectForKey:key]; - [task callCompletionsWithImage:image alternativeRepresentation:alternativeRepresentation cached:cached response:response error:error remove:!finalized]; - if (finalized) { - [self.tasks removeObjectForKey:key]; - } - [self unlock]; -} - -#pragma mark - Prefetching - -- (NSArray<NSUUID *> *)prefetchImagesWithURLs:(NSArray <NSURL *> *)urls -{ - return [self prefetchImagesWithURLs:urls options:PINRemoteImageManagerDownloadOptionsNone | PINRemoteImageManagerDownloadOptionsSkipEarlyCheck]; -} - -- (NSArray<NSUUID *> *)prefetchImagesWithURLs:(NSArray <NSURL *> *)urls options:(PINRemoteImageManagerDownloadOptions)options -{ - return [self prefetchImagesWithURLs:urls options:options priority:PINRemoteImageManagerPriorityLow]; -} - -- (NSArray<NSUUID *> *)prefetchImagesWithURLs:(NSArray <NSURL *> *)urls options:(PINRemoteImageManagerDownloadOptions)options priority:(PINRemoteImageManagerPriority)priority -{ - NSMutableArray *tasks = [NSMutableArray arrayWithCapacity:urls.count]; - for (NSURL *url in urls) { - NSUUID *task = [self prefetchImageWithURL:url options:options priority:priority]; - if (task != nil) { - [tasks addObject:task]; - } - } - return tasks; -} - -- (NSUUID *)prefetchImageWithURL:(NSURL *)url -{ - return [self prefetchImageWithURL:url options:PINRemoteImageManagerDownloadOptionsNone | PINRemoteImageManagerDownloadOptionsSkipEarlyCheck]; -} - -- (NSUUID *)prefetchImageWithURL:(NSURL *)url options:(PINRemoteImageManagerDownloadOptions)options -{ - return [self prefetchImageWithURL:url options:options priority:PINRemoteImageManagerPriorityLow]; -} - -- (NSUUID *)prefetchImageWithURL:(NSURL *)url options:(PINRemoteImageManagerDownloadOptions)options priority:(PINRemoteImageManagerPriority)priority -{ - return [self downloadImageWithURL:url - options:options - priority:priority - processorKey:nil - processor:nil - progressImage:nil - progressDownload:nil - completion:nil - inputUUID:nil]; -} - -#pragma mark - Cancellation & Priority - -- (void)cancelTaskWithUUID:(NSUUID *)UUID -{ - [self cancelTaskWithUUID:UUID storeResumeData:NO]; -} - -- (void)cancelTaskWithUUID:(nonnull NSUUID *)UUID storeResumeData:(BOOL)storeResumeData -{ - if (UUID == nil) { - return; - } - PINLog(@"Attempting to cancel UUID: %@", UUID); - [_concurrentOperationQueue scheduleOperation:^{ - PINResume *resume = nil; - [self lock]; - PINRemoteImageTask *taskToEvaluate = [self.UUIDToTask objectForKey:UUID]; - if (taskToEvaluate == nil) { - //maybe task hasn't been added to task list yet, add it to canceled tasks. - //there's no need to ever remove a UUID from canceledTasks because it is weak. - [self.canceledTasks addObject:UUID]; - } - - if ([taskToEvaluate cancelWithUUID:UUID resume:storeResumeData ? &resume : NULL]) { - [self.tasks removeObjectForKey:taskToEvaluate.key]; - } - [self unlock]; - - if (resume) { - //store resume data away, only download tasks currently return resume data - [self storeResumeData:resume forURL:[(PINRemoteImageDownloadTask *)taskToEvaluate URL]]; - } - } withPriority:PINOperationQueuePriorityHigh]; -} - -- (void)cancelAllTasks -{ - [self cancelAllTasksAndStoreResumeData:NO]; -} - -- (void)cancelAllTasksAndStoreResumeData:(BOOL)storeResumeData -{ - [_concurrentOperationQueue scheduleOperation:^{ - [self lock]; - NSMapTable<NSUUID *, PINRemoteImageTask *> *uuidToTask = [self.UUIDToTask copy]; - [self unlock]; - - for (NSUUID *uuid in uuidToTask) { - [self cancelTaskWithUUID:uuid storeResumeData:storeResumeData]; - } - } withPriority:PINOperationQueuePriorityHigh]; -} - -- (void)setPriority:(PINRemoteImageManagerPriority)priority ofTaskWithUUID:(NSUUID *)UUID -{ - if (UUID == nil) { - return; - } - PINLog(@"Setting priority of UUID: %@ priority: %lu", UUID, (unsigned long)priority); - [_concurrentOperationQueue scheduleOperation:^{ - [self lock]; - PINRemoteImageTask *task = [self.UUIDToTask objectForKey:UUID]; - [task setPriority:priority]; - [self unlock]; - } withPriority:PINOperationQueuePriorityHigh]; -} - -- (void)setProgressImageCallback:(nullable PINRemoteImageManagerImageCompletion)progressImageCallback ofTaskWithUUID:(nonnull NSUUID *)UUID -{ - if (UUID == nil) { - return; - } - - PINLog(@"setting progress block of UUID: %@ progressBlock: %@", UUID, progressImageCallback); - [_concurrentOperationQueue scheduleOperation:^{ - [self lock]; - PINRemoteImageTask *task = [self.UUIDToTask objectForKey:UUID]; - if ([task isKindOfClass:[PINRemoteImageDownloadTask class]]) { - PINRemoteImageCallbacks *callbacks = task.callbackBlocks[UUID]; - callbacks.progressImageBlock = progressImageCallback; - } - [self unlock]; - } withPriority:PINOperationQueuePriorityHigh]; -} - -- (void)setRetryStrategyCreationBlock:(id<PINRequestRetryStrategy> (^)(void))retryStrategyCreationBlock { - [_concurrentOperationQueue scheduleOperation:^{ - [self lock]; - self->_retryStrategyCreationBlock = retryStrategyCreationBlock; - [self unlock]; - } withPriority:PINOperationQueuePriorityHigh]; -} - -#pragma mark - Caching - -- (void)imageFromCacheWithCacheKey:(NSString *)cacheKey - completion:(PINRemoteImageManagerImageCompletion)completion -{ - [self imageFromCacheWithCacheKey:cacheKey options:PINRemoteImageManagerDownloadOptionsNone completion:completion]; -} - -- (void)imageFromCacheWithCacheKey:(NSString *)cacheKey - options:(PINRemoteImageManagerDownloadOptions)options - completion:(PINRemoteImageManagerImageCompletion)completion -{ - [self imageFromCacheWithURL:nil processorKey:nil cacheKey:cacheKey options:options completion:completion]; -} - -- (void)imageFromCacheWithURL:(nonnull NSURL *)url - processorKey:(nullable NSString *)processorKey - options:(PINRemoteImageManagerDownloadOptions)options - completion:(nonnull PINRemoteImageManagerImageCompletion)completion -{ - [self imageFromCacheWithURL:url processorKey:processorKey cacheKey:nil options:options completion:completion]; -} - -- (void)imageFromCacheWithURL:(NSURL *)url - processorKey:(NSString *)processorKey - cacheKey:(NSString *)cacheKey - options:(PINRemoteImageManagerDownloadOptions)options - completion:(PINRemoteImageManagerImageCompletion)completion -{ - CFTimeInterval requestTime = CACurrentMediaTime(); - - if ((PINRemoteImageManagerDownloadOptionsSkipEarlyCheck & options) == NO && [NSThread isMainThread]) { - PINRemoteImageManagerResult *result = [self synchronousImageFromCacheWithURL:url processorKey:processorKey cacheKey:cacheKey options:options]; - if (result.image && result.error == nil) { - completion((result)); - return; - } - } - - [self objectForURL:url processorKey:processorKey key:cacheKey options:options completion:^(BOOL found, BOOL valid, PINImage *image, id alternativeRepresentation) { - NSError *error = nil; - if (valid == NO) { - error = [NSError errorWithDomain:PINRemoteImageManagerErrorDomain - code:PINRemoteImageManagerErrorInvalidItemInCache - userInfo:nil]; - } - - dispatch_async(self.callbackQueue, ^{ - completion([PINRemoteImageManagerResult imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:CACurrentMediaTime() - requestTime - resultType:PINRemoteImageResultTypeCache - UUID:nil - response:nil - error:error]); - }); - }]; -} - -- (PINRemoteImageManagerResult *)synchronousImageFromCacheWithCacheKey:(NSString *)cacheKey options:(PINRemoteImageManagerDownloadOptions)options -{ - return [self synchronousImageFromCacheWithURL:nil processorKey:nil cacheKey:cacheKey options:options]; -} - -- (nonnull PINRemoteImageManagerResult *)synchronousImageFromCacheWithURL:(NSURL *)url processorKey:(nullable NSString *)processorKey options:(PINRemoteImageManagerDownloadOptions)options -{ - return [self synchronousImageFromCacheWithURL:url processorKey:processorKey cacheKey:nil options:options]; -} - -- (PINRemoteImageManagerResult *)synchronousImageFromCacheWithURL:(NSURL *)url processorKey:(NSString *)processorKey cacheKey:(NSString *)cacheKey options:(PINRemoteImageManagerDownloadOptions)options -{ - CFTimeInterval requestTime = CACurrentMediaTime(); - - if (cacheKey == nil && url == nil) { - return nil; - } - - cacheKey = cacheKey ?: [self cacheKeyForURL:url processorKey:processorKey]; - - id object = [self.cache objectFromMemoryForKey:cacheKey]; - PINImage *image; - id alternativeRepresentation; - NSError *error = nil; - if (object == nil) { - image = nil; - alternativeRepresentation = nil; - } else if ([self materializeAndCacheObject:object url:url key:cacheKey options:options outImage:&image outAltRep:&alternativeRepresentation] == NO) { - error = [NSError errorWithDomain:PINRemoteImageManagerErrorDomain - code:PINRemoteImageManagerErrorInvalidItemInCache - userInfo:nil]; - } - - return [PINRemoteImageManagerResult imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:CACurrentMediaTime() - requestTime - resultType:PINRemoteImageResultTypeMemoryCache - UUID:nil - response:nil - error:error]; -} - -#pragma mark - Session Task Blocks - -- (void)didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge forTask:(NSURLSessionTask *)dataTask completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler { - [self lock]; - if (self.authenticationChallengeHandler) { - self.authenticationChallengeHandler(dataTask, challenge, completionHandler); - } else { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } - [self unlock]; -} - -- (void)didReceiveResponse:(nonnull NSURLResponse *)response forTask:(nonnull NSURLSessionTask *)dataTask -{ - [self lock]; - PINRemoteImageWeakTask *weakTask = [NSURLProtocol propertyForKey:PINRemoteImageWeakTaskKey inRequest:dataTask.originalRequest]; - PINRemoteImageDownloadTask *task = (PINRemoteImageDownloadTask *)weakTask.task; - [self unlock]; - [task didReceiveResponse:response]; -} - -- (void)didReceiveData:(NSData *)data forTask:(NSURLSessionTask *)dataTask -{ - [self lock]; - PINRemoteImageWeakTask *weakTask = [NSURLProtocol propertyForKey:PINRemoteImageWeakTaskKey inRequest:dataTask.originalRequest]; - PINRemoteImageDownloadTask *task = (PINRemoteImageDownloadTask *)weakTask.task; - [self unlock]; - [task didReceiveData:data]; -} - -- (void)didCollectMetrics:(nonnull NSURLSessionTaskMetrics *)metrics forURL:(nonnull NSURL *)url API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) -{ - [self lock]; - if (self.metricsCallback) { - self.metricsCallback(url, metrics); - } - [self unlock]; -} - -#pragma mark - QOS - -- (NSUUID *)downloadImageWithURLs:(NSArray <NSURL *> *)urls - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(PINRemoteImageManagerImageCompletion)progressImage - completion:(PINRemoteImageManagerImageCompletion)completion -{ - return [self downloadImageWithURLs:urls - options:options - progressImage:progressImage - progressDownload:nil - completion:completion]; -} - -- (nullable NSUUID *)downloadImageWithURLs:(nonnull NSArray <NSURL *> *)urls - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion -{ - NSUUID *UUID = [NSUUID UUID]; - if (urls.count <= 1) { - NSURL *url = [urls firstObject]; - [self downloadImageWithURL:url - options:options - priority:PINRemoteImageManagerPriorityDefault - processorKey:nil - processor:nil - progressImage:progressImage - progressDownload:progressDownload - completion:completion - inputUUID:UUID]; - return UUID; - } - - [self.concurrentOperationQueue scheduleOperation:^{ - __block NSInteger highestQualityDownloadedIdx = -1; - - //check for the highest quality image already in cache. It's possible that an image is in the process of being - //cached when this is being run. In which case two things could happen: - // - If network conditions dictate that a lower quality image should be downloaded than the one that is currently - // being cached, it will be downloaded in addition. This is not ideal behavior, worst case scenario and unlikely. - // - If network conditions dictate that the same quality image should be downloaded as the one being cached, no - // new image will be downloaded as either the caching will have finished by the time we actually request it or - // the task will still exist and our callback will be attached. In this case, no detrimental behavior will have - // occurred. - [urls enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(NSURL *url, NSUInteger idx, BOOL *stop) { - NSAssert([url isKindOfClass:[NSURL class]], @"url must be of type URL"); - NSString *cacheKey = [self cacheKeyForURL:url processorKey:nil]; - - //we don't actually need the object, just need to know it exists so that we can request it later - BOOL hasObject = [self.cache objectExistsForKey:cacheKey]; - - if (hasObject) { - highestQualityDownloadedIdx = idx; - *stop = YES; - } - }]; - - [self lock]; - float highQualityQPSThreshold = [self highQualityBPSThreshold]; - float lowQualityQPSThreshold = [self lowQualityBPSThreshold]; - BOOL shouldUpgradeLowQualityImages = [self shouldUpgradeLowQualityImages]; - [self unlock]; - - NSUInteger desiredImageURLIdx = [PINSpeedRecorder appropriateImageIdxForURLsGivenHistoricalNetworkConditions:urls - lowQualityQPSThreshold:lowQualityQPSThreshold - highQualityQPSThreshold:highQualityQPSThreshold]; - - NSUInteger downloadIdx; - //if the highest quality already downloaded is less than what currentBPS would dictate and shouldUpgrade is - //set, download the new higher quality image. If no image has been cached, download the image dictated by - //current bps - - if ((highestQualityDownloadedIdx < desiredImageURLIdx && shouldUpgradeLowQualityImages) || highestQualityDownloadedIdx == -1) { - downloadIdx = desiredImageURLIdx; - } else { - downloadIdx = highestQualityDownloadedIdx; - } - - NSURL *downloadURL = [urls objectAtIndex:downloadIdx]; - - [self downloadImageWithURL:downloadURL - options:options - priority:PINRemoteImageManagerPriorityDefault - processorKey:nil - processor:nil - progressImage:progressImage - progressDownload:progressDownload - completion:^(PINRemoteImageManagerResult *result) { - //clean out any lower quality images from the cache - for (NSInteger idx = downloadIdx - 1; idx >= 0; idx--) { - [[self cache] removeObjectForKey:[self cacheKeyForURL:[urls objectAtIndex:idx] processorKey:nil]]; - } - - if (completion) { - completion(result); - } - } - inputUUID:UUID]; - } withPriority:PINOperationQueuePriorityDefault]; - return UUID; -} - -#pragma mark - Caching - -- (BOOL)materializeAndCacheObject:(id)object - url:(NSURL *)url - key:(NSString *)key - options:(PINRemoteImageManagerDownloadOptions)options - outImage:(PINImage **)outImage - outAltRep:(id *)outAlternateRepresentation -{ - return [self materializeAndCacheObject:object cacheInDisk:nil additionalCost:0 url:url key:key options:options outImage:outImage outAltRep:outAlternateRepresentation]; -} - -- (BOOL)materializeAndCacheObject:(id)object - cacheInDisk:(NSData *)diskData - additionalCost:(NSUInteger)additionalCost - url:(NSURL *)url - key:(NSString *)key - options:(PINRemoteImageManagerDownloadOptions)options - outImage:(PINImage **)outImage - outAltRep:(id *)outAlternateRepresentation { - return [self materializeAndCacheObject:object cacheInDisk:diskData additionalCost:additionalCost maxAge:nil url:url key:key options:options outImage:outImage outAltRep:outAlternateRepresentation]; -} - -//takes the object from the cache and returns an image or animated image. -//if it's a non-alternative representation and skipDecode is not set it also decompresses the image. -- (BOOL)materializeAndCacheObject:(id)object - cacheInDisk:(NSData *)diskData - additionalCost:(NSUInteger)additionalCost - maxAge:(NSNumber *)maxAge - url:(NSURL *)url - key:(NSString *)key - options:(PINRemoteImageManagerDownloadOptions)options - outImage:(PINImage **)outImage - outAltRep:(id *)outAlternateRepresentation -{ - NSAssert(object != nil, @"Object should not be nil."); - if (object == nil) { - return NO; - } - BOOL alternateRepresentationsAllowed = (PINRemoteImageManagerDisallowAlternateRepresentations & options) == 0; - BOOL skipDecode = (options & PINRemoteImageManagerDownloadOptionsSkipDecode) != 0; - __block id alternateRepresentation = nil; - __block PINImage *image = nil; - __block NSData *data = nil; - __block BOOL updateMemoryCache = NO; - - PINRemoteImageMemoryContainer *container = nil; - if ([object isKindOfClass:[PINRemoteImageMemoryContainer class]]) { - container = (PINRemoteImageMemoryContainer *)object; - [container.lock lockWithBlock:^{ - data = container.data; - }]; - } else { - updateMemoryCache = YES; - - // don't need to lock the container here because we just init it. - container = [[PINRemoteImageMemoryContainer alloc] init]; - - if ([object isKindOfClass:[PINImage class]]) { - data = diskData; - container.image = (PINImage *)object; - } else if ([object isKindOfClass:[NSData class]]) { - data = (NSData *)object; - } else { - //invalid item in cache - updateMemoryCache = NO; - data = nil; - container = nil; - } - - container.data = data; - } - - if (alternateRepresentationsAllowed) { - alternateRepresentation = [_alternateRepProvider alternateRepresentationWithData:data options:options]; - } - - if (alternateRepresentation == nil) { - //we need the image - [container.lock lockWithBlock:^{ - image = container.image; - }]; - if (image == nil && container.data) { - image = [PINImage pin_decodedImageWithData:container.data skipDecodeIfPossible:skipDecode]; - - if (url != nil) { - image = [PINImage pin_scaledImageForImage:image withKey:key]; - } - - if (skipDecode == NO) { - [container.lock lockWithBlock:^{ - updateMemoryCache = YES; - container.image = image; - }]; - } - } - } - - // maxAge set to 0 means that images should not be stored at all. - BOOL doNotCache = (maxAge != nil && [maxAge integerValue] == 0); - - // There is no HTTP header that can be sent to indicate "infinite". However not setting a value at all, which in - // our case is represented by maxAge == nil, effectively means that. - BOOL cacheIndefinitely = (maxAge == nil); - - if (!doNotCache) { - if (updateMemoryCache) { - [container.lock lockWithBlock:^{ - NSUInteger cacheCost = additionalCost; - cacheCost += [container.data length]; - CGImageRef imageRef = container.image.CGImage; - NSAssert(container.image == nil || imageRef != NULL, @"We only cache a decompressed image if we decompressed it ourselves. In that case, it should be backed by a CGImageRef."); - if (imageRef) { - cacheCost += CGImageGetHeight(imageRef) * CGImageGetBytesPerRow(imageRef); - } - if (!self.memoryCacheTTLIsEnabled || cacheIndefinitely) { - [self.cache setObjectInMemory:container forKey:key withCost:cacheCost]; - } else { - [self.cache setObjectInMemory:container forKey:key withCost:cacheCost withAgeLimit:[maxAge integerValue]]; - } - }]; - } - - if (diskData) { - if (!self.diskCacheTTLIsEnabled || cacheIndefinitely) { - // with an unset (nil) maxAge, or a cache that is not _isTtlCache, behave as before (will use cache global behavior) - [self.cache setObjectOnDisk:diskData forKey:key]; - } else { - [self.cache setObjectOnDisk:diskData forKey:key withAgeLimit:[maxAge integerValue]]; - } - } - } - - if (outImage) { - *outImage = image; - } - - if (outAlternateRepresentation) { - *outAlternateRepresentation = alternateRepresentation; - } - - if (image == nil && alternateRepresentation == nil) { - PINLog(@"Invalid item in cache"); - [self.cache removeObjectForKey:key completion:nil]; - return NO; - } - return YES; -} - -- (NSString *)cacheKeyForURL:(NSURL *)url processorKey:(NSString *)processorKey -{ - return [self cacheKeyForURL:url processorKey:processorKey resume:NO]; -} - -- (NSString *)cacheKeyForURL:(NSURL *)url processorKey:(NSString *)processorKey resume:(BOOL)resume -{ - NSString *cacheKey = [url absoluteString]; - NSAssert((processorKey.length == 0 && resume == YES) || resume == NO, @"It doesn't make sense to use resume with processing."); - if (processorKey.length > 0) { - cacheKey = [cacheKey stringByAppendingFormat:@"-<%@>", processorKey]; - } - - //PINDiskCache uses this key as the filename of the file written to disk - //Due to the current filesystem used in Darwin, this name must be limited to 255 chars. - //In case the generated key exceeds PINRemoteImageManagerCacheKeyMaxLength characters, - //we return the hash of it instead. - if (cacheKey.length > PINRemoteImageManagerCacheKeyMaxLength) { - __block CC_MD5_CTX ctx; - CC_MD5_Init(&ctx); - NSData *data = [cacheKey dataUsingEncoding:NSUTF8StringEncoding]; - [data enumerateByteRangesUsingBlock:^(const void * _Nonnull bytes, NSRange byteRange, BOOL * _Nonnull stop) { - CC_MD5_Update(&ctx, bytes, (CC_LONG)byteRange.length); - }]; - - unsigned char digest[CC_MD5_DIGEST_LENGTH]; - CC_MD5_Final(digest, &ctx); - - NSMutableString *hexString = [NSMutableString stringWithCapacity:(CC_MD5_DIGEST_LENGTH * 2)]; - for (int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) { - [hexString appendFormat:@"%02lx", (unsigned long)digest[i]]; - } - cacheKey = [hexString copy]; - } - //The resume key must not be hashed, it is used to decide whether or not to decode from the disk cache. - if (resume) { - cacheKey = [PINRemoteImageCacheKeyResumePrefix stringByAppendingString:cacheKey]; - } - - return cacheKey; -} - -- (void)objectForKey:(NSString *)key options:(PINRemoteImageManagerDownloadOptions)options completion:(void (^)(BOOL found, BOOL valid, PINImage *image, id alternativeRepresentation))completion -{ - return [self objectForURL:nil processorKey:nil key:key options:options completion:completion]; -} - -- (void)objectForURL:(NSURL *)url processorKey:(NSString *)processorKey key:(NSString *)key options:(PINRemoteImageManagerDownloadOptions)options completion:(void (^)(BOOL found, BOOL valid, PINImage *image, id alternativeRepresentation))completion -{ - if ((options & PINRemoteImageManagerDownloadOptionsIgnoreCache) != 0) { - completion(NO, YES, nil, nil); - return; - } - - if (key == nil && url == nil) { - completion(NO, YES, nil, nil); - return; - } - - key = key ?: [self cacheKeyForURL:url processorKey:processorKey]; - - void (^materialize)(id object) = ^(id object) { - PINImage *image = nil; - id alternativeRepresentation = nil; - BOOL valid = [self materializeAndCacheObject:object - url:nil - key:key - options:options - outImage:&image - outAltRep:&alternativeRepresentation]; - - completion(YES, valid, image, alternativeRepresentation); - }; - - PINRemoteImageMemoryContainer *container = [self.cache objectFromMemoryForKey:key]; - if (container) { - materialize(container); - } else { - [self.cache objectFromDiskForKey:key completion:^(id<PINRemoteImageCaching> _Nonnull cache, - NSString *_Nonnull key, - id _Nullable object) { - if (object) { - materialize(object); - } else { - completion(NO, YES, nil, nil); - } - }]; - } -} - -#pragma mark - Resume support - -- (NSString *)resumeCacheKeyForURL:(NSURL *)url -{ - return [self cacheKeyForURL:url processorKey:nil resume:YES]; -} - -- (void)storeResumeData:(PINResume *)resume forURL:(NSURL *)URL -{ - NSString *resumeKey = [self resumeCacheKeyForURL:URL]; - [self.cache setObjectOnDisk:resume forKey:resumeKey]; -} - -#if DEBUG -- (NSUInteger)totalDownloads -{ - //hack to avoid main thread assertion since these are only used in testing - [_lock lock]; - NSUInteger totalDownloads = _totalDownloads; - [_lock unlock]; - return totalDownloads; -} -#endif - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.h deleted file mode 100644 index b150903..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.h +++ /dev/null @@ -1,46 +0,0 @@ -// -// PINRemoteImageManagerConfiguration.h -// Pods -// -// Created by Ryan Quan on 2/22/19. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -/** A configuration object used to customize a PINRemoteImageManager instance **/ -@interface PINRemoteImageManagerConfiguration : NSObject - -/** The maximum number of concurrent operations. Defaults to NSOperationQueueDefaultMaxConcurrentOperationCount. */ -@property (nonatomic, readwrite, assign) NSUInteger maxConcurrentOperations; - -/** The maximum number of concurrent downloads. Defaults to 10, maximum 65535. */ -@property (nonatomic, readwrite, assign) NSUInteger maxConcurrentDownloads; - -/** The estimated remaining time threshold used to decide to skip progressive rendering. Defaults to 0.1. */ -@property (nonatomic, readwrite, assign) NSTimeInterval estimatedRemainingTimeThreshold; - -/** A bool value indicating whether PINRemoteImage should blur progressive render results */ -@property (nonatomic, readwrite, assign) BOOL shouldBlurProgressive; - -/** A CGSize which indicates the max size PINRemoteImage will render a progressive image. If an image is larger in either dimension, progressive rendering will be skipped */ -@property (nonatomic, readwrite, assign) CGSize maxProgressiveRenderSize; - -/** The minimum BPS to download the highest quality image in a set. */ -@property (nonatomic, readwrite, assign) float highQualityBPSThreshold; - -/** The maximum BPS to download the lowest quality image in a set. */ -@property (nonatomic, readwrite, assign) float lowQualityBPSThreshold; - -/** Whether high quality images should be downloaded when a low quality image is cached if network connectivity has improved. */ -@property (nonatomic, readwrite, assign) BOOL shouldUpgradeLowQualityImages; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.m deleted file mode 100644 index ecdad94..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerConfiguration.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// PINRemoteImageManagerConfiguration.m -// Pods -// -// Created by Ryan Quan on 2/22/19. -// -// - -#import "PINRemoteImageManagerConfiguration.h" - -#import "PINRemoteImageManager.h" - -@implementation PINRemoteImageManagerConfiguration - -- (nonnull instancetype)init { - if (self = [super init]) { - _maxConcurrentOperations = [[NSProcessInfo processInfo] activeProcessorCount] * 2; - _maxConcurrentDownloads = 10; - _estimatedRemainingTimeThreshold = 0.1; - _shouldBlurProgressive = YES; - _maxProgressiveRenderSize = CGSizeMake(1024, 1024); - _highQualityBPSThreshold = 500000; - _lowQualityBPSThreshold = 50000; // approximately edge speed - _shouldUpgradeLowQualityImages = NO; - } - return self; -} - -#pragma mark - Setters - -- (void)setMaxConcurrentDownloads:(NSUInteger)maxConcurrentDownloads { - NSAssert(maxConcurrentDownloads <= PINRemoteImageHTTPMaximumConnectionsPerHost, @"maxNumberOfConcurrentDownloads must be less than or equal to %d", PINRemoteImageHTTPMaximumConnectionsPerHost); - _maxConcurrentDownloads = maxConcurrentDownloads; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerResult.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerResult.m deleted file mode 100644 index 8076abd..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageManagerResult.m +++ /dev/null @@ -1,118 +0,0 @@ -// -// PINRemoteImageManagerResult.m -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import "PINRemoteImageManagerResult.h" - -@implementation PINRemoteImageManagerResult - -+ (nonnull instancetype)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error -{ - return [self imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:requestLength - resultType:resultType - UUID:uuid - response:response - error:error - renderedImageQuality:1.0]; -} - -+ (nonnull instancetype)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error - bytesSavedByResuming:(NSUInteger)bytesSavedByResuming -{ - return [[self alloc] initWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:requestLength - error:error - resultType:resultType - UUID:uuid - response:response - renderedImageQuality:1.0 - bytesSavedByResuming:bytesSavedByResuming]; -} - -+ (nonnull instancetype)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error - renderedImageQuality:(CGFloat)renderedImageQuality -{ - return [[self alloc] initWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:requestLength - error:error - resultType:resultType - UUID:uuid - response:response - renderedImageQuality:renderedImageQuality - bytesSavedByResuming:0]; -} - -- (instancetype)initWithImage:(PINImage *)image - alternativeRepresentation:(id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - error:(NSError *)error - resultType:(PINRemoteImageResultType)resultType - UUID:(NSUUID *)uuid - response:(NSURLResponse *)response - renderedImageQuality:(CGFloat)renderedImageQuality - bytesSavedByResuming:(NSUInteger)bytesSavedByResuming; -{ - if (self = [super init]) { - _image = image; - _alternativeRepresentation = alternativeRepresentation; - _requestDuration = requestLength; - _error = error; - _resultType = resultType; - _UUID = uuid; - _response = response; - _renderedImageQuality = renderedImageQuality; - _bytesSavedByResuming = bytesSavedByResuming; - } - return self; -} - -- (NSString *)description -{ - NSString *description = [super description]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"image: %@", self.image]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"alternativeRepresentation: %@", self.alternativeRepresentation]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"requestDuration: %f", self.requestDuration]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"error: %@", self.error]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"resultType: %lu", (unsigned long)self.resultType]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"UUID: %@", self.UUID]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"response: %@", self.response]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"renderedImageQuality: %f", self.renderedImageQuality]]; - description = [description stringByAppendingString:@"\n"]; - description = [description stringByAppendingString:[NSString stringWithFormat:@"bytesSavedByResuming: %lu", (unsigned long)self.bytesSavedByResuming]]; - return description; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.h deleted file mode 100644 index 2d1d62b..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// PINRemoteImageMemoryContainer.h -// Pods -// -// Created by Garrett Moon on 3/17/16. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" -#import "PINRemoteLock.h" - -@class PINImage; - -@interface PINRemoteImageMemoryContainer : NSObject - -@property (nonatomic, strong) PINImage *image; -@property (nonatomic, strong) NSData *data; -@property (nonatomic, strong) PINRemoteLock *lock; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.m deleted file mode 100644 index 3da6b27..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageMemoryContainer.m +++ /dev/null @@ -1,21 +0,0 @@ -// -// PINRemoteImageMemoryContainer.m -// Pods -// -// Created by Garrett Moon on 3/17/16. -// -// - -#import "PINRemoteImageMemoryContainer.h" - -@implementation PINRemoteImageMemoryContainer - -- (instancetype)init -{ - if (self = [super init]) { - _lock = [[PINRemoteLock alloc] initWithName:@"PINRemoteImageMemoryContainer" lockType:PINRemoteLockTypeNonRecursive]; - } - return self; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.h deleted file mode 100644 index a36fe3a..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// PINRemoteImageProcessorTask.h -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import "PINRemoteImageTask.h" - -@interface PINRemoteImageProcessorTask : PINRemoteImageTask - -@property (nonatomic, strong, nullable) NSUUID *downloadTaskUUID; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.m deleted file mode 100644 index 2f95022..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageProcessorTask.m +++ /dev/null @@ -1,44 +0,0 @@ -// -// PINRemoteImageProcessorTask.m -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import "PINRemoteImageProcessorTask.h" - -@implementation PINRemoteImageProcessorTask - -@synthesize downloadTaskUUID = _downloadTaskUUID; - -- (BOOL)cancelWithUUID:(NSUUID *)UUID resume:(PINResume **)resume -{ - BOOL noMoreCompletions = [super cancelWithUUID:UUID resume:resume]; - [self.lock lockWithBlock:^{ - if (noMoreCompletions && self->_downloadTaskUUID) { - [self.manager cancelTaskWithUUID:self->_downloadTaskUUID]; - self->_downloadTaskUUID = nil; - } - }]; - return noMoreCompletions; -} - -- (void)setDownloadTaskUUID:(NSUUID *)downloadTaskUUID -{ - [self.lock lockWithBlock:^{ - NSAssert(self->_downloadTaskUUID == nil, @"downloadTaskUUID should be nil"); - self->_downloadTaskUUID = downloadTaskUUID; - }]; -} - -- (NSUUID *)downloadTaskUUID -{ - __block NSUUID *downloadTaskUUID; - [self.lock lockWithBlock:^{ - downloadTaskUUID = self->_downloadTaskUUID; - }]; - return downloadTaskUUID; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.h deleted file mode 100644 index 8026bfd..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.h +++ /dev/null @@ -1,65 +0,0 @@ -// -// PINRemoteImageTask.h -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import <Foundation/Foundation.h> - -#if SWIFT_PACKAGE -@import PINOperation; -#else -#import <PINOperation/PINOperation.h> -#endif - -#import "PINRemoteImageCallbacks.h" -#import "PINRemoteImageManager.h" -#import "PINRemoteImageMacros.h" -#import "PINRemoteLock.h" -#import "PINResume.h" - -@interface PINRemoteImageTask : NSObject - -@property (nonatomic, strong, readonly, nonnull) PINRemoteLock *lock; - -@property (nonatomic, copy, readonly, nonnull) NSDictionary<NSUUID *, PINRemoteImageCallbacks *> *callbackBlocks; - -@property (nonatomic, weak, nullable) PINRemoteImageManager *manager; - -@property (nonatomic, strong, nullable) id<PINRequestRetryStrategy> retryStrategy; - -@property (nonatomic, copy, nullable) NSString *key; - -- (_Nonnull instancetype)init NS_UNAVAILABLE; -- (_Nonnull instancetype)initWithManager:(nonnull PINRemoteImageManager *)manager NS_DESIGNATED_INITIALIZER; - -- (void)addCallbacksWithCompletionBlock:(nonnull PINRemoteImageManagerImageCompletion)completionBlock - progressImageBlock:(nullable PINRemoteImageManagerImageCompletion)progressImageBlock - progressDownloadBlock:(nullable PINRemoteImageManagerProgressDownload)progressDownloadBlock - withUUID:(nonnull NSUUID *)UUID; - -- (void)removeCallbackWithUUID:(nonnull NSUUID *)UUID; - -- (void)callCompletionsWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - cached:(BOOL)cached - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error - remove:(BOOL)remove; - -//returns YES if no more attached completionBlocks -- (BOOL)cancelWithUUID:(nonnull NSUUID *)UUID resume:(PINResume * _Nullable * _Nullable)resume; - -- (void)setPriority:(PINRemoteImageManagerPriority)priority; - -- (nonnull PINRemoteImageManagerResult *)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.m deleted file mode 100644 index 043a628..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteImageTask.m +++ /dev/null @@ -1,160 +0,0 @@ -// -// PINRemoteImageTask.m -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import "PINRemoteImageTask.h" - -#import "PINRemoteImageCallbacks.h" -#import "PINRemoteImageManager+Private.h" - -@interface PINRemoteImageTask () -{ - NSMutableDictionary<NSUUID *, PINRemoteImageCallbacks *> *_callbackBlocks; // We need to copy/retain `NSUUID`, because `PINRemoteImageManager` has a weak table `UUIDs` to store all UUIDs. -} - -@end - -@implementation PINRemoteImageTask - -@synthesize lock = _lock; - -- (instancetype)initWithManager:(PINRemoteImageManager *)manager -{ - if (self = [super init]) { - _lock = [[PINRemoteLock alloc] initWithName:@"Task Lock"]; - _manager = manager; - _callbackBlocks = [[NSMutableDictionary alloc] init]; - } - return self; -} - -- (NSString *)description -{ - return [NSString stringWithFormat:@"<%@: %p> completionBlocks: %lu", NSStringFromClass([self class]), self, (unsigned long)self.callbackBlocks.count]; -} - -- (void)addCallbacksWithCompletionBlock:(PINRemoteImageManagerImageCompletion)completionBlock - progressImageBlock:(PINRemoteImageManagerImageCompletion)progressImageBlock - progressDownloadBlock:(PINRemoteImageManagerProgressDownload)progressDownloadBlock - withUUID:(NSUUID *)UUID -{ - PINRemoteImageCallbacks *completion = [[PINRemoteImageCallbacks alloc] init]; - completion.completionBlock = completionBlock; - completion.progressImageBlock = progressImageBlock; - completion.progressDownloadBlock = progressDownloadBlock; - - [self.lock lockWithBlock:^{ - [self->_callbackBlocks setObject:completion forKey:UUID]; - }]; -} - -- (void)removeCallbackWithUUID:(NSUUID *)UUID -{ - [self.lock lockWithBlock:^{ - [self l_removeCallbackWithUUID:UUID]; - }]; -} - -- (void)l_removeCallbackWithUUID:(NSUUID *)UUID -{ - [_callbackBlocks removeObjectForKey:UUID]; -} - -- (NSDictionary<NSUUID *, PINRemoteImageCallbacks *> *)callbackBlocks -{ - __block NSDictionary *callbackBlocks; - [self.lock lockWithBlock:^{ - callbackBlocks = [self->_callbackBlocks copy]; - }]; - return callbackBlocks; -} - -- (void)callCompletionsWithImage:(PINImage *)image - alternativeRepresentation:(id)alternativeRepresentation - cached:(BOOL)cached - response:(NSURLResponse *)response - error:(NSError *)error - remove:(BOOL)remove; -{ - __weak typeof(self) weakSelf = self; - [self.callbackBlocks enumerateKeysAndObjectsUsingBlock:^(NSUUID *UUID, PINRemoteImageCallbacks *callback, BOOL *stop) { - typeof(self) strongSelf = weakSelf; - PINRemoteImageManagerImageCompletion completionBlock = callback.completionBlock; - if (completionBlock != nil) { - PINLog(@"calling completion for UUID: %@ key: %@", UUID, strongSelf.key); - CFTimeInterval requestTime = callback.requestTime; - - dispatch_async(self.manager.callbackQueue, ^ - { - PINRemoteImageResultType result; - if (image || alternativeRepresentation) { - result = cached ? PINRemoteImageResultTypeCache : PINRemoteImageResultTypeDownload; - } else { - result = PINRemoteImageResultTypeNone; - } - completionBlock([self imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:CACurrentMediaTime() - requestTime - resultType:result - UUID:UUID - response:response - error:error]); - }); - } - if (remove) { - [strongSelf removeCallbackWithUUID:UUID]; - } - }]; -} - -- (BOOL)cancelWithUUID:(NSUUID *)UUID resume:(PINResume **)resume -{ - __block BOOL noMoreCompletions; - [self.lock lockWithBlock:^{ - noMoreCompletions = [self l_cancelWithUUID:UUID]; - }]; - return noMoreCompletions; -} - -- (BOOL)l_cancelWithUUID:(NSUUID *)UUID -{ - BOOL noMoreCompletions = NO; - [self l_removeCallbackWithUUID:UUID]; - if ([_callbackBlocks count] == 0) { - noMoreCompletions = YES; - } - return noMoreCompletions; -} - -- (void)setPriority:(PINRemoteImageManagerPriority)priority -{ - -} - -- (nonnull PINRemoteImageManagerResult *)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)UUID - response:(NSURLResponse *)response - error:(nullable NSError *)error -{ - return [PINRemoteImageManagerResult imageResultWithImage:image - alternativeRepresentation:alternativeRepresentation - requestLength:requestLength - resultType:resultType - UUID:UUID - response:response - error:error]; -} - -- (NSMutableDictionary *)l_callbackBlocks -{ - return _callbackBlocks; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.h deleted file mode 100644 index 1ca8488..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// PINRemoteLock.h -// Pods -// -// Created by Garrett Moon on 3/17/16. -// -// - -#import <Foundation/Foundation.h> - -/** The type of lock, either recursive or non-recursive */ -typedef NS_ENUM(NSUInteger, PINRemoteLockType) { - /** A non-recursive version of the lock. The default. */ - PINRemoteLockTypeNonRecursive = 0, - /** A recursive version of the lock. More expensive. */ - PINRemoteLockTypeRecursive, -}; - -@interface PINRemoteLock : NSObject - -- (instancetype)initWithName:(NSString *)lockName lockType:(PINRemoteLockType)lockType NS_DESIGNATED_INITIALIZER; -- (instancetype)initWithName:(NSString *)lockName; -- (void)lockWithBlock:(dispatch_block_t)block; - -- (void)lock; -- (void)unlock; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.m deleted file mode 100644 index 6cf74d6..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteLock.m +++ /dev/null @@ -1,112 +0,0 @@ -// -// PINRemoteLock.m -// Pods -// -// Created by Garrett Moon on 3/17/16. -// -// - -#import "PINRemoteLock.h" - -#import <pthread.h> - -#if !defined(PINREMOTELOCK_DEBUG) && defined(DEBUG) -#define PINREMOTELOCK_DEBUG DEBUG -#endif - -@interface PINRemoteLock () -{ -#if PINREMOTELOCK_DEBUG - NSLock *_lock; - NSRecursiveLock *_recursiveLock; -#else - pthread_mutex_t _lock; -#endif -} - -@end - -@implementation PINRemoteLock - -- (instancetype)init -{ - return [self initWithName:nil]; -} - -- (instancetype)initWithName:(NSString *)lockName lockType:(PINRemoteLockType)lockType -{ - if (self = [super init]) { -#if PINREMOTELOCK_DEBUG - if (lockType == PINRemoteLockTypeNonRecursive) { - _lock = [[NSLock alloc] init]; - } else { - _recursiveLock = [[NSRecursiveLock alloc] init]; - } - - if (lockName) { - [_lock setName:lockName]; - [_recursiveLock setName:lockName]; - } -#else - pthread_mutexattr_t attr; - - pthread_mutexattr_init(&attr); - if (lockType == PINRemoteLockTypeRecursive) { - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - } - pthread_mutex_init(&_lock, &attr); -#endif - } - return self; -} - -- (instancetype)initWithName:(NSString *)lockName -{ - return [self initWithName:lockName lockType:PINRemoteLockTypeNonRecursive]; -} - -#if ! PINREMOTELOCK_DEBUG -- (void)dealloc -{ - pthread_mutex_destroy(&_lock); -} -#endif - -- (void)lockWithBlock:(dispatch_block_t)block -{ -#if PINREMOTELOCK_DEBUG - [_lock lock]; - [_recursiveLock lock]; -#else - pthread_mutex_lock(&_lock); -#endif - block(); -#if PINREMOTELOCK_DEBUG - [_lock unlock]; - [_recursiveLock unlock]; -#else - pthread_mutex_unlock(&_lock); -#endif -} - -- (void)lock -{ -#if PINREMOTELOCK_DEBUG - [_lock lock]; - [_recursiveLock lock]; -#else - pthread_mutex_lock(&_lock); -#endif -} - -- (void)unlock -{ -#if PINREMOTELOCK_DEBUG - [_lock unlock]; - [_recursiveLock unlock]; -#else - pthread_mutex_unlock(&_lock); -#endif -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.h deleted file mode 100644 index b0abc22..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// PINRemoteWeakProxy.h -// PINRemoteImage -// -// Created by Garrett Moon on 4/24/18. -// Copyright © 2018 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -@interface PINRemoteWeakProxy : NSProxy - -+ (PINRemoteWeakProxy *)weakProxyWithTarget:(id)target; -- (instancetype)initWithTarget:(id)target; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.m deleted file mode 100644 index a704932..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRemoteWeakProxy.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// PINRemoteWeakProxy.m -// PINRemoteImage -// -// Created by Garrett Moon on 4/24/18. -// Copyright © 2018 Pinterest. All rights reserved. -// - -#import "PINRemoteWeakProxy.h" - -@interface PINRemoteWeakProxy () -{ - __weak id _target; - Class _targetClass; -} -@end - -@implementation PINRemoteWeakProxy - -+ (PINRemoteWeakProxy *)weakProxyWithTarget:(id)target -{ - return [[PINRemoteWeakProxy alloc] initWithTarget:target]; -} - -- (instancetype)initWithTarget:(id)target -{ - if (self) { - _target = target; - _targetClass = [target class]; - } - return self; -} - -- (BOOL)respondsToSelector:(SEL)aSelector -{ - return [_target respondsToSelector:aSelector]; -} - -- (BOOL)conformsToProtocol:(Protocol *)aProtocol -{ - return [_target conformsToProtocol:aProtocol]; -} - -- (id)forwardingTargetForSelector:(SEL)aSelector -{ - return _target; -} - -- (void)forwardInvocation:(NSInvocation *)invocation -{ - // Drop it since we shouldn't get here if _target is nil -} - -- (NSMethodSignature *)methodSignatureForSelector:(SEL)sel -{ - return _target ? [_target methodSignatureForSelector:sel] : [_targetClass instanceMethodSignatureForSelector:sel]; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRequestRetryStrategy.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRequestRetryStrategy.m deleted file mode 100644 index 92d6ecf..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINRequestRetryStrategy.m +++ /dev/null @@ -1,69 +0,0 @@ -// -// PINRequestRetryStrategy.m -// Pods -// -// Created by Hovhannes Safaryan on 9/24/16. -// -// - -#import "PINRequestRetryStrategy.h" -#import "PINURLSessionManager.h" -#import "PINRemoteImageManager.h" - -@interface PINRequestExponentialRetryStrategy () - -@property (nonatomic, assign) int retryMaxCount; -@property (nonatomic, assign) int retryCount; -@property (nonatomic, assign) int delayBase; - -@end - -@implementation PINRequestExponentialRetryStrategy - -- (instancetype)initWithRetryMaxCount:(int)retryMaxCount delayBase:(int)delayBase -{ - if (self = [super init]) { - _retryCount = 0; - _retryMaxCount = retryMaxCount; - _delayBase = delayBase; - } - return self; -} - -- (int)numberOfRetries -{ - return self.retryCount; -} - -- (BOOL)shouldRetryWithError:(NSError *)error -{ - if (error == nil || ![[self class] retriableError:error] || - self.retryCount >= self.retryMaxCount) { - return NO; - } - return YES; -} - -- (int)nextDelay -{ - return powf(self.delayBase, self.retryCount); -} - -- (void)incrementRetryCount -{ - self.retryCount++; -} - -+ (BOOL)retriableError:(NSError *)remoteImageError -{ - if ([remoteImageError.domain isEqualToString:PINURLErrorDomain]) { - return remoteImageError.code >= 500; - } else if ([remoteImageError.domain isEqualToString:NSURLErrorDomain] && remoteImageError.code == NSURLErrorUnsupportedURL) { - return NO; - } else if ([remoteImageError.domain isEqualToString:PINRemoteImageManagerErrorDomain]) { - return NO; - } - return YES; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.h deleted file mode 100644 index 7ff2b53..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// PINResume.h -// PINRemoteImage -// -// Created by Garrett Moon on 3/10/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -NS_ASSUME_NONNULL_BEGIN - -@interface PINResume : NSObject <NSCoding> - -- (id)init NS_UNAVAILABLE; -+ (PINResume *)resumeData:(NSData *)resumeData ifRange:(NSString *)ifRange totalBytes:(long long)totalBytes; - -@property (nonatomic, strong, readonly) NSData *resumeData; -@property (nonatomic, copy, readonly) NSString *ifRange; -@property (nonatomic, assign, readonly) long long totalBytes; - -@end - -NS_ASSUME_NONNULL_END diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.m deleted file mode 100644 index cfcbd16..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINResume.m +++ /dev/null @@ -1,51 +0,0 @@ -// -// PINResume.m -// PINRemoteImage -// -// Created by Garrett Moon on 3/10/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINResume.h" - -@implementation PINResume - -NSString * const kResumeDataKey = @"kResumeDataKey"; -NSString * const kIfRangeKey = @"kIfRangeKey"; -NSString * const kTotalBytesKey = @"kTotalBytesKey"; - -- (instancetype)initWithCoder:(NSCoder *)aDecoder -{ - if (self = [super init]) { - _resumeData = [aDecoder decodeObjectForKey:kResumeDataKey]; - _ifRange = [aDecoder decodeObjectForKey:kIfRangeKey]; - _totalBytes = [aDecoder decodeInt64ForKey:kTotalBytesKey]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder -{ - [aCoder encodeObject:_resumeData forKey:kResumeDataKey]; - [aCoder encodeObject:_ifRange forKey:kIfRangeKey]; - [aCoder encodeInt64:_totalBytes forKey:kTotalBytesKey]; -} - -+ (PINResume *)resumeData:(NSData *)resumeData ifRange:(NSString *)ifRange totalBytes:(long long)totalBytes -{ - PINResume *resume = [[PINResume alloc] initWithResumeData:resumeData ifRange:ifRange totalBytes:totalBytes]; - return resume; -} - -- (PINResume *)initWithResumeData:(NSData *)resumeData ifRange:(NSString *)ifRange totalBytes:(long long)totalBytes -{ - if (self = [super init]) { - NSAssert(resumeData.length > 0 && ifRange.length > 0 && totalBytes > 0, @"PINResume must have all fields non-nil and non-zero length."); - _resumeData = resumeData; - _ifRange = ifRange; - _totalBytes = totalBytes; - } - return self; -} - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.h deleted file mode 100644 index bee5813..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// PINSpeedRecorder.h -// PINRemoteImage -// -// Created by Garrett Moon on 8/30/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -typedef enum : NSUInteger { - PINSpeedRecorderConnectionStatusNotReachable, - PINSpeedRecorderConnectionStatusWWAN, - PINSpeedRecorderConnectionStatusWiFi -} PINSpeedRecorderConnectionStatus; - -@interface PINSpeedRecorder : NSObject - -+ (PINSpeedRecorder *)sharedRecorder; -+ (NSUInteger)appropriateImageIdxForURLsGivenHistoricalNetworkConditions:(NSArray <NSURL *> *)urls - lowQualityQPSThreshold:(float)lowQualityQPSThreshold - highQualityQPSThreshold:(float)highQualityQPSThreshold; - -- (void)processMetrics:(NSURLSessionTaskMetrics *)metrics forTask:(NSURLSessionTask *)task API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); - -/* - Returns a weighted average of the bytes per second of a transfer with the time to first byte subtracted. - More specifically, we get the time to first byte for every task that completes, - subtract it from the total transfer time, calculate bytes per second - and add it to an existing average using exponential weighted average and adjusting - for starting bias. - This is all done on a per host basis. - */ -- (float)weightedAdjustedBytesPerSecondForHost:(NSString *)host; - -/* - Returns a weighted average of time to first byte for the specified host. - More specifically, we get the time to first byte for every task that completes - and add it to an existing average using exponential weighted average and adjusting - for starting bias. - This is all done on a per host basis. - */ -- (NSTimeInterval)weightedTimeToFirstByteForHost:(NSString *)host; - -- (PINSpeedRecorderConnectionStatus)connectionStatus; - -#if DEBUG -- (void)setCurrentBytesPerSecond:(float)currentBPS; -#endif - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.m deleted file mode 100644 index 8e02fb2..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINSpeedRecorder.m +++ /dev/null @@ -1,265 +0,0 @@ -// -// PINSpeedRecorder.m -// PINRemoteImage -// -// Created by Garrett Moon on 8/30/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import "PINSpeedRecorder.h" - -#import <SystemConfiguration/SystemConfiguration.h> -#import <netinet/in.h> - -#import "PINRemoteLock.h" - -@interface PINSpeedMeasurement : NSObject - -// Storing the count of each measurement allows for bias adjustment in exponentially -// weighted average. -@property (nonatomic, assign) NSUInteger count; -@property (nonatomic, assign) float bytesPerSecond; -@property (nonatomic, assign) float startAdjustedBytesPerSecond; -@property (nonatomic, assign) CFTimeInterval timeToFirstByte; - -@end - -@interface PINSpeedRecorder () -{ - NSCache <NSString *, PINSpeedMeasurement *>*_speedMeasurements; - SCNetworkReachabilityRef _reachability; -#if DEBUG - BOOL _overrideBPS; - float _currentBPS; -#endif -} - -@property (nonatomic, strong) PINRemoteLock *lock; - -@end - -@implementation PINSpeedRecorder - -+ (PINSpeedRecorder *)sharedRecorder -{ - static dispatch_once_t onceToken; - static PINSpeedRecorder *sharedRecorder; - dispatch_once(&onceToken, ^{ - sharedRecorder = [[self alloc] init]; - }); - - return sharedRecorder; -} - -- (instancetype)init -{ - if (self = [super init]) { - _lock = [[PINRemoteLock alloc] initWithName:@"PINSpeedRecorder lock"]; - _speedMeasurements = [[NSCache alloc] init]; - _speedMeasurements.countLimit = 25; - - struct sockaddr_in zeroAddress; - bzero(&zeroAddress, sizeof(zeroAddress)); - zeroAddress.sin_len = sizeof(zeroAddress); - zeroAddress.sin_family = AF_INET; - _reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)&zeroAddress); - } - return self; -} - -- (void)processMetrics:(NSURLSessionTaskMetrics *)metrics forTask:(NSURLSessionTask *)task -{ - NSDate *requestStart = [NSDate distantFuture]; - NSDate *firstByte = [NSDate distantFuture]; - NSDate *requestEnd = [NSDate distantPast]; - int64_t contentLength = task.countOfBytesReceived; - - for (NSURLSessionTaskTransactionMetrics *metric in metrics.transactionMetrics) { - if (metric.requestStartDate == nil || metric.responseStartDate == nil) { - //Only evaluate requests which completed their first byte. - return; - } - - requestStart = [requestStart earlierDate:metric.requestStartDate]; - firstByte = [firstByte earlierDate:metric.responseStartDate]; - requestEnd = [requestEnd laterDate:metric.responseEndDate]; - } - - if ([requestStart isEqual:[NSDate distantFuture]] || [firstByte isEqual:[NSDate distantFuture]] || [requestEnd isEqual:[NSDate distantPast]] || contentLength == 0) { - return; - } - - [self updateSpeedsForHost:task.currentRequest.URL.host - bytesPerSecond:contentLength / [requestEnd timeIntervalSinceDate:requestStart] - startAdjustedBytesPerSecond:contentLength / [requestEnd timeIntervalSinceDate:firstByte] - timeToFirstByte:[firstByte timeIntervalSinceDate:requestStart]]; -} - -- (void)resetMeasurements -{ - [self.lock lockWithBlock:^{ - [self->_speedMeasurements removeAllObjects]; - }]; -} - -- (void)updateSpeedsForHost:(NSString *)host bytesPerSecond:(float)bytesPerSecond startAdjustedBytesPerSecond:(float)startAdjustedBytesPerSecond timeToFirstByte:(float)timeToFirstByte -{ - [self.lock lockWithBlock:^{ - PINSpeedMeasurement *measurement = [self->_speedMeasurements objectForKey:host]; - if (measurement == nil) { - measurement = [[PINSpeedMeasurement alloc] init]; - measurement.count = 0; - measurement.bytesPerSecond = bytesPerSecond; - measurement.startAdjustedBytesPerSecond = startAdjustedBytesPerSecond; - measurement.timeToFirstByte = timeToFirstByte; - [self->_speedMeasurements setObject:measurement forKey:host]; - } else { - const double bpsBeta = 0.8; - const double ttfbBeta = 0.8; - measurement.count++; - measurement.bytesPerSecond = (measurement.bytesPerSecond * bpsBeta) + ((1.0 - bpsBeta) * bytesPerSecond); - measurement.startAdjustedBytesPerSecond = (measurement.startAdjustedBytesPerSecond * bpsBeta) + ((1.0 - bpsBeta) * startAdjustedBytesPerSecond); - measurement.timeToFirstByte = (measurement.timeToFirstByte * ttfbBeta) + ((1.0 - ttfbBeta) * timeToFirstByte); - } - }]; -} - -- (float)weightedAdjustedBytesPerSecondForHost:(NSString *)host -{ - __block float startAdjustedBytesPerSecond = -1; - [self.lock lockWithBlock:^{ -#if DEBUG - if (self->_overrideBPS) { - startAdjustedBytesPerSecond = self->_currentBPS; - return; - } -#endif - PINSpeedMeasurement *measurement = [self->_speedMeasurements objectForKey:host]; - if (measurement == 0) { - startAdjustedBytesPerSecond = -1; - return; - } - startAdjustedBytesPerSecond = measurement.startAdjustedBytesPerSecond; - }]; - return startAdjustedBytesPerSecond; -} - -- (NSTimeInterval)weightedTimeToFirstByteForHost:(NSString *)host -{ - __block NSTimeInterval timeToFirstByte = 0; - [self.lock lockWithBlock:^{ - PINSpeedMeasurement *measurement = [self->_speedMeasurements objectForKey:host]; - timeToFirstByte = measurement.timeToFirstByte; - }]; - return timeToFirstByte; -} - -#if DEBUG -- (void)setCurrentBytesPerSecond:(float)currentBPS -{ - [self.lock lockWithBlock:^{ - if (currentBPS == -1) { - self->_overrideBPS = NO; - } else { - self->_overrideBPS = YES; - } - self->_currentBPS = currentBPS; - }]; -} -#endif - -// Cribbed from Apple's reachability: https://developer.apple.com/library/content/samplecode/Reachability/Listings/Reachability_Reachability_m.html#//apple_ref/doc/uid/DTS40007324-Reachability_Reachability_m-DontLinkElementID_9 - -- (PINSpeedRecorderConnectionStatus)connectionStatus -{ - PINSpeedRecorderConnectionStatus status = PINSpeedRecorderConnectionStatusNotReachable; - SCNetworkReachabilityFlags flags; - - // _reachability is set on init and therefore safe to access outside the lock - if (SCNetworkReachabilityGetFlags(_reachability, &flags)) { - return [self networkStatusForFlags:flags]; - } - return status; -} - -- (PINSpeedRecorderConnectionStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags -{ - if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) { - // The target host is not reachable. - return PINSpeedRecorderConnectionStatusNotReachable; - } - - PINSpeedRecorderConnectionStatus connectionStatus = PINSpeedRecorderConnectionStatusNotReachable; - - if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) { - /* - If the target host is reachable and no connection is required then we'll assume (for now) that you're on Wi-Fi... - */ - connectionStatus = PINSpeedRecorderConnectionStatusWiFi; - } - - if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)) { - /* - ... and the connection is on-demand (or on-traffic) if the calling application is using the CFSocketStream or higher APIs... - */ - - if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) { - /* - ... and no [user] intervention is needed... - */ - connectionStatus = PINSpeedRecorderConnectionStatusWiFi; - } - } - -#if PIN_TARGET_IOS - if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) { - /* - ... but WWAN connections are OK if the calling application is using the CFNetwork APIs. - */ - connectionStatus = PINSpeedRecorderConnectionStatusWWAN; - } -#endif - - return connectionStatus; -} - -+ (NSUInteger)appropriateImageIdxForURLsGivenHistoricalNetworkConditions:(NSArray <NSURL *> *)urls - lowQualityQPSThreshold:(float)lowQualityQPSThreshold - highQualityQPSThreshold:(float)highQualityQPSThreshold -{ - float currentBytesPerSecond = [[PINSpeedRecorder sharedRecorder] weightedAdjustedBytesPerSecondForHost:[[urls firstObject] host]]; - - NSUInteger desiredImageURLIdx; - - if (currentBytesPerSecond == -1) { - // Base it on reachability - switch ([[PINSpeedRecorder sharedRecorder] connectionStatus]) { - case PINSpeedRecorderConnectionStatusWiFi: - desiredImageURLIdx = urls.count - 1; - break; - - case PINSpeedRecorderConnectionStatusWWAN: - case PINSpeedRecorderConnectionStatusNotReachable: - desiredImageURLIdx = 0; - break; - } - } else { - if (currentBytesPerSecond >= highQualityQPSThreshold) { - desiredImageURLIdx = urls.count - 1; - } else if (currentBytesPerSecond <= lowQualityQPSThreshold) { - desiredImageURLIdx = 0; - } else if (urls.count == 2) { - desiredImageURLIdx = roundf((currentBytesPerSecond - lowQualityQPSThreshold) / ((highQualityQPSThreshold - lowQualityQPSThreshold) / (float)(urls.count - 1))); - } else { - desiredImageURLIdx = ceilf((currentBytesPerSecond - lowQualityQPSThreshold) / ((highQualityQPSThreshold - lowQualityQPSThreshold) / (float)(urls.count - 2))); - } - } - - return desiredImageURLIdx; -} - -@end - -@implementation PINSpeedMeasurement - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINURLSessionManager.m b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINURLSessionManager.m deleted file mode 100644 index e83601c..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/PINURLSessionManager.m +++ /dev/null @@ -1,263 +0,0 @@ -// -// PINURLSessionManager.m -// Pods -// -// Created by Garrett Moon on 6/26/15. -// -// - -#import "PINURLSessionManager.h" - -#import "PINSpeedRecorder.h" - -NSErrorDomain const PINURLErrorDomain = @"PINURLErrorDomain"; - -@interface PINURLSessionManager () <NSURLSessionDelegate, NSURLSessionDataDelegate> - -@property (nonatomic, strong) NSLock *sessionManagerLock; -@property (nonatomic, strong) NSURLSession *session; -@property (nonatomic, strong) NSOperationQueue *operationQueue; -@property (nonatomic, strong) NSMutableDictionary <NSNumber *, dispatch_queue_t> *delegateQueues; -@property (nonatomic, strong) NSMutableDictionary <NSNumber *, PINURLSessionDataTaskCompletion> *completions; - -@end - -@implementation PINURLSessionManager - -- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration -{ - if (self = [super init]) { - self.sessionManagerLock = [[NSLock alloc] init]; - self.sessionManagerLock.name = @"PINURLSessionManager"; - self.operationQueue = [[NSOperationQueue alloc] init]; - self.operationQueue.name = @"PINURLSessionManager Operation Queue"; - - //queue must be serial to ensure proper ordering - [self.operationQueue setMaxConcurrentOperationCount:1]; - self.session = [NSURLSession sessionWithConfiguration:configuration delegate:self delegateQueue:self.operationQueue]; - self.completions = [[NSMutableDictionary alloc] init]; - self.delegateQueues = [[NSMutableDictionary alloc] init]; - } - return self; -} - -- (void)invalidateSessionAndCancelTasks -{ - [self lock]; - [self.session invalidateAndCancel]; - [self unlock]; -} - -- (nonnull NSURLSessionDataTask *)dataTaskWithRequest:(nonnull NSURLRequest *)request - completionHandler:(nonnull PINURLSessionDataTaskCompletion)completionHandler -{ - return [self dataTaskWithRequest:request - priority:PINRemoteImageManagerPriorityDefault - completionHandler:completionHandler]; -} - -- (nonnull NSURLSessionDataTask *)dataTaskWithRequest:(nonnull NSURLRequest *)request - priority:(PINRemoteImageManagerPriority)priority - completionHandler:(nonnull PINURLSessionDataTaskCompletion)completionHandler -{ - [self lock]; - NSURLSessionDataTask *dataTask = [self.session dataTaskWithRequest:request]; - if (@available(iOS 8.0, macOS 10.10, tvOS 9.0, watchOS 2.0, *)) { - dataTask.priority = dataTaskPriorityWithImageManagerPriority(priority); - } - if (completionHandler) { - [self.completions setObject:completionHandler forKey:@(dataTask.taskIdentifier)]; - } - NSString *queueName = [NSString stringWithFormat:@"PINURLSessionManager delegate queue - %ld", (unsigned long)dataTask.taskIdentifier]; - dispatch_queue_t delegateQueue = dispatch_queue_create([queueName UTF8String], DISPATCH_QUEUE_SERIAL); - [self.delegateQueues setObject:delegateQueue forKey:@(dataTask.taskIdentifier)]; - [self unlock]; - return dataTask; -} - -- (void)lock -{ - [self.sessionManagerLock lock]; -} - -- (void)unlock -{ - [self.sessionManagerLock unlock]; -} - -#pragma mark NSURLSessionDataDelegate - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler -{ - [self lock]; - dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)]; - [self unlock]; - - NSAssert(delegateQueue != nil, @"There seems to be an issue in iOS 9 where this can be nil. If you can reliably reproduce hitting this, *please* open an issue: https://github.com/pinterest/PINRemoteImage/issues"); - if (delegateQueue == nil) { - return; - } - - __weak typeof(self) weakSelf = self; - dispatch_async(delegateQueue, ^{ - typeof(self) strongSelf = weakSelf; - if ([strongSelf.delegate respondsToSelector:@selector(didReceiveResponse:forTask:)]) { - [strongSelf.delegate didReceiveResponse:response forTask:task]; - } - }); - //Even though this is documented to be non-nil, in the wild it sometimes is. - if (completionHandler) { - completionHandler(NSURLSessionResponseAllow); - } -} - -- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler -{ - if ([self.delegate respondsToSelector:@selector(didReceiveAuthenticationChallenge:forTask:completionHandler:)]) { - [self.delegate didReceiveAuthenticationChallenge:challenge forTask:nil completionHandler:completionHandler]; - } else { - //Even though this is documented to be non-nil, in the wild it sometimes is. - if (completionHandler) { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } - } -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler -{ - [self lock]; - dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)]; - [self unlock]; - - NSAssert(delegateQueue != nil, @"There seems to be an issue in iOS 9 where this can be nil. If you can reliably reproduce hitting this, *please* open an issue: https://github.com/pinterest/PINRemoteImage/issues"); - if (delegateQueue == nil) { - return; - } - - __weak typeof(self) weakSelf = self; - dispatch_async(delegateQueue, ^{ - typeof(self) strongSelf = weakSelf; - if ([strongSelf.delegate respondsToSelector:@selector(didReceiveAuthenticationChallenge:forTask:completionHandler:)]) { - [strongSelf.delegate didReceiveAuthenticationChallenge:challenge forTask:task completionHandler:completionHandler]; - } else { - //Even though this is documented to be non-nil, in the wild it sometimes is - if (completionHandler) { - completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); - } - } - }); -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task didReceiveData:(NSData *)data -{ - [self lock]; - dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)]; - [self unlock]; - - NSAssert(delegateQueue != nil, @"There seems to be an issue in iOS 9 where this can be nil. If you can reliably reproduce hitting this, *please* open an issue: https://github.com/pinterest/PINRemoteImage/issues"); - if (delegateQueue == nil) { - return; - } - - __weak typeof(self) weakSelf = self; - dispatch_async(delegateQueue, ^{ - typeof(self) strongSelf = weakSelf; - [strongSelf.delegate didReceiveData:data forTask:task]; - }); -} - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error -{ - [self lock]; - dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)]; - [self unlock]; - - NSAssert(delegateQueue != nil, @"There seems to be an issue in iOS 9 where this can be nil. If you can reliably reproduce hitting this, *please* open an issue: https://github.com/pinterest/PINRemoteImage/issues"); - if (delegateQueue == nil) { - return; - } - - if (!error && [task.response isKindOfClass:[NSHTTPURLResponse class]]) { - NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response; - NSInteger statusCode = [response statusCode]; - //If a 404 response contains an image, we treat it as a successful request and return the image - BOOL recoverable = [self responseRecoverableFrom404:response]; - if (statusCode >= 400 && recoverable == NO) { - error = [NSError errorWithDomain:PINURLErrorDomain - code:statusCode - userInfo:@{NSLocalizedDescriptionKey : @"HTTP Error Response."}]; - } - } - __weak typeof(self) weakSelf = self; - dispatch_async(delegateQueue, ^{ - typeof(self) strongSelf = weakSelf; - - [strongSelf lock]; - PINURLSessionDataTaskCompletion completionHandler = strongSelf.completions[@(task.taskIdentifier)]; - [strongSelf.completions removeObjectForKey:@(task.taskIdentifier)]; - [strongSelf.delegateQueues removeObjectForKey:@(task.taskIdentifier)]; - [strongSelf unlock]; - - if (completionHandler) { - completionHandler(task, error); - } - - if ([strongSelf.delegate respondsToSelector:@selector(didCompleteTask:withError:)]) { - [strongSelf.delegate didCompleteTask:task withError:error]; - } - }); -} - -#pragma mark - session statistics - -- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics -{ - if (@available(iOS 10.0, macOS 10.12, *)) { - [[PINSpeedRecorder sharedRecorder] processMetrics:metrics forTask:task]; - - [self lock]; - dispatch_queue_t delegateQueue = self.delegateQueues[@(task.taskIdentifier)]; - [self unlock]; - - NSAssert(delegateQueue != nil, @"There seems to be an issue in iOS 9 where this can be nil. If you can reliably reproduce hitting this, *please* open an issue: https://github.com/pinterest/PINRemoteImage/issues"); - if (delegateQueue == nil) { - return; - } - - __weak typeof(self) weakSelf = self; - dispatch_async(delegateQueue, ^{ - typeof(self) strongSelf = weakSelf; - if ([strongSelf.delegate respondsToSelector:@selector(didCollectMetrics:forURL:)]) { - [strongSelf.delegate didCollectMetrics:metrics forURL:task.originalRequest.URL]; - } - }); - } -} - -- (BOOL)responseRecoverableFrom404:(NSHTTPURLResponse*)response -{ - return response.statusCode == 404 - && [response.allHeaderFields[@"content-type"] rangeOfString:@"image"].location != NSNotFound; -} - -#if DEBUG -- (void)concurrentDownloads:(void (^_Nullable)(NSUInteger concurrentDownloads))concurrentDownloadsCompletion -{ - if (@available(macos 10.11, iOS 9.0, watchOS 2.0, tvOS 9.0, *)) { - [self.session getAllTasksWithCompletionHandler:^(NSArray<__kindof NSURLSessionTask *> * _Nonnull tasks) { - concurrentDownloadsCompletion(tasks.count); - }]; - } else { - [self.session getTasksWithCompletionHandler:^(NSArray<NSURLSessionDataTask *> * _Nonnull dataTasks, - NSArray<NSURLSessionUploadTask *> * _Nonnull uploadTasks, - NSArray<NSURLSessionDownloadTask *> * _Nonnull downloadTasks) { - NSUInteger total = dataTasks.count + uploadTasks.count + downloadTasks.count; - concurrentDownloadsCompletion(total); - }]; - } -} - -#endif - -@end - diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/NSData+ImageDetectors.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/NSData+ImageDetectors.h deleted file mode 100644 index b5d91d9..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/NSData+ImageDetectors.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// NSData+ImageDetectors.h -// Pods -// -// Created by Garrett Moon on 11/19/14. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -@interface NSData (PINImageDetectors) - -- (BOOL)pin_isGIF; -- (BOOL)pin_isAnimatedGIF; -#if PIN_WEBP -- (BOOL)pin_isWebP; -- (BOOL)pin_isAnimatedWebP; -#endif - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAlternateRepresentationProvider.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAlternateRepresentationProvider.h deleted file mode 100644 index d350609..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAlternateRepresentationProvider.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// PINAlternateRepresentationProvider.h -// Pods -// -// Created by Garrett Moon on 3/17/16. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageManager.h" - -@protocol PINRemoteImageManagerAlternateRepresentationProvider <NSObject> -@required - -/** - @discussion This method will be called with data off the wire or stored in the cache. Return an object to have it returned as the alternativeRepresentation object in the PINRemoteImageManagerResult. @warning this method can be called on the main thread, be careful of doing expensive work. - */ -- (id)alternateRepresentationWithData:(NSData *)data options:(PINRemoteImageManagerDownloadOptions)options; - -@end - -@interface PINAlternateRepresentationProvider : NSObject <PINRemoteImageManagerAlternateRepresentationProvider> - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImage.h deleted file mode 100644 index 4f96b15..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImage.h +++ /dev/null @@ -1,165 +0,0 @@ -// -// PINAnimatedImage.h -// PINRemoteImage -// -// Created by Garrett Moon on 9/17/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -NS_ASSUME_NONNULL_BEGIN - -extern NSErrorDomain const kPINAnimatedImageErrorDomain; - -/** - PINAnimatedImage decoding and processing errors. - */ -typedef NS_ERROR_ENUM(kPINAnimatedImageErrorDomain, PINAnimatedImageErrorCode) { - /** No error, yay! */ - PINAnimatedImageErrorNoError = 0, - /** Could not create a necessary file. */ - PINAnimatedImageErrorFileCreationError, - /** Could not get a file handle to the necessary file. */ - PINAnimatedImageErrorFileHandleError, - /** Could not decode the image. */ - PINAnimatedImageErrorImageFrameError, - /** Could not memory map the file. */ - PINAnimatedImageErrorMappingError, - /** File write error */ - PINAnimatedImageErrorFileWrite, -}; - -/** - The processing status of the animated image. - */ -typedef NS_ENUM(NSUInteger, PINAnimatedImageStatus) { - /** No work has been done. */ - PINAnimatedImageStatusUnprocessed = 0, - /** Info about the animated image and the cover image are available. */ - PINAnimatedImageStatusInfoProcessed, - /** At least one set of frames has been decoded to a file. It's safe to start playback. */ - PINAnimatedImageStatusFirstFileProcessed, - /** The entire animated image has been processed. */ - PINAnimatedImageStatusProcessed, - /** Processing was canceled. */ - PINAnimatedImageStatusCanceled, - /** There was an error in processing. */ - PINAnimatedImageStatusError, -}; - -extern const Float32 kPINAnimatedImageDefaultDuration; - -/** - Called when the cover image of an animatedImage is ready. - */ -typedef void(^PINAnimatedImageInfoReady)(PINImage * _Nonnull coverImage); - -@protocol PINAnimatedImage; - -@interface PINAnimatedImage : NSObject - -/** - @abstract The maximum number of frames per second supported. - */ -+ (NSInteger)maximumFramesPerSecond; - -/** - @abstract Return the duration at a given index. - - @warning *Must be overridden by subclass - */ -- (CFTimeInterval)durationAtIndex:(NSUInteger)index; - -/** - @abstract Return the total number of frames in the animated image. - - @warning *Must be overridden by subclass - */ -@property (nonatomic, readonly) size_t frameCount; - -/** - @abstract Return the total duration of the animated image's playback. - */ -@property (nonatomic, readonly) CFTimeInterval totalDuration; - -/** - The number of frames to play per second * display refresh rate (defined as 60 which appears to be true on iOS). You probably want to - set this value on a displayLink. - @warning Access to this property before status == PINAnimatedImageStatusInfoProcessed is undefined. - */ -@property (nonatomic, readonly) NSUInteger frameInterval; - -@end - -@protocol PINCachedAnimatedFrameProvider - -@required - -- (nullable CGImageRef)cachedFrameImageAtIndex:(NSUInteger)index; - -@end - -@protocol PINAnimatedImage - -/** - @abstract the underlying data of the animated image if available. - */ -@property (nonatomic, readonly) NSData *data; - -/** - @abstract the native width of the animated image. - */ -@property (nonatomic, readonly) uint32_t width; - -/** - @abstract the native height of the animated image. - */ -@property (nonatomic, readonly) uint32_t height; - -/** - @abstract number of bytes per frame. - */ -@property (nonatomic, readonly) uint32_t bytesPerFrame; - -/** - @abstract Return the total duration of the animated image's playback. - */ -@property (nonatomic, readonly) CFTimeInterval totalDuration; -/** - @abstract Return the interval at which playback should occur. Will be set to a CADisplayLink's frame interval. - */ -@property (nonatomic, readonly) NSUInteger frameInterval; -/** - @abstract Return the total number of loops the animated image should play or 0 to loop infinitely. - */ -@property (nonatomic, readonly) size_t loopCount; -/** - @abstract Return the total number of frames in the animated image. - */ -@property (nonatomic, readonly) size_t frameCount; -/** - @abstract Return any error that has occurred. Playback will be paused if this returns non-nil. - */ -@property (nonatomic, readonly, nullable) NSError *error; - -/** - @abstract Return the image at a given index. - */ -- (nullable CGImageRef)imageAtIndex:(NSUInteger)index cacheProvider:(nullable id<PINCachedAnimatedFrameProvider>)cacheProvider; -/** - - @abstract Return the duration at a given index. - */ -- (CFTimeInterval)durationAtIndex:(NSUInteger)index; - -@end - -NS_ASSUME_NONNULL_END diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h deleted file mode 100644 index 9dbfbc9..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// PINAnimatedImageView+PINRemoteImage.h -// Pods -// -// Created by Garrett Moon on 4/19/18. -// - -#import "PINAnimatedImageView.h" - -#import "PINRemoteImageCategoryManager.h" - -@interface PINAnimatedImageView (PINRemoteImage) <PINRemoteImageCategory> - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView.h deleted file mode 100644 index b224f02..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINAnimatedImageView.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// PINAnimatedImageView.h -// Pods -// -// Created by Garrett Moon on 4/17/18. -// - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -#import "PINCachedAnimatedImage.h" - -@interface PINAnimatedImageView : PINImageView - -- (nonnull instancetype)initWithAnimatedImage:(nonnull PINCachedAnimatedImage *)animatedImage NS_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(nonnull NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER; - -@property (nullable, nonatomic, strong) PINCachedAnimatedImage *animatedImage; -@property (nullable, nonatomic, strong) NSString *animatedImageRunLoopMode; -@property (nonatomic, assign, getter=isPlaybackPaused) BOOL playbackPaused; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINButton+PINRemoteImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINButton+PINRemoteImage.h deleted file mode 100644 index 1659db9..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINButton+PINRemoteImage.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// UIButton+PINRemoteImage.h -// Pods -// -// Created by Garrett Moon on 8/18/14. -// -// - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -#import "PINRemoteImageManager.h" -#import "PINRemoteImageCategoryManager.h" - -@interface PINButton (PINRemoteImage) <PINRemoteImageCategory> - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINCachedAnimatedImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINCachedAnimatedImage.h deleted file mode 100644 index b3b6681..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINCachedAnimatedImage.h +++ /dev/null @@ -1,83 +0,0 @@ -// -// PINCachedAnimatedImage.h -// PINRemoteImage -// -// Created by Garrett Moon on 9/17/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" -#import "PINAnimatedImage.h" - -@interface PINCachedAnimatedImage : NSObject - -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithAnimatedImage:(id <PINAnimatedImage>)animatedImage NS_DESIGNATED_INITIALIZER; -- (instancetype)initWithAnimatedImageData:(NSData *)animatedImageData; - -/** - @abstract A block which receives the cover image. Should be called when the objects cover image is ready. - */ -@property (nonatomic, readwrite) PINAnimatedImageInfoReady coverImageReadyCallback; - -/** - @abstract Return the objects's cover image. - */ -@property (nonatomic, readonly) PINImage *coverImage; -/** - @abstract Return a boolean to indicate that the cover image is ready. - */ -@property (nonatomic, readonly) BOOL coverImageReady; -/** - @abstract Return the total duration of the animated image's playback. - */ -@property (nonatomic, readonly) CFTimeInterval totalDuration; -/** - @abstract Return the interval at which playback should occur. Will be set to a CADisplayLink's frame interval. - */ -@property (nonatomic, readonly) NSUInteger frameInterval; -/** - @abstract Return the size of the underlying animated image. - */ -@property (nonatomic, readonly) CGSize size; -/** - @abstract Return the total number of loops the animated image should play or 0 to loop infinitely. - */ -@property (nonatomic, readonly) size_t loopCount; -/** - @abstract Return the total number of frames in the animated image. - */ -@property (nonatomic, readonly) size_t frameCount; -/** - @abstract Return the underlying data if available; - */ -@property (nonatomic, readonly) NSData *data; -/** - @abstract Return YES when playback is ready to occur. - */ -@property (nonatomic, readonly) BOOL playbackReady; -/** - @abstract Return any error that has occurred. Playback will be paused if this returns non-nil. - */ -@property (nonatomic, readonly) NSError *error; -/** - @abstract Should be called when playback is ready. - */ -@property (nonatomic, readwrite) dispatch_block_t playbackReadyCallback; - -/** - @abstract Return the image at a given index. - */ -- (CGImageRef)imageAtIndex:(NSUInteger)index; -/** - @abstract Return the duration at a given index. - */ -- (CFTimeInterval)durationAtIndex:(NSUInteger)index; -/** - @abstract Clear any cached data. Called when playback is paused. - */ -- (void)clearAnimatedImageCache; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINGIFAnimatedImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINGIFAnimatedImage.h deleted file mode 100644 index e106f9e..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINGIFAnimatedImage.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// PINGIFAnimatedImage.h -// PINRemoteImage -// -// Created by Garrett Moon on 9/17/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> - -#import "PINAnimatedImage.h" - -@interface PINGIFAnimatedImage : PINAnimatedImage <PINAnimatedImage> - -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithAnimatedImageData:(NSData *)animatedImageData NS_DESIGNATED_INITIALIZER; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINImageView+PINRemoteImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINImageView+PINRemoteImage.h deleted file mode 100644 index f5c4b7e..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINImageView+PINRemoteImage.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// UIImageView+PINRemoteImage.h -// Pods -// -// Created by Garrett Moon on 8/17/14. -// -// - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -#import "PINRemoteImageManager.h" -#import "PINRemoteImageCategoryManager.h" - -@interface PINImageView (PINRemoteImage) <PINRemoteImageCategory> - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINProgressiveImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINProgressiveImage.h deleted file mode 100644 index 1c68b1a..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINProgressiveImage.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// PINProgressiveImage.h -// Pods -// -// Created by Garrett Moon on 2/9/15. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -@class PINRemoteImageDownloadTask; - -/** An object which store the data of a downloading image and vends progressive scans **/ -@interface PINProgressiveImage : NSObject - -@property (atomic, copy, nonnull) NSArray *progressThresholds; -@property (atomic, assign) CFTimeInterval estimatedRemainingTimeThreshold; -@property (nonatomic, strong, readonly, nonnull) NSURLSessionDataTask * dataTask; -@property (nonatomic, readonly) CFTimeInterval estimatedRemainingTime; - -- (nonnull instancetype)init NS_UNAVAILABLE; -- (nonnull instancetype)initWithDataTask:(nonnull NSURLSessionDataTask *)dataTask; - -- (void)updateProgressiveImageWithData:(nonnull NSData *)data expectedNumberOfBytes:(int64_t)expectedNumberOfBytes isResume:(BOOL)isResume; - -/** - Returns the latest image based on thresholds, returns nil if no new image is generated. - - @param blurred A boolean to indicate if the image should be blurred. - @param maxProgressiveRenderSize The maximum dimensions at which to apply a blur. If an image exceeds either the height. - or width of this dimension, the image will *not* be blurred regardless of the blurred parameter. - @param renderedImageQuality Value between 0 and 1. Computed by dividing the received number of bytes by the expected number of bytes. - @return PINImage A progressive scan of the image or nil if a new one has not been generated. - */ -- (nullable PINImage *)currentImageBlurred:(BOOL)blurred maxProgressiveRenderSize:(CGSize)maxProgressiveRenderSize renderedImageQuality:(nonnull out CGFloat *)renderedImageQuality; - -/** - Returns the current data for the image. - - @return NSData The current data for the image. - */ -- (nullable NSData *)data; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImage.h deleted file mode 100644 index 140e143..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImage.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// PINRemoteImage.h -// -// Created by Garrett Moon on 8/17/14. -// -// - -#import "PINRemoteImageMacros.h" - -#if USE_PINCACHE - #import "PINCache+PINRemoteImageCaching.h" -#endif - -#import "NSData+ImageDetectors.h" -#import "PINAlternateRepresentationProvider.h" -#import "PINCachedAnimatedImage.h" -#import "PINGIFAnimatedImage.h" -#import "PINWebPAnimatedImage.h" -#import "PINRemoteImageManager.h" -#import "PINRemoteImageCategoryManager.h" -#import "PINRemoteImageManagerResult.h" -#import "PINRemoteImageCaching.h" -#import "PINProgressiveImage.h" -#import "PINURLSessionManager.h" -#import "PINRequestRetryStrategy.h" diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCaching.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCaching.h deleted file mode 100644 index bfafbdf..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCaching.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// PINRemoteImageCaching.h -// Pods -// -// Created by Aleksei Shevchenko on 7/25/16. -// -// - -#import <Foundation/Foundation.h> - -NS_ASSUME_NONNULL_BEGIN - -@protocol PINRemoteImageCaching; -typedef void (^PINRemoteImageCachingObjectBlock)(id<PINRemoteImageCaching> cache, NSString *key, id __nullable object); - -/** - * Image Cache is responsible for actual image caching. - */ -@protocol PINRemoteImageCaching <NSObject> - -//****************************************************************************************************** -// Memory cache methods -//****************************************************************************************************** -- (nullable id)objectFromMemoryForKey:(NSString *)key; -- (void)setObjectInMemory:(id)object forKey:(NSString *)key withCost:(NSUInteger)cost; - -//****************************************************************************************************** -// Disk cache methods -//****************************************************************************************************** -- (nullable id)objectFromDiskForKey:(NSString *)key; -- (void)objectFromDiskForKey:(NSString *)key completion:(nullable PINRemoteImageCachingObjectBlock)completion; -- (void)setObjectOnDisk:(id)object forKey:(NSString *)key; - - -- (BOOL)objectExistsForKey:(NSString *)key; - -- (void)removeObjectForKey:(NSString *)key; -- (void)removeObjectForKey:(NSString *)key completion:(nullable PINRemoteImageCachingObjectBlock)completion; -- (void)removeAllObjects; - -@optional - -- (void)removeObjectForKeyFromMemory:(NSString *)key; -- (void)setObjectInMemory:(id)object forKey:(NSString *)key withCost:(NSUInteger)cost withAgeLimit:(NSTimeInterval)ageLimit; -- (void)setObjectOnDisk:(id)object forKey:(NSString *)key withAgeLimit:(NSTimeInterval)ageLimit; -- (BOOL)memoryCacheIsTTLCache; -- (BOOL)diskCacheIsTTLCache; - -@end - - -NS_ASSUME_NONNULL_END diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCategoryManager.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCategoryManager.h deleted file mode 100644 index ec94124..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageCategoryManager.h +++ /dev/null @@ -1,230 +0,0 @@ -// -// PINRemoteImageCategory.h -// Pods -// -// Created by Garrett Moon on 11/4/14. -// -// - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -#import "PINRemoteImageManager.h" - -@protocol PINRemoteImageCategory; - -/** - PINRemoteImageCategoryManager is a class that handles subclassing image display classes. PINImageView+PINRemoteImage, UIButton+PINRemoteImage, etc, all delegate their work to this class. If you'd like to create a category to display an image on a view, you should mimic one of the above categories. - */ - -@interface PINRemoteImageCategoryManager : NSObject - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url - placeholderImage:(nullable PINImage *)placeholderImage; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url - placeholderImage:(nullable PINImage *)placeholderImage - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url - processorKey:(nullable NSString *)processorKey - processor:(nullable PINRemoteImageManagerImageProcessor)processor; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url - placeholderImage:(nullable PINImage *)placeholderImage - processorKey:(nullable NSString *)processorKey - processor:(nullable PINRemoteImageManagerImageProcessor)processor; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURL:(nullable NSURL *)url - processorKey:(nullable NSString *)processorKey - processor:(nullable PINRemoteImageManagerImageProcessor)processor - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURLs:(nullable NSArray <NSURL *> *)urls - placeholderImage:(nullable PINImage *)placeholderImage - processorKey:(nullable NSString *)processorKey - processor:(nullable PINRemoteImageManagerImageProcessor)processor - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURLs:(nullable NSArray <NSURL *> *)urls; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURLs:(nullable NSArray <NSURL *> *)urls - placeholderImage:(nullable PINImage *)placeholderImage; - -+ (void)setImageOnView:(nonnull id <PINRemoteImageCategory>)view - fromURLs:(nullable NSArray <NSURL *> *)urls - placeholderImage:(nullable PINImage *)placeholderImage - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -+ (void)cancelImageDownloadOnView:(nonnull id <PINRemoteImageCategory>)view; - -+ (nullable NSUUID *)downloadImageOperationUUIDOnView:(nonnull id <PINRemoteImageCategory>)view; - -+ (void)setDownloadImageOperationUUID:(nullable NSUUID *)downloadImageOperationUUID onView:(nonnull id <PINRemoteImageCategory>)view; - -+ (BOOL)updateWithProgressOnView:(nonnull id <PINRemoteImageCategory>)view; - -+ (void)setUpdateWithProgressOnView:(BOOL)updateWithProgress onView:(nonnull id <PINRemoteImageCategory>)view; - -@end - -/** - Protocol to implement on UIView subclasses to support PINRemoteImage - */ -@protocol PINRemoteImageCategory <NSObject> - -//Call manager - -/** - Set the image from the given URL. - - @param url NSURL to fetch from. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url; - -/** - Set the image from the given URL and set placeholder image while image at URL is being retrieved. - - @param url NSURL to fetch from. - @param placeholderImage PINImage to set on the view while the image at URL is being retrieved. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url placeholderImage:(nullable PINImage *)placeholderImage; - -/** - Set the image from the given URL and call completion when finished. - - @param url NSURL to fetch from. - @param completion Called when url has been retrieved and set on view. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Set the image from the given URL, set placeholder while image at url is being retrieved and call completion when finished. - - @param url NSURL to fetch from. - @param placeholderImage PINImage to set on the view while the image at URL is being retrieved. - @param completion Called when url has been retrieved and set on view. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url placeholderImage:(nullable PINImage *)placeholderImage completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Retrieve the image from the given URL, process it using the passed in processor block and set result on view. - - @param url NSURL to fetch from. - @param processorKey NSString key to uniquely identify processor. Used in caching. - @param processor PINRemoteImageManagerImageProcessor processor block which should return the processed image. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url processorKey:(nullable NSString *)processorKey processor:(nullable PINRemoteImageManagerImageProcessor)processor; - -/** - Set placeholder on view and retrieve the image from the given URL, process it using the passed in processor block and set result on view. - - @param url NSURL to fetch from. - @param placeholderImage PINImage to set on the view while the image at URL is being retrieved. - @param processorKey NSString key to uniquely identify processor. Used in caching. - @param processor PINRemoteImageManagerImageProcessor processor block which should return the processed image. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url placeholderImage:(nullable PINImage *)placeholderImage processorKey:(nullable NSString *)processorKey processor:(nullable PINRemoteImageManagerImageProcessor)processor; - -/** - Retrieve the image from the given URL, process it using the passed in processor block and set result on view. Call completion after image has been fetched, processed and set on view. - - @param url NSURL to fetch from. - @param processorKey NSString key to uniquely identify processor. Used in caching. - @param processor PINRemoteImageManagerImageProcessor processor block which should return the processed image. - @param completion Called when url has been retrieved and set on view. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url processorKey:(nullable NSString *)processorKey processor:(nullable PINRemoteImageManagerImageProcessor)processor completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Set placeholder on view and retrieve the image from the given URL, process it using the passed in processor block and set result on view. Call completion after image has been fetched, processed and set on view. - - @param url NSURL to fetch from. - @param placeholderImage PINImage to set on the view while the image at URL is being retrieved. - @param processorKey NSString key to uniquely identify processor. Used in caching. - @param processor PINRemoteImageManagerImageProcessor processor block which should return the processed image. - @param completion Called when url has been retrieved and set on view. - */ -- (void)pin_setImageFromURL:(nullable NSURL *)url placeholderImage:(nullable PINImage *)placeholderImage processorKey:(nullable NSString *)processorKey processor:(nullable PINRemoteImageManagerImageProcessor)processor completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Retrieve one of the images at the passed in URLs depending on previous network performance and set result on view. - - @param urls NSArray of NSURLs sorted in increasing quality - */ -- (void)pin_setImageFromURLs:(nullable NSArray <NSURL *> *)urls; - -/** - Set placeholder on view and retrieve one of the images at the passed in URLs depending on previous network performance and set result on view. - - @param urls NSArray of NSURLs sorted in increasing quality - @param placeholderImage PINImage to set on the view while the image at URL is being retrieved. - */ -- (void)pin_setImageFromURLs:(nullable NSArray <NSURL *> *)urls placeholderImage:(nullable PINImage *)placeholderImage; - -/** - Set placeholder on view and retrieve one of the images at the passed in URLs depending on previous network performance and set result on view. Call completion after image has been fetched and set on view. - - @param urls NSArray of NSURLs sorted in increasing quality - @param placeholderImage PINImage to set on the view while the image at URL is being retrieved. - @param completion Called when url has been retrieved and set on view. - */ -- (void)pin_setImageFromURLs:(nullable NSArray <NSURL *> *)urls placeholderImage:(nullable PINImage *)placeholderImage completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Cancels the image download. Guarantees that previous setImage calls will *not* have their results set on the image view after calling this (as opposed to PINRemoteImageManager which does not guarantee cancellation). - */ -- (void)pin_cancelImageDownload; - -/** - Returns the NSUUID associated with any PINRemoteImage task currently running on the view. - - @return NSUUID associated with any PINRemoteImage task currently running on the view. - */ -- (nullable NSUUID *)pin_downloadImageOperationUUID; - -/** - Set the current NSUUID associated with a PINRemoteImage task running on the view. - - @param downloadImageOperationUUID NSUUID associated with a PINRemoteImage task. - */ -- (void)pin_setDownloadImageOperationUUID:(nullable NSUUID *)downloadImageOperationUUID; - -/** - Whether the view should update with progress images (such as those provided by progressive JPEG images). - - @return BOOL value indicating whether the view should update with progress images - */ -@property (nonatomic, assign) BOOL pin_updateWithProgress; - -//Handle -- (void)pin_setPlaceholderWithImage:(nullable PINImage *)image; -- (void)pin_updateUIWithRemoteImageManagerResult:(nonnull PINRemoteImageManagerResult *)result; -- (void)pin_clearImages; -- (BOOL)pin_ignoreGIFs; - -@optional - -- (PINRemoteImageManagerDownloadOptions)pin_defaultOptions; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageMacros.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageMacros.h deleted file mode 100644 index 5f5dd8e..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageMacros.h +++ /dev/null @@ -1,70 +0,0 @@ -// -// PINRemoteImageMacros.h -// PINRemoteImage -// - -#import <Foundation/Foundation.h> - -#ifndef PINRemoteImageMacros_h -#define PINRemoteImageMacros_h - -#define PIN_TARGET_IOS (TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR || TARGET_OS_TV) -#define PIN_TARGET_MAC TARGET_OS_OSX - -#define PINRemoteImageLogging 0 -#if PINRemoteImageLogging -#define PINLog(args...) NSLog(args) -#else -#define PINLog(args...) -#endif - -#ifndef USE_PINCACHE - #if __has_include(<PINCache/PINCache.h>) || __has_include("PINCache.h") - #define USE_PINCACHE 1 - #else - #define USE_PINCACHE 0 - #endif -#endif - -#ifndef PIN_WEBP - #if __has_include(<WebPDecoder/decode.h>) || __has_include(<webp/decode.h>) - #define PIN_WEBP 1 - #else - #define PIN_WEBP 0 - #endif -#endif - -#if PIN_TARGET_IOS -#define PINImage UIImage -#define PINImageView UIImageView -#define PINButton UIButton -#define PINNSOperationSupportsBlur (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber_iOS_8_0) -#elif PIN_TARGET_MAC -#define PINImage NSImage -#define PINImageView NSImageView -#define PINButton NSButton -#define PINNSOperationSupportsBlur (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_10) -#define PINNSURLSessionTaskSupportsPriority (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_10) -#endif - -#define PINWeakify(var) __weak typeof(var) PINWeak_##var = var; - -#define PINStrongify(var) \ -_Pragma("clang diagnostic push") _Pragma("clang diagnostic ignored \"-Wshadow\"") __strong typeof(var) var = \ -PINWeak_##var; \ -_Pragma("clang diagnostic pop") - -#define BlockAssert(condition, desc, ...) \ -do { \ -__PRAGMA_PUSH_NO_EXTRA_ARG_WARNINGS \ -if (!(condition)) { \ -[[NSAssertionHandler currentHandler] handleFailureInMethod:_cmd \ -object:strongSelf file:[NSString stringWithUTF8String:__FILE__] \ -lineNumber:__LINE__ description:(desc), ##__VA_ARGS__]; \ -} \ -__PRAGMA_POP_NO_EXTRA_ARG_WARNINGS \ -} while(0); - -#define PINAssertMain() NSAssert([NSThread isMainThread], @"Expected to be on the main thread."); - -#endif /* PINRemoteImageMacros_h */ diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManager.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManager.h deleted file mode 100644 index 8390707..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManager.h +++ /dev/null @@ -1,703 +0,0 @@ -// -// PINRemoteImageManager.h -// Pods -// -// Created by Garrett Moon on 8/17/14. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -#import "PINRemoteImageManagerResult.h" - -#define PINRemoteImageHTTPMaximumConnectionsPerHost UINT16_MAX - -@protocol PINRemoteImageManagerAlternateRepresentationProvider; -@protocol PINRemoteImageCaching; -@protocol PINRequestRetryStrategy; - -@class PINRemoteImageManagerConfiguration; -@class PINRemoteImageManagerResult; - -extern NSErrorDomain _Nonnull const PINRemoteImageManagerErrorDomain; - -/** - Error codes returned by PINRemoteImage - */ -typedef NS_ERROR_ENUM(PINRemoteImageManagerErrorDomain, PINRemoteImageManagerError) { - /** The image failed to decode */ - PINRemoteImageManagerErrorFailedToDecodeImage = 1, - /** The image could not be downloaded and therefore could not be processed */ - PINRemoteImageManagerErrorFailedToFetchImageForProcessing = 2, - /** The image returned by the processor block was nil */ - PINRemoteImageManagerErrorFailedToProcessImage = 3, - /** The image in the cache was invalid */ - PINRemoteImageManagerErrorInvalidItemInCache = 4, - /** The image at the URL was empty */ - PINRemoteImageManagerErrorImageEmpty = 5, -}; - -/** - Options with which to download and process images - */ -typedef NS_OPTIONS(NSUInteger, PINRemoteImageManagerDownloadOptions) { - /** Download and process with default options (no other options set) */ - PINRemoteImageManagerDownloadOptionsNone = 0, - /** Set to disallow any alternate representations such as Animated Images */ - PINRemoteImageManagerDisallowAlternateRepresentations = 1, - /** Skip decoding the image before returning. This means smaller images returned, but images will be decoded on the main thread when set on an image view */ - PINRemoteImageManagerDownloadOptionsSkipDecode = 1 << 1, - /** Skip the early check of the memory cache */ - PINRemoteImageManagerDownloadOptionsSkipEarlyCheck = 1 << 2, - /** Save processed images as JPEGs in the cache. The default is PNG to support transparency */ - PINRemoteImageManagerSaveProcessedImageAsJPEG = 1 << 3, - /** Ignore cache and force download */ - PINRemoteImageManagerDownloadOptionsIgnoreCache = 1 << 4, - /** Skip download retry */ - PINRemoteImageManagerDownloadOptionsSkipRetry = 1 << 5, - /** - * Do not honor HTTP Cache-Control headers - * By default, PINRemoteImage will by default respect 'no-store', 'no-cache', 'max-age', - * 'Expires', and 'must-revalidate'. Set this flag to ignore those headers. - * TODO: Currently PINRemoteImage will re-download images that only must be re-validated. In the - * future this could be improved with revalidation behavior that stores ETag or Last-Modified - * values and only makes HEAD requests to see if these headers are unchanged. - * see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control and - * https://tools.ietf.org/html/rfc7234*/ - PINRemoteImageManagerDownloadOptionsIgnoreCacheControlHeaders = 1 << 6 -}; - -/** - Priority to download and process image at. - */ -typedef NS_ENUM(NSUInteger, PINRemoteImageManagerPriority) { - /** Low priority */ - PINRemoteImageManagerPriorityLow = 0, - /** Default priority */ - PINRemoteImageManagerPriorityDefault, - /** High priority */ - PINRemoteImageManagerPriorityHigh, - PINRemoteImageManagerPriorityVeryHigh DEPRECATED_ATTRIBUTE = PINRemoteImageManagerPriorityHigh, - PINRemoteImageManagerPriorityVeryLow DEPRECATED_ATTRIBUTE = PINRemoteImageManagerPriorityLow, - PINRemoteImageManagerPriorityMedium DEPRECATED_ATTRIBUTE = PINRemoteImageManagerPriorityDefault, -}; - -float dataTaskPriorityWithImageManagerPriority(PINRemoteImageManagerPriority priority); - -/** - Completion called for many PINRemoteImage tasks as well as progress updates. Passed in a PINRemoteImageManagerResult. - - @param result PINRemoteImageManagerResult which contains the downloaded image. - */ -typedef void (^PINRemoteImageManagerImageCompletion)(PINRemoteImageManagerResult * __nonnull result); - -/** - Processor block to post-process a downloaded image. Passed in a PINRemoteImageManagerResult and a pointer to an NSUInteger which can be updated to indicate the cost of processing the image. - - @param result PINRemoteImageManagerResult which contains the downloaded image. - @param cost NSUInteger point which can be modified to indicate the cost of processing the image. This is used when determining which cache objects to evict on memory pressure. - - @return return the processed UIImage - */ -typedef PINImage * _Nullable(^PINRemoteImageManagerImageProcessor)(PINRemoteImageManagerResult * __nonnull result, NSUInteger * __nonnull cost); - -/** - PINRemoteImageManager is the main workhorse of PINRemoteImage. It is unnecessary to access directly if you simply - wish to download images and have them rendered in a UIImageView, UIButton or PINAnimatedImageView. - - However, if you wish to download images directly, this class is your guy / gal. - - You can use this class to download images, postprocess downloaded images, prefetch images, download images progressively, or download one image in a set of images depending on network performance. - */ - -/** - Completion Handler block which will be forwarded to NSURLSessionTaskDelegate's completion handler - - @param disposition One of several constants that describes how the challenge should be handled. - @param credential The credential that should be used for authentication if disposition is NSURLSessionAuthChallengeUseCredential; otherwise, NULL. - */ -typedef void(^PINRemoteImageManagerAuthenticationChallengeCompletionHandler)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * __nullable credential); - -/** - Authentication challenge handler - - @param task The task whose request requires authentication. - @param challenge An object that contains the request for authentication. - @param aHandler A PINRemoteImageManagerAuthenticationChallengeCompletionHandler, see example for further details. - */ -typedef void(^PINRemoteImageManagerAuthenticationChallenge)(NSURLSessionTask * __nullable task, NSURLAuthenticationChallenge * __nonnull challenge, PINRemoteImageManagerAuthenticationChallengeCompletionHandler __nullable aHandler); - - -/** - Request configuration handler. Used to modify a network request before it is executed. - Useful for adding custom, per-request headers. - - @param request The request about to be executed - */ -typedef NSURLRequest * _Nonnull(^PINRemoteImageManagerRequestConfigurationHandler)(NSURLRequest * __nonnull request); - - -/** - Handler called for many PINRemoteImage tasks providing the progress of the download. - - @param completedBytes Amount of bytes that have been downloaded so far. - @param totalBytes Total amount of bytes in the image being downloaded. - */ -typedef void(^PINRemoteImageManagerProgressDownload)(int64_t completedBytes, int64_t totalBytes); - -/** - Reports NSURLSessionTaskMetrics for download requests - - */ -typedef void(^PINRemoteImageManagerMetrics)(NSURL * __nonnull url, NSURLSessionTaskMetrics * __nonnull metrics) API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); - -/** An image downloading, processing and caching manager. It uses the concept of download and processing tasks to ensure that even if multiple calls to download or process an image are made, it only occurs one time (unless an item is no longer in the cache). PINRemoteImageManager is backed by GCD and safe to access from multiple threads simultaneously. It ensures that images are decoded off the main thread so that animation performance isn't affected. None of its exposed methods allow for synchronous access. However, it is optimized to call completions on the calling thread if an item is in its memory cache. **/ -@interface PINRemoteImageManager : NSObject - -@property (nonatomic, readonly, nonnull) id<PINRemoteImageCaching> cache; - -/** - Create and return a PINRemoteImageManager created with the specified configuration. If configuration is nil, [NSURLSessionConfiguration defaultConfiguration] is used. Specify a custom configuration if you need to configure timeout values, cookie policies, additional HTTP headers, etc. - @param sessionConfiguration The session configuration used to create the PINRemoteImageManager. - @return A PINRemoteImageManager with the specified configuration. - @note If you provide your own `sessionConfiguration`, please attention `HTTPMaximumConnectionsPerHost` property, it may causes timeout when in conjunction with `maxNumberOfConcurrentDownloads` if you set a larger number to `maxNumberOfConcurrentDownloads` but smaller number to `HTTPMaximumConnectionsPerHost`. - */ -- (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)sessionConfiguration; - -/** - Create and return a PINRemoteImageManager with the specified configuration and alternative representation delegate. If configuration is nil, [NSURLSessionConfiguration defaultConfiguration] is used. Specify a custom configuration if you need to configure timeout values, cookie policies, additional HTTP headers, etc. If alternativeRepresentationProvider is nil, the default is used (and supports PINAnimatedImageView). - @param sessionConfiguration The session configuration used to create the PINRemoteImageManager. - @param alternativeRepresentationProvider a delegate which conforms to the PINRemoteImageManagerAlternateRepresentationProvider protocol. Provide a delegate if you want to have non image results. The manager maintains a weak reference to the delegate. @see PINRemoteImageManagerAlternateRepresentationProvider for an example. - @return A PINRemoteImageManager with the specified configuration. - @note If you provide your own `sessionConfiguration`, please attention `HTTPMaximumConnectionsPerHost` property, it may causes timeout when in conjunction with `maxNumberOfConcurrentDownloads` if you set a larger number to `maxNumberOfConcurrentDownloads` but smaller number to `HTTPMaximumConnectionsPerHost`. - */ -- (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)sessionConfiguration - alternativeRepresentationProvider:(nullable id <PINRemoteImageManagerAlternateRepresentationProvider>)alternativeRepresentationProvider; - -/** - Create and return a PINRemoteImageManager with the specified configuration and alternative representation delegate. If configuration is nil, [NSURLSessionConfiguration defaultConfiguration] is used. Specify a custom configuration if you need to configure timeout values, cookie policies, additional HTTP headers, etc. If alternativeRepresentationProvider is nil, the default is used (and supports PINAnimatedImageView). - @param sessionConfiguration The session configuration used to create the PINRemoteImageManager. - @param alternateRepDelegate a delegate which conforms to the PINRemoteImageManagerAlternateRepresentationProvider protocol. Provide a delegate if you want to have non image results. The manager maintains a weak reference to the delegate. @see PINRemoteImageManagerAlternateRepresentationProvider for an example. - @param imageCache Optional delegate which conforms to the PINRemoteImageCaching protocol. Provide a delegate if you want to control image caching. By default, image manager will use most appropriate implementation available (based on PINCache or NSCache, depending on subspec)@see PINRemoteImageBasicCache for an example. - @return A PINRemoteImageManager with the specified configuration. - @note If you provide your own `sessionConfiguration`, please attention `HTTPMaximumConnectionsPerHost` property, it may causes timeout when in conjunction with `maxNumberOfConcurrentDownloads` if you set a larger number to `maxNumberOfConcurrentDownloads` but smaller number to `HTTPMaximumConnectionsPerHost`. - */ -- (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)sessionConfiguration - alternativeRepresentationProvider:(nullable id <PINRemoteImageManagerAlternateRepresentationProvider>)alternateRepDelegate - imageCache:(nullable id<PINRemoteImageCaching>)imageCache; - -/** - Create and return a PINRemoteImageManager with the specified configuration and alternative representation delegate. If configuration is nil, [NSURLSessionConfiguration defaultConfiguration] is used. Specify a custom configuration if you need to configure timeout values, cookie policies, additional HTTP headers, etc. If alternativeRepresentationProvider is nil, the default is used (and supports PINAnimatedImageView). - @param sessionConfiguration The session configuration used to create the PINRemoteImageManager. - @param alternateRepDelegate a delegate which conforms to the PINRemoteImageManagerAlternateRepresentationProvider protocol. Provide a delegate if you want to have non image results. The manager maintains a weak reference to the delegate. @see PINRemoteImageManagerAlternateRepresentationProvider for an example. - @param imageCache Optional delegate which conforms to the PINRemoteImageCaching protocol. Provide a delegate if you want to control image caching. By default, image manager will use most appropriate implementation available (based on PINCache or NSCache, depending on subspec)@see PINRemoteImageBasicCache for an example. - @param managerConfiguration The configuration used to create the PINRemoteImageManager. - @return A PINRemoteImageManager with the specified configuration. - @note If you provide your own `sessionConfiguration`, please attention `HTTPMaximumConnectionsPerHost` property, it may causes timeout when in conjunction with `maxNumberOfConcurrentDownloads` if you set a larger number to `maxNumberOfConcurrentDownloads` but smaller number to `HTTPMaximumConnectionsPerHost`. - */ -- (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)sessionConfiguration - alternativeRepresentationProvider:(nullable id <PINRemoteImageManagerAlternateRepresentationProvider>)alternateRepDelegate - imageCache:(nullable id<PINRemoteImageCaching>)imageCache - managerConfiguration:(nullable PINRemoteImageManagerConfiguration *)managerConfiguration NS_DESIGNATED_INITIALIZER; - -/** - Get the shared instance of PINRemoteImageManager - - @return Shared instance of PINRemoteImageManager - */ -+ (nonnull instancetype)sharedImageManager; - -/** - Sets the shared instance of PINRemoteImageManager to an instance with the supplied configuration. If configuration is nil, [NSURLSessionConfiguration ephemeralSessionConfiguration] is used. You specify a custom configuration if you need to configure timeout values, cookie policies, additional HTTP headers, etc. This method should not be used if the shared instance has already been created. - - @param configuration The configuration used to create the PINRemoteImageManager. - @note If you provide your own `sessionConfiguration`, please attention `HTTPMaximumConnectionsPerHost` property, it may causes timeout when in conjunction with `maxNumberOfConcurrentDownloads` if you set a larger number to `maxNumberOfConcurrentDownloads` but smaller number to `HTTPMaximumConnectionsPerHost`. - */ -+ (void)setSharedImageManagerWithConfiguration:(nullable NSURLSessionConfiguration *)configuration; - - -/** - The result of this method is assigned to self.cache in init. If you wish to provide a customized cache to the manager you can subclass PINRemoteImageManager and return a custom object, implementing PINRemoteImageCaching protocol from this method. Same effect could be achieved by using initWithSessionConfiguration:alternativeRepresentationProvider:imageCache: initializer. - @deprecated Use the class method +defaultImageCache - @warning This method is meant only for override. It will be called *once* by an instance of PINRemoteImageManager. The default implementation creates a new cache on every call. If you're looking to access the cache being used by an instance of PINRemoteImageManager, @c cache. - @return An instance of a object, implementing PINRemoteImageCaching protocol. - */ -- (nonnull id<PINRemoteImageCaching>)defaultImageCache __attribute__((deprecated)); - -/** - The result of this method is assigned to self.cache in init. If you wish to provide a customized cache to the manager you can subclass PINRemoteImageManager and return a custom object, implementing PINRemoteImageCaching protocol from this method. Same effect could be achieved by using initWithSessionConfiguration:alternativeRepresentationProvider:imageCache: initializer. - @warning This method is meant only for override. It will be called *once* by an instance of PINRemoteImageManager. The default implementation creates a new cache on every call. If you're looking to access the cache being used by an instance of PINRemoteImageManager, @c cache. - @return An instance of a object, implementing PINRemoteImageCaching protocol. - */ -+ (nonnull id<PINRemoteImageCaching>)defaultImageCache; - -/** - * If you want a Ttl (maxAge) image cache, you can pass the result of this method explicitly into the initWithSessionConfiguration:alternativeRepresentationProvider:imageCache: initializer. - * @return An instance of a object, implementing PINRemoteImageCaching protocol. - */ -+ (nonnull id<PINRemoteImageCaching>)defaultImageTtlCache; - -/** - * Sets a custom header to be included in every request. Headers set from this method will override any header from NSURLSessionConfiguration. - * - * @deprecated Use NSURLSessionConfiguration.HTTPAdditionalHeaders instead - * @param value A value for the header. Pass in nil to remove a previously set value. - * @param header A string field for header. - - */ -- (void)setValue:(nullable NSString *)value forHTTPHeaderField:(nullable NSString *)header __attribute__((deprecated)); - -/** - Sets the Request Configuration Block. - - @param configurationBlock A PINRemoteImageManagerRequestConfigurationHandler block. - */ -- (void)setRequestConfiguration:(nullable PINRemoteImageManagerRequestConfigurationHandler)configurationBlock; - -/** - Set the Authentication Challenge Block. - - @param challengeBlock A PINRemoteImageManagerAuthenticationChallenge block. - */ -- (void)setAuthenticationChallenge:(nullable PINRemoteImageManagerAuthenticationChallenge)challengeBlock; - -/** - Set the minimum BPS to download the highest quality image in a set. - @see downloadImageWithURLs:options:progressImage:completion: - - @param highQualityBPSThreshold bytes per second minimum. Defaults to 500000. - @param completion Completion to be called once highQualityBPSThreshold has been set. - */ -- (void)setHighQualityBPSThreshold:(float)highQualityBPSThreshold completion:(nullable dispatch_block_t)completion; - -/** - Set the maximum BPS to download the lowest quality image in a set. - @see downloadImageWithURLs:options:progressImage:completion: - - @param lowQualityBPSThreshold bytes per second maximum. Defaults to 50000. - @param completion Completion to be called once lowQualityBPSThreshold has been set. - */ -- (void)setLowQualityBPSThreshold:(float)lowQualityBPSThreshold - completion:(nullable dispatch_block_t)completion; - -/** - Set whether high quality images should be downloaded when a low quality image is cached if network connectivity has improved. - @see downloadImageWithURLs:options:progressImage:completion: - - @param shouldUpgradeLowQualityImages if YES, low quality images will be 'upgraded'. - @param completion Completion to be called once shouldUpgradeLowQualityImages has been set. - */ -- (void)setShouldUpgradeLowQualityImages:(BOOL)shouldUpgradeLowQualityImages - completion:(nullable dispatch_block_t)completion; - -/** - Set the maximum number of concurrent operations (decompressing images, creating gifs, etc). - - @param maxNumberOfConcurrentOperations The maximum number of concurrent operations. Defaults to NSOperationQueueDefaultMaxConcurrentOperationCount. - @param completion Completion to be called once maxNumberOfConcurrentOperations is set. - */ -- (void)setMaxNumberOfConcurrentOperations:(NSInteger)maxNumberOfConcurrentOperations - completion:(nullable dispatch_block_t)completion; - -/** - Set the maximum number of concurrent downloads. - - @param maxNumberOfConcurrentDownloads The maximum number of concurrent downloads. Defaults to 10, maximum 65535. - @param completion Completion to be called once maxNumberOfConcurrentDownloads is set. - */ -- (void)setMaxNumberOfConcurrentDownloads:(NSInteger)maxNumberOfConcurrentDownloads - completion:(nullable dispatch_block_t)completion; - -/** - Set the estimated time remaining to download threshold at which to generate progressive images. Progressive images previews will only be generated if the estimated remaining time on a download is greater than estimatedTimeRemainingThreshold. If estimatedTimeRemainingThreshold is less than or equal to zero, this check is skipped. - - @param estimatedRemainingTimeThreshold The estimated remaining time threshold used to decide to skip progressive rendering. Defaults to 0.1. - @param completion Completion to be called once estimatedTimeRemainingTimeThreshold is set. - */ -- (void)setEstimatedRemainingTimeThresholdForProgressiveDownloads:(NSTimeInterval)estimatedRemainingTimeThreshold - completion:(nullable dispatch_block_t)completion; - -/** - Sets the progress at which progressive images are generated. By default this is @[@0.00, @0.35, @0.65] which generates at most, 3 progressive images. The first progressive image will only be generated when at least one scan has been completed (so you never see half an image). - - @param progressThresholds an array of progress thresholds at which to generate progressive images. progress thresholds should range from 0.00 - 1.00. Defaults to @[@0.00, @0.35, @0.65] - @param completion Completion to be called once progressThresholds is set. - */ -- (void)setProgressThresholds:(nonnull NSArray <NSNumber *> *)progressThresholds - completion:(nullable dispatch_block_t)completion; - -/** - Sets whether PINRemoteImage should blur progressive render results - - @param shouldBlur A bool value indicating whether PINRemoteImage should blur progressive render results - @param completion Completion to be called once progressThresholds is set. - */ -- (void)setProgressiveRendersShouldBlur:(BOOL)shouldBlur - completion:(nullable dispatch_block_t)completion; - -/** - Sets the maximum size of an image that PINRemoteImage will render progessively. If the image is too large, progressive rendering is skipped. - - @param maxProgressiveRenderSize A CGSize which indicates the max size PINRemoteImage will render a progressive image. If an image is larger in either dimension, progressive rendering will be skipped - @param completion Completion to be called once maxProgressiveRenderSize is set. - */ -- (void)setProgressiveRendersMaxProgressiveRenderSize:(CGSize)maxProgressiveRenderSize - completion:(nullable dispatch_block_t)completion; - -/** - Sets a metrics callback block to be called when NSURLSessionTaskMetrics are reported for downloads. - - @warning PINRemoteImageManager will hold a strong reference to metricsCallback. Avoid retain cycles by using weak references in the block! - */ -- (void)setMetricsCallback:(nullable PINRemoteImageManagerMetrics)metricsCallback - completion:(nullable dispatch_block_t)completion API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); - -/** - Prefetch an image at the given URL. - - @param url NSURL where the image to prefetch resides. - */ -- (nullable NSUUID *)prefetchImageWithURL:(nonnull NSURL *)url; - -/** - Prefetch an image at the given URL with given options. - - @param url NSURL where the image to prefetch resides. - @param options PINRemoteImageManagerDownloadOptions options with which to pefetch the image. - */ -- (nullable NSUUID *)prefetchImageWithURL:(nonnull NSURL *)url options:(PINRemoteImageManagerDownloadOptions)options; - -/** - Prefetch an image at the given URL with given options. - - @param url NSURL where the image to prefetch resides. - @param options PINRemoteImageManagerDownloadOptions options with which to prefetch the image. - @param priority PINRemoteImageManagerPriority priority of the operation when to prefetch the image. - */ -- (nullable NSUUID *)prefetchImageWithURL:(nonnull NSURL *)url options:(PINRemoteImageManagerDownloadOptions)options priority:(PINRemoteImageManagerPriority)priority; - -/** - Prefetch images at the given URLs. - - @param urls An array of NSURLs where the images to prefetch reside. - */ -- (nonnull NSArray<NSUUID *> *)prefetchImagesWithURLs:(nonnull NSArray <NSURL *> *)urls; - -/** - Prefetch images at the given URLs with given options. - - @param urls An array of NSURLs where the images to prefetch reside. - @param options PINRemoteImageManagerDownloadOptions options with which to pefetch the image. - */ -- (nonnull NSArray<NSUUID *> *)prefetchImagesWithURLs:(nonnull NSArray <NSURL *> *)urls options:(PINRemoteImageManagerDownloadOptions)options; - -/** - Prefetch images at the given URLs with given options. - - @param urls An array of NSURLs where the images to prefetch reside. - @param options PINRemoteImageManagerDownloadOptions options with which to pefetch the image. - @param priority PINRemoteImageManagerPriority priority of the operation to prefetch the image. - */ -- (nonnull NSArray<NSUUID *> *)prefetchImagesWithURLs:(nonnull NSArray <NSURL *> *)urls options:(PINRemoteImageManagerDownloadOptions)options priority:(PINRemoteImageManagerPriority)priority; - -/** - Download or retrieve from cache the image found at the url. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param progressImage PINRemoteImageManagerImageCompletion block which will be called to update progress of the image download. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param progressImage PINRemoteImageManagerImageCompletion block which will be called to update progress of the image download. - @param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url and process it before calling completion. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param priority PINRemoteImageManagerPriority which indicates the priority of the download task. - @param progressImage PINRemoteImageManagerImageCompletion block which will be called to update progress of the image download. - @param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - priority:(PINRemoteImageManagerPriority)priority - progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url and process it before calling completion. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param processorKey NSString key to uniquely identify processor and process. Will be used for caching processed images. - @param processor PINRemoteImageManagerImageProcessor block which will be called to post-process downloaded image. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - processorKey:(nullable NSString *)processorKey - processor:(nullable PINRemoteImageManagerImageProcessor)processor - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache the image found at the url and process it before calling completion. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - @param url NSURL where the image to download resides. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param processorKey NSString key to uniquely identify processor and process. Will be used for caching processed images. - @param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first. - @param processor PINRemoteImageManagerImageProcessor block which will be called to post-process downloaded image. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url - options:(PINRemoteImageManagerDownloadOptions)options - processorKey:(nullable NSString *)processorKey - processor:(nullable PINRemoteImageManagerImageProcessor)processor - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache one of the images found at the urls in the passed in array based on current network performance. URLs should be sorted from lowest quality image URL to highest. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - Unless setShouldUpgradeLowQualityImages is set to YES, this method checks the cache for all URLs and returns the highest quality version stored. It is possible though unlikely for a cached image to not be returned if it is still being cached while a call is made to this method and if network conditions have changed. See source for more details. - - @param urls An array of NSURLs of increasing cost to download. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param progressImage PINRemoteImageManagerImageCompletion block which will be called to update progress of the image download. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURLs:(nonnull NSArray <NSURL *> *)urls - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - -/** - Download or retrieve from cache one of the images found at the urls in the passed in array based on current network performance. URLs should be sorted from lowest quality image URL to highest. All completions are called on an arbitrary callback queue unless called on the main thread and the result is in the memory cache (this is an optimization to allow synchronous results for the UI when an object is cached in memory). - - Unless setShouldUpgradeLowQualityImages is set to YES, this method checks the cache for all URLs and returns the highest quality version stored. It is possible though unlikely for a cached image to not be returned if it is still being cached while a call is made to this method and if network conditions have changed. See source for more details. - - @param urls An array of NSURLs of increasing cost to download. - @param options PINRemoteImageManagerDownloadOptions options with which to fetch the image. - @param progressImage PINRemoteImageManagerImageCompletion block which will be called to update progress of the image download. - @param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded. - - @return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example). - */ -- (nullable NSUUID *)downloadImageWithURLs:(nonnull NSArray <NSURL *> *)urls - options:(PINRemoteImageManagerDownloadOptions)options - progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage - progressDownload:(nullable PINRemoteImageManagerProgressDownload)progressDownload - completion:(nullable PINRemoteImageManagerImageCompletion)completion; - - -/** - Adds an image manually into the memory and disk cache. - - @param data NSData with the raw image data. - @param url NSURL where the image resides. - @param processorKey NSString key to uniquely identify processor and process. Will be used for caching processed images. - @param additionalCost NSUInteger the additional cost (for cache eviction purposes) to generate the processed image - - @return A BOOL indicating if the image was successfully added to the cache. - */ -- (BOOL) insertImageDataIntoCache:(nonnull NSData*)data - withURL:(nonnull NSURL *)url - processorKey:(nullable NSString *)processorKey - additionalCost:(NSUInteger)additionalCost; - -/** - Returns the cacheKey for a given URL and processorKey. Exposed to be overridden if necessary or to be used with imageFromCacheWithCacheKey - @see imageFromCacheWithCacheKey:completion: - - @param url NSURL that was used to download image - @param processorKey An optional key to uniquely identify the processor used to post-process the downloaded image. - - @return returns an NSString which is the key used for caching. - */ -- (nonnull NSString *)cacheKeyForURL:(nonnull NSURL *)url processorKey:(nullable NSString *)processorKey; - -/** - @see imageFromCacheWithURL:processorKey:options:completion: - @deprecated - - @param cacheKey NSString key to look up image in the cache. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache. - */ -- (void)imageFromCacheWithCacheKey:(nonnull NSString *)cacheKey completion:(nonnull PINRemoteImageManagerImageCompletion)completion __attribute__((deprecated)); - -/** - @see imageFromCacheWithURL:processorKey:options:completion: - @deprecated - - @param cacheKey NSString key to look up image in the cache. - @param options options will be used to determine if the cached image should be decompressed or PINCachedAnimatedImages should be returned. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache. - */ -- (void)imageFromCacheWithCacheKey:(nonnull NSString *)cacheKey options:(PINRemoteImageManagerDownloadOptions)options completion:(nonnull PINRemoteImageManagerImageCompletion)completion __attribute__((deprecated)); - -/** - Directly get an image from the underlying cache. - - @param url NSURL that was used to download image - @param processorKey An optional key to uniquely identify the processor used to post-process the downloaded image. - @param options options will be used to determine if the cached image should be decompressed or PINCachedAnimatedImages should be returned. - @param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache. - */ -- (void)imageFromCacheWithURL:(nonnull NSURL *)url processorKey:(nullable NSString *)processorKey options:(PINRemoteImageManagerDownloadOptions)options completion:(nonnull PINRemoteImageManagerImageCompletion)completion; - -/** - @deprecated - @see synchronousImageFromCacheWithURL:processorKey:options: - - @param cacheKey NSString obtained from @c cacheKeyForURL:processorKey - @param options options will be used to determine if the cached image should be decompressed or PINCachedAnimatedImages should be returned. - - @return A PINRemoteImageManagerResult - */ -- (nonnull PINRemoteImageManagerResult *)synchronousImageFromCacheWithCacheKey:(nonnull NSString *)cacheKey options:(PINRemoteImageManagerDownloadOptions)options __attribute__((deprecated)); - -/** - Directly get an image from the underlying memory cache synchronously. - - @param url NSURL that was used to download image - @param processorKey An optional key to uniquely identify the processor used to post-process the downloaded image. - @param options options will be used to determine if the cached image should be decompressed or PINCachedAnimatedImages should be returned. - - @return A PINRemoteImageManagerResult - */ -- (nonnull PINRemoteImageManagerResult *)synchronousImageFromCacheWithURL:(nonnull NSURL *)url processorKey:(nullable NSString *)processorKey options:(PINRemoteImageManagerDownloadOptions)options; - -/** - Cancel a download. Canceling will only cancel the download if all other downloads are also canceled with their associated UUIDs. - Canceling *does not* guarantee that your completion will not be called. You can use the UUID provided on the result object to verify - the completion you want called is being called. - @see PINRemoteImageCategoryManager - - @param UUID NSUUID of the task to cancel. - */ -- (void)cancelTaskWithUUID:(nonnull NSUUID *)UUID; - -/** - Cancel a download. Canceling will only cancel the download if all other downloads are also canceled with their associated UUIDs. - Canceling *does not* guarantee that your completion will not be called. You can use the UUID provided on the result object to verify - the completion you want called is being called. - @param storeResumeData if YES and the server indicates it supports resuming downloads, downloaded data will be stored in the disk - cache and used to resume the download if the same URL is attempted to be downloaded in the future. - PINRemoteImageBasicCache does not support disk caching, use PINCache. - */ -- (void)cancelTaskWithUUID:(nonnull NSUUID *)UUID storeResumeData:(BOOL)storeResumeData; - -/** - Cancel all tasks. - */ -- (void)cancelAllTasks; - -/** - Cancel all tasks and store resume data if any task has. - */ -- (void)cancelAllTasksAndStoreResumeData:(BOOL)storeResumeData; - -/** - Set the priority of a download task. Since there is only one task per download, the priority of the download task will always be the last priority this method was called with. - - @param priority priority to set on the task. - @param UUID NSUUID of the task to set the priority on. - */ -- (void)setPriority:(PINRemoteImageManagerPriority)priority ofTaskWithUUID:(nonnull NSUUID *)UUID; - -/** - * @abstract set the progress callback on a download task. You can use this to add progress callbacks or remove them for in flight downloads - * - * @param progressImageCallback a PINRemoteImageManagerImageCompletion block to be called with a progress update - * @param UUID NSUUID of the task to set the priority on. - */ -- (void)setProgressImageCallback:(nullable PINRemoteImageManagerImageCompletion)progressImageCallback ofTaskWithUUID:(nonnull NSUUID *)UUID; - -/** - Set retry strategy for all requests - - @param retryStrategyCreationBlock a block which should create new instance of PINRequestRetryStrategy when called. - */ -- (void)setRetryStrategyCreationBlock:(_Nonnull id<PINRequestRetryStrategy> (^_Nonnull)(void))retryStrategyCreationBlock; - -@property (nonatomic, readonly) _Nonnull id<PINRequestRetryStrategy> (^_Nonnull retryStrategyCreationBlock)(void); - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManagerResult.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManagerResult.h deleted file mode 100644 index 41ff8c5..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRemoteImageManagerResult.h +++ /dev/null @@ -1,71 +0,0 @@ -// -// PINRemoteImageManagerResult.h -// Pods -// -// Created by Garrett Moon on 3/9/15. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageMacros.h" - -#if PIN_TARGET_IOS -#import <UIKit/UIKit.h> -#elif PIN_TARGET_MAC -#import <Cocoa/Cocoa.h> -#endif - -/** How the image was fetched. */ -typedef NS_ENUM(NSUInteger, PINRemoteImageResultType) { - /** Returned if no image is returned */ - PINRemoteImageResultTypeNone = 0, - /** Image was fetched from the memory cache */ - PINRemoteImageResultTypeMemoryCache, - /** Image was fetched from the disk cache */ - PINRemoteImageResultTypeCache, - /** Image was downloaded */ - PINRemoteImageResultTypeDownload, - /** Image is progress */ - PINRemoteImageResultTypeProgress, -}; - -@interface PINRemoteImageManagerResult : NSObject - -@property (nonatomic, readonly, strong, nullable) PINImage *image; -@property (nonatomic, readonly, strong, nullable) id alternativeRepresentation; -@property (nonatomic, readonly, assign) NSTimeInterval requestDuration; -@property (nonatomic, readonly, strong, nullable) NSError *error; -@property (nonatomic, readonly, assign) PINRemoteImageResultType resultType; -@property (nonatomic, readonly, strong, nullable) NSUUID *UUID; -@property (nonatomic, readonly, assign) CGFloat renderedImageQuality; -@property (nonatomic, readonly, assign) NSUInteger bytesSavedByResuming; -@property (nonatomic, readonly, strong, nullable) NSURLResponse *response; - -+ (nonnull instancetype)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error; - -+ (nonnull instancetype)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error - bytesSavedByResuming:(NSUInteger)bytesSavedByResuming; - -+ (nonnull instancetype)imageResultWithImage:(nullable PINImage *)image - alternativeRepresentation:(nullable id)alternativeRepresentation - requestLength:(NSTimeInterval)requestLength - resultType:(PINRemoteImageResultType)resultType - UUID:(nullable NSUUID *)uuid - response:(nullable NSURLResponse *)response - error:(nullable NSError *)error - renderedImageQuality:(CGFloat)renderedImageQuality; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRequestRetryStrategy.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRequestRetryStrategy.h deleted file mode 100644 index 448ec8d..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINRequestRetryStrategy.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// PINRequestRetryStrategy.h -// Pods -// -// Created by Hovhannes Safaryan on 9/24/16. -// -// - -#import <Foundation/Foundation.h> - -/* - Decide whether request should be retried based on the error. - **/ - -@protocol PINRequestRetryStrategy - -- (BOOL)shouldRetryWithError:(NSError *)error; -- (int)nextDelay; -- (void)incrementRetryCount; -- (int)numberOfRetries; - -@end - -@interface PINRequestExponentialRetryStrategy : NSObject<PINRequestRetryStrategy> - -- (instancetype)initWithRetryMaxCount:(int)retryMaxCount delayBase:(int)delayBase; - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINURLSessionManager.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINURLSessionManager.h deleted file mode 100644 index 5b25ff1..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINURLSessionManager.h +++ /dev/null @@ -1,51 +0,0 @@ -// -// PINURLSessionManager.h -// Pods -// -// Created by Garrett Moon on 6/26/15. -// -// - -#import <Foundation/Foundation.h> - -#import "PINRemoteImageManager.h" - -extern NSErrorDomain _Nonnull const PINURLErrorDomain; - -@protocol PINURLSessionManagerDelegate <NSObject> - -@required -- (void)didReceiveData:(nonnull NSData *)data forTask:(nonnull NSURLSessionTask *)task; - -@optional -- (void)didCollectMetrics:(nonnull NSURLSessionTaskMetrics *)metrics forURL:(nonnull NSURL *)url API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); -- (void)didReceiveResponse:(nonnull NSURLResponse *)response forTask:(nonnull NSURLSessionTask *)task; -- (void)didReceiveAuthenticationChallenge:(nonnull NSURLAuthenticationChallenge *)challenge forTask:(nullable NSURLSessionTask *)task completionHandler:(nonnull void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler; -- (void)didCompleteTask:(nonnull NSURLSessionTask *)task withError:(nullable NSError *)error; - -@end - -typedef void (^PINURLSessionDataTaskCompletion)(NSURLSessionTask * _Nonnull task, NSError * _Nullable error); - -@interface PINURLSessionManager : NSObject - -- (nonnull instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration; - -- (nonnull NSURLSessionDataTask *)dataTaskWithRequest:(nonnull NSURLRequest *)request - completionHandler:(nonnull PINURLSessionDataTaskCompletion)completionHandler; - -- (nonnull NSURLSessionDataTask *)dataTaskWithRequest:(nonnull NSURLRequest *)request - priority:(PINRemoteImageManagerPriority)priority - completionHandler:(nonnull PINURLSessionDataTaskCompletion)completionHandler; - -- (void)invalidateSessionAndCancelTasks; - -- (void)URLSession:(nonnull NSURLSession *)session task:(nonnull NSURLSessionTask *)task didFinishCollectingMetrics:(nonnull NSURLSessionTaskMetrics *)metrics API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)); - -@property (atomic, weak, nullable) id <PINURLSessionManagerDelegate> delegate; - -#if DEBUG -- (void)concurrentDownloads:(void (^_Nullable)(NSUInteger concurrentDownloads))concurrentDownloadsCompletion; -#endif - -@end diff --git a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINWebPAnimatedImage.h b/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINWebPAnimatedImage.h deleted file mode 100644 index 6bad969..0000000 --- a/BFRImageViewerDemo/Pods/PINRemoteImage/Source/Classes/include/PINWebPAnimatedImage.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PINWebPAnimatedImage.h -// PINRemoteImage -// -// Created by Garrett Moon on 9/14/17. -// Copyright © 2017 Pinterest. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import <CoreGraphics/CoreGraphics.h> - -#import "PINAnimatedImage.h" - -@interface PINWebPAnimatedImage : PINAnimatedImage <PINAnimatedImage> - -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithAnimatedImageData:(NSData *)animatedImageData NS_DESIGNATED_INITIALIZER; - -@end diff --git a/BFRImageViewerDemo/Pods/Pods.xcodeproj/project.pbxproj b/BFRImageViewerDemo/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index d3057ec..0000000 --- a/BFRImageViewerDemo/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,959 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0285F11136E34A29C872EDB8E8A96272 /* PINRemoteImageCategoryManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8795EBD6FE0ED76210CC00FD94B3BAF6 /* PINRemoteImageCategoryManager.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 099C91E9F45B03A983C563B47F860EC7 /* PINImage+WebP.h in Headers */ = {isa = PBXBuildFile; fileRef = 77DD4430B2127D3CCDA0EE0EB45E7C37 /* PINImage+WebP.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 09FBB00C63FFEBE992FBDB7B3A6A47C6 /* PINRemoteImageDownloadQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 37ACE7D802D36A89BB7E7FB9F1978AC0 /* PINRemoteImageDownloadQueue.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1018AC44E5AD8D17E1D307B8FEF5AC3F /* PINAlternateRepresentationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = D66843FAE9448ECFAD8390DA5BDC7D79 /* PINAlternateRepresentationProvider.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1860B07FDC2B350C0757D903B8578A18 /* Pods-BFRImageViewer-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5B3EA1F65B2D98A4AD133E44F283243D /* Pods-BFRImageViewer-dummy.m */; }; - 19B010F33C3A919DBD7F26773F57E4FB /* PINRemoteImageCaching.h in Headers */ = {isa = PBXBuildFile; fileRef = B21524BF838B1F3C51176F374E4CA5BF /* PINRemoteImageCaching.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1ADCAE485C53C030D4CDE1E5CA44D2C3 /* PINImageView+PINRemoteImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 14C06DEC92236008137324C462CFC536 /* PINImageView+PINRemoteImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1AF99A1A8FA613CCC96E3E0EECECCEAB /* PINRequestRetryStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = 035B2D56B29BB2E21C7EB5D214C26C6D /* PINRequestRetryStrategy.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 1AFC0012E384B858F64800530F878D5D /* PINRemoteImageProcessorTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 6C898DF7331E6E5DD2607EA6AA0CE2E0 /* PINRemoteImageProcessorTask.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1DF06ADFCD795822622410E06CC743F6 /* PINRemoteImageManagerConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = C18A81389CBC7835889C7CCE1CCC6FA6 /* PINRemoteImageManagerConfiguration.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 2163D05EDC3770C380E57E9C9D721C93 /* PINRemoteImageManagerConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 62F2AD6AA1F3A1E5768876504EF39B5A /* PINRemoteImageManagerConfiguration.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 21DB867B32B47A1699158239CBD896CD /* PINDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = F29CAE8624CA5A640F98A2FFF2A238AD /* PINDisplayLink.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 22E5260095AA9994047D3BCF82F692EF /* PINWebPAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = A4EA28E5438263F9D90DF27A76C8F999 /* PINWebPAnimatedImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 31F0E4AE0A1BAA346FAE0ED89A488B49 /* PINRemoteImageCallbacks.m in Sources */ = {isa = PBXBuildFile; fileRef = 724315A8388A5AD7DB72D4AFD9BB2243 /* PINRemoteImageCallbacks.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 327CE13C6D7891A846CB378C76F7EE4E /* PINResume.h in Headers */ = {isa = PBXBuildFile; fileRef = F659FF2A1F9767D71364106E0FEA8DC6 /* PINResume.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 34FE2FBD071A4CC9416565CCDA8B8A30 /* PINRemoteImageCategoryManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2145C19C4823C368040E612FDA4641A4 /* PINRemoteImageCategoryManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 42AC6C0C868078F1E892489A0CC8102F /* PINGIFAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B12A5D1BA6CACB40C8F243E9652DA88 /* PINGIFAnimatedImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 474F04A616CEDE40E69F619D629FBBD7 /* PINRemoteWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 43839BFD06E99F574431443F4AD2A025 /* PINRemoteWeakProxy.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 489AFB94EB4BFDD8FD3E72B057AE0F3B /* PINRemoteImageDownloadQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 4FD9BE8C58F6E266C3E4BB8F4B389656 /* PINRemoteImageDownloadQueue.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4D55AFE36B48942E6E913412CB7630C5 /* NSData+ImageDetectors.m in Sources */ = {isa = PBXBuildFile; fileRef = CC67D20BEE0B3FB423F210A3DB00F650 /* NSData+ImageDetectors.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5046E05E04161EABD7267DEAC23A9E84 /* PINOperationQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = DC219E9B9D3241CE498ABE51773DB04A /* PINOperationQueue.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 52C7047639C5279D68CC7A0C4D7CF47F /* NSHTTPURLResponse+MaxAge.m in Sources */ = {isa = PBXBuildFile; fileRef = 5F91BE554111104933F31BA347FB4673 /* NSHTTPURLResponse+MaxAge.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 53ED4DA8223B3E1C5D93A96F0FABB802 /* NSHTTPURLResponse+MaxAge.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C067988BC643B0DC85ADE7C962E600D /* NSHTTPURLResponse+MaxAge.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5BC714DC8EAFB106792F410CAACE9244 /* PINSpeedRecorder.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E653FC016454BA2B79AF9AF5BE26BF /* PINSpeedRecorder.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5F361FBD25BFC7923C9ACF610303C40D /* PINDisplayLink.h in Headers */ = {isa = PBXBuildFile; fileRef = D5F3742700436B5D4132BB8F7AD1086E /* PINDisplayLink.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5F38BC545B032EE7CABC0EDA489574EA /* PINCachedAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 6DEB1958AF34A7A08EE8136ABCA887D6 /* PINCachedAnimatedImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5F9433BCFC6D938CF30DDA707430705B /* PINURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 89D00C2D2F52683805E53C7D68C8CFD5 /* PINURLSessionManager.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 61E6501FD799088F1E4EF84CBBB09339 /* PINImage+ScaledImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 1C13CB7108CEE095AC43A618866BB77F /* PINImage+ScaledImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6616B22DCDA60512038F55DA22A5DF8D /* PINRemoteImageBasicCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 30C5A3C3B05C3F152FDFC6087F0B09CF /* PINRemoteImageBasicCache.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 704FCA38C151537ADFFE2774E8A1D6E7 /* PINRemoteImageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D29988C23393384B5FDEDBEDD7A46D7 /* PINRemoteImageManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 764B931E78649CF3B7B8FD03895C88F6 /* PINRemoteImageDownloadTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 167F4AF89C5410918F5B931F200E4E4A /* PINRemoteImageDownloadTask.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 76E97F63C0B824C1F646EB3010B05EEC /* PINRemoteLock.h in Headers */ = {isa = PBXBuildFile; fileRef = 75AFF4AA5194B68ADDCBA57E64AC169D /* PINRemoteLock.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 780119CDF405929416899CC10648E518 /* PINAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CAFDF8939A7AA00EA7732794769FDD6 /* PINAnimatedImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 793943930D49915023119E2818FAB06F /* PINRemoteImageTask+Subclassing.h in Headers */ = {isa = PBXBuildFile; fileRef = 14087A9145B2E4DDB179B48B6C2F966F /* PINRemoteImageTask+Subclassing.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7DB690C595F68BD6BB2159AD609B1BAB /* PINRemoteImageManager+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 305FB83D47E2DBE2D8B2C2DE53161C2A /* PINRemoteImageManager+Private.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 80B6A635993E2E05E8ADD1F989FCC9F6 /* PINRemoteImageMemoryContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 657ADA9A42B3C0DF91F4EB414EB95F50 /* PINRemoteImageMemoryContainer.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 812D08E62989BBA10498E48A1B8E4CF9 /* PINAlternateRepresentationProvider.m in Sources */ = {isa = PBXBuildFile; fileRef = 813C54C756BD94878446038099EA9510 /* PINAlternateRepresentationProvider.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8497E00552D413341ECBF61B365C5BF5 /* PINRemoteImageTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 418884CD641A08282DD778B2AF6EA18D /* PINRemoteImageTask.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8B622BECD664DC502779839F090E6801 /* PINRemoteImageMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 91550A66A1184E7F64AC8409B286A367 /* PINRemoteImageMacros.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8B8A7055AFC1157A60204C7C3B3D6FE8 /* PINAnimatedImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BC7F3CC450DB6E3C064D8C773B4CCCE /* PINAnimatedImageView.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8D990E85DD8429F6C1FBC18117189D29 /* PINRemoteImageManagerResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 29D8EBCD50608769709D350C13FFBE29 /* PINRemoteImageManagerResult.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8F45D22B6C7A5BAAB4B6CA23898F8F0A /* PINRemoteImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5C64CD3A6AB80870871E550020B11BCF /* PINRemoteImageManager.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 93A2A3D4A020CE0F6A25FA859FD11C44 /* PINGIFAnimatedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 0FE1027D8B7070D1BEE51FD1F94EFA4B /* PINGIFAnimatedImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9AF9A595FF10690E884BD6B7D555311E /* PINAnimatedImageView+PINRemoteImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 972F5B7C2D60D1D56D4423545D84A37B /* PINAnimatedImageView+PINRemoteImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9BCC08E280DE91A8BAD82120FE31EE57 /* PINAnimatedImageView+PINRemoteImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 87BED11E2796E4204F066A825340C386 /* PINAnimatedImageView+PINRemoteImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 9F0F1EF2A791BD145166E1FA7A59C81E /* PINButton+PINRemoteImage.m in Sources */ = {isa = PBXBuildFile; fileRef = E784AED54790E65E0FF77BFC45580880 /* PINButton+PINRemoteImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A32E4D5CFDE3E0C5F536B6F0DA802C10 /* PINImage+DecodedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = FDD0512DB8BF16D60D5DB30942D9B349 /* PINImage+DecodedImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A80D544A3044D86DF2993F74C5591C21 /* PINImage+WebP.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D7F6AF61493E0EAF982380618B44E1 /* PINImage+WebP.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A86D9952D0FD7F9DA4FFFFC5ADFA7BCF /* PINProgressiveImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 2168B9678F65E29652039361480C9AEF /* PINProgressiveImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AA72B1B33439E9BA94012D0B535AD98B /* PINOperationGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 55E57380D37883D84D5071D9A2811E7F /* PINOperationGroup.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AB765CBC717189A2B0AB5645FE33EE09 /* PINOperationGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F52025D18D880746BBD8C8AA97BA4E9 /* PINOperationGroup.h */; settings = {ATTRIBUTES = (Project, ); }; }; - ACE3CA86739D853D13936789D8F564E4 /* PINImage+DecodedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 6FD78C987DCEB63A2CDD4CB03E219269 /* PINImage+DecodedImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AD22B05696D094B6B54ECD6FEF6E7A60 /* PINResume.m in Sources */ = {isa = PBXBuildFile; fileRef = 587877AB95AC080459D5FB2FD4B584B8 /* PINResume.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B48EC5AB3F8FB93FB58F67B96F235E27 /* NSData+ImageDetectors.h in Headers */ = {isa = PBXBuildFile; fileRef = 1644D396EA1B10C4CE43ACD2FAEE8F37 /* NSData+ImageDetectors.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B601BB17D0A1FF53834EA8C8444DE1ED /* PINAnimatedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = EAC1E297434858C34DD080D54758E312 /* PINAnimatedImageView.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B63C7DB1DF8A1D2BDEE6CBAD24275A6F /* PINOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15DF37BBC232BE33D49C4BC74B7AB32C /* PINOperation.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BB2B2EDE3A176DD2E3735CEA499D1415 /* PINRequestRetryStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 696C1484D5D34AD868AD3048E936B3A4 /* PINRequestRetryStrategy.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BCFD5AB6DAB8802BFF13869D9889F8F8 /* PINButton+PINRemoteImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F857AAB7013B2A2167AAC2DAF31221D /* PINButton+PINRemoteImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - BE323E7261D9ADE3C9C18AB539303562 /* PINRemoteImage.h in Headers */ = {isa = PBXBuildFile; fileRef = D31B1884BA474ECB1021DF21A819BE89 /* PINRemoteImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C0919630F6368656B965558745E17F3B /* PINProgressiveImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 94D30AF6E74D6111A47727BE5829E366 /* PINProgressiveImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C4BB5E165B38C88785419C37BD97B28D /* PINImage+ScaledImage.h in Headers */ = {isa = PBXBuildFile; fileRef = A5B8932933168E6780AB9E6EB49FEF7E /* PINImage+ScaledImage.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C4E59876DC6B4090CA17BDA2BDE4D7BC /* PINRemoteImageBasicCache.m in Sources */ = {isa = PBXBuildFile; fileRef = A575658A6952FB975A8FB6BB2CB4771B /* PINRemoteImageBasicCache.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C87E0DBF60612A0D60D91B6BC9208BC4 /* PINRemoteImageCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 93349E0B0F486E99E5B33170E8339A3B /* PINRemoteImageCallbacks.h */; settings = {ATTRIBUTES = (Project, ); }; }; - CE1D5DFCF4AEFEBCA2577E500E0F2B61 /* PINSpeedRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 6A27D5AF5CE58D6A145F7589F9BBEC92 /* PINSpeedRecorder.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CF84333C8305D95638D54BE590DEB29A /* PINAnimatedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = F715C1F8DE83A2FC6B3ED834EE57D494 /* PINAnimatedImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D00581A0E76BA0F5FFBD7767C8613B3E /* PINRemoteWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A4339D45EF633EFEA0CFEC2D6A26D14 /* PINRemoteWeakProxy.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D0BAC7A7865F263B8469B96D7C263DD7 /* PINOperationQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7869A067EF9AB9E4DC84A3C38FA6507E /* PINOperationQueue.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D1D99484AEA8BD228C19B207DA5248B3 /* PINRemoteImageDownloadTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 146562F8B6A9120CEBF8D9801B3FB58D /* PINRemoteImageDownloadTask.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D1E331D330D00C8358FED8B448790936 /* PINOperation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EDB25DE9B7958C755FDB2E09360A5137 /* PINOperation-dummy.m */; }; - D457230757E6C03A435A8EADFFB63E89 /* PINRemoteImageTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 1992A045E339418C9BAE0634643DE7C0 /* PINRemoteImageTask.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D88DF1F2BB374950F3FC52C250C4875C /* PINOperationMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 95296C3CB6C5A09DAFB4AD9C2B8D0FB7 /* PINOperationMacros.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DC6FB04A083C55C9BA53DC50990BF520 /* PINOperationTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = D7CC832EF42943AFDBD1D869237EE0A0 /* PINOperationTypes.h */; settings = {ATTRIBUTES = (Project, ); }; }; - DCF8D9C71D240F071C2D7B16922CE756 /* PINRemoteImageManagerResult.m in Sources */ = {isa = PBXBuildFile; fileRef = E442E412AEA465A82A0A961561317FAE /* PINRemoteImageManagerResult.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - DD8DC1CB097FC5997334FAE6B40B5C67 /* PINRemoteImage-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CAF2E143CE937B846E128BE5462C90FF /* PINRemoteImage-dummy.m */; }; - ECDDFE8FFA5C1A16BB34194020B09993 /* PINRemoteLock.m in Sources */ = {isa = PBXBuildFile; fileRef = 86FC9ED9F10AD9DEDC2B5962C89A01CC /* PINRemoteLock.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - EFBBD6591FCD53499CEA002A0DBD707D /* PINCachedAnimatedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 70E09F0397462FF97C63DD517D70CC65 /* PINCachedAnimatedImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F603EF848066CB9BE7E21C22C1AC2A28 /* PINImageView+PINRemoteImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BBD9B4E367C8F0FCC72682F4E3FB864 /* PINImageView+PINRemoteImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F6B421214751261C7AB26DA14C4FA851 /* PINURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = DC8F8C29E7DD231EB131EC2F4F93D27C /* PINURLSessionManager.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F8447BCE32265D694BCAE83815B627B6 /* PINRemoteImageMemoryContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = EC156B8D2BCEB5984208FDE88DE8BDAE /* PINRemoteImageMemoryContainer.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F8B229B3189C49F3B325CBC0E9F59FAF /* PINRemoteImageProcessorTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 0717190CF83CF0EF2687283E43007A62 /* PINRemoteImageProcessorTask.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FD01C3E67A57033460B7C71508B46E67 /* PINWebPAnimatedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = F296F215AE94CEEACE18FC3D9EEB6A5E /* PINWebPAnimatedImage.m */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EE50787AEDFAA2BA86BD351BD1220C7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = E2A8B2A28D2EAB2E4CCF3B69E6792851; - remoteInfo = PINRemoteImage; - }; - BBD1F5F7F245A617489608EBAF92F1FB /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 57310B016450E63387C9D64F4933E995; - remoteInfo = PINOperation; - }; - F775FEA0F16F1E97FD3B9076E84CCC4E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 57310B016450E63387C9D64F4933E995; - remoteInfo = PINOperation; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 035B2D56B29BB2E21C7EB5D214C26C6D /* PINRequestRetryStrategy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRequestRetryStrategy.m; path = Source/Classes/PINRequestRetryStrategy.m; sourceTree = "<group>"; }; - 0717190CF83CF0EF2687283E43007A62 /* PINRemoteImageProcessorTask.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageProcessorTask.m; path = Source/Classes/PINRemoteImageProcessorTask.m; sourceTree = "<group>"; }; - 0FE1027D8B7070D1BEE51FD1F94EFA4B /* PINGIFAnimatedImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINGIFAnimatedImage.m; path = Source/Classes/AnimatedImages/PINGIFAnimatedImage.m; sourceTree = "<group>"; }; - 115A4FCB2A03922EC10B633F15359653 /* libPINRemoteImage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPINRemoteImage.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 14087A9145B2E4DDB179B48B6C2F966F /* PINRemoteImageTask+Subclassing.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINRemoteImageTask+Subclassing.h"; path = "Source/Classes/Categories/PINRemoteImageTask+Subclassing.h"; sourceTree = "<group>"; }; - 146562F8B6A9120CEBF8D9801B3FB58D /* PINRemoteImageDownloadTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageDownloadTask.h; path = Source/Classes/PINRemoteImageDownloadTask.h; sourceTree = "<group>"; }; - 14C06DEC92236008137324C462CFC536 /* PINImageView+PINRemoteImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINImageView+PINRemoteImage.h"; path = "Source/Classes/include/PINImageView+PINRemoteImage.h"; sourceTree = "<group>"; }; - 15DF37BBC232BE33D49C4BC74B7AB32C /* PINOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINOperation.h; path = Source/PINOperation.h; sourceTree = "<group>"; }; - 1644D396EA1B10C4CE43ACD2FAEE8F37 /* NSData+ImageDetectors.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSData+ImageDetectors.h"; path = "Source/Classes/include/NSData+ImageDetectors.h"; sourceTree = "<group>"; }; - 167F4AF89C5410918F5B931F200E4E4A /* PINRemoteImageDownloadTask.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageDownloadTask.m; path = Source/Classes/PINRemoteImageDownloadTask.m; sourceTree = "<group>"; }; - 1992A045E339418C9BAE0634643DE7C0 /* PINRemoteImageTask.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageTask.m; path = Source/Classes/PINRemoteImageTask.m; sourceTree = "<group>"; }; - 1C13CB7108CEE095AC43A618866BB77F /* PINImage+ScaledImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PINImage+ScaledImage.m"; path = "Source/Classes/Categories/PINImage+ScaledImage.m"; sourceTree = "<group>"; }; - 1F857AAB7013B2A2167AAC2DAF31221D /* PINButton+PINRemoteImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINButton+PINRemoteImage.h"; path = "Source/Classes/include/PINButton+PINRemoteImage.h"; sourceTree = "<group>"; }; - 2145C19C4823C368040E612FDA4641A4 /* PINRemoteImageCategoryManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageCategoryManager.h; path = Source/Classes/include/PINRemoteImageCategoryManager.h; sourceTree = "<group>"; }; - 2168B9678F65E29652039361480C9AEF /* PINProgressiveImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINProgressiveImage.m; path = Source/Classes/PINProgressiveImage.m; sourceTree = "<group>"; }; - 22C347595B1851A1E5B0A3762BB18EC9 /* libPINOperation.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPINOperation.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 27FB63967B4796CDB9B774498F92FDD4 /* Pods-BFRImageViewer.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BFRImageViewer.debug.xcconfig"; sourceTree = "<group>"; }; - 29D7F6AF61493E0EAF982380618B44E1 /* PINImage+WebP.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PINImage+WebP.m"; path = "Source/Classes/Categories/PINImage+WebP.m"; sourceTree = "<group>"; }; - 29D8EBCD50608769709D350C13FFBE29 /* PINRemoteImageManagerResult.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageManagerResult.h; path = Source/Classes/include/PINRemoteImageManagerResult.h; sourceTree = "<group>"; }; - 305FB83D47E2DBE2D8B2C2DE53161C2A /* PINRemoteImageManager+Private.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINRemoteImageManager+Private.h"; path = "Source/Classes/PINRemoteImageManager+Private.h"; sourceTree = "<group>"; }; - 30C5A3C3B05C3F152FDFC6087F0B09CF /* PINRemoteImageBasicCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageBasicCache.h; path = Source/Classes/PINRemoteImageBasicCache.h; sourceTree = "<group>"; }; - 34E04ED8C9C00EACF127DCFE4455A738 /* PINOperation.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PINOperation.release.xcconfig; sourceTree = "<group>"; }; - 369B5C6E17959D20849F74B6F5EF8BB8 /* PINRemoteImage.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PINRemoteImage.debug.xcconfig; sourceTree = "<group>"; }; - 37ACE7D802D36A89BB7E7FB9F1978AC0 /* PINRemoteImageDownloadQueue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageDownloadQueue.h; path = Source/Classes/PINRemoteImageDownloadQueue.h; sourceTree = "<group>"; }; - 3F52025D18D880746BBD8C8AA97BA4E9 /* PINOperationGroup.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINOperationGroup.h; path = Source/PINOperationGroup.h; sourceTree = "<group>"; }; - 418884CD641A08282DD778B2AF6EA18D /* PINRemoteImageTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageTask.h; path = Source/Classes/PINRemoteImageTask.h; sourceTree = "<group>"; }; - 43839BFD06E99F574431443F4AD2A025 /* PINRemoteWeakProxy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteWeakProxy.h; path = Source/Classes/PINRemoteWeakProxy.h; sourceTree = "<group>"; }; - 4503C73CAB8BBBF6E689FAC88DF9E21B /* Pods-BFRImageViewer-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-BFRImageViewer-acknowledgements.markdown"; sourceTree = "<group>"; }; - 49E653FC016454BA2B79AF9AF5BE26BF /* PINSpeedRecorder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINSpeedRecorder.h; path = Source/Classes/PINSpeedRecorder.h; sourceTree = "<group>"; }; - 4A4339D45EF633EFEA0CFEC2D6A26D14 /* PINRemoteWeakProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteWeakProxy.m; path = Source/Classes/PINRemoteWeakProxy.m; sourceTree = "<group>"; }; - 4C067988BC643B0DC85ADE7C962E600D /* NSHTTPURLResponse+MaxAge.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSHTTPURLResponse+MaxAge.h"; path = "Source/Classes/Categories/NSHTTPURLResponse+MaxAge.h"; sourceTree = "<group>"; }; - 4D29988C23393384B5FDEDBEDD7A46D7 /* PINRemoteImageManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageManager.h; path = Source/Classes/include/PINRemoteImageManager.h; sourceTree = "<group>"; }; - 4FD9BE8C58F6E266C3E4BB8F4B389656 /* PINRemoteImageDownloadQueue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageDownloadQueue.m; path = Source/Classes/PINRemoteImageDownloadQueue.m; sourceTree = "<group>"; }; - 55E57380D37883D84D5071D9A2811E7F /* PINOperationGroup.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINOperationGroup.m; path = Source/PINOperationGroup.m; sourceTree = "<group>"; }; - 587877AB95AC080459D5FB2FD4B584B8 /* PINResume.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINResume.m; path = Source/Classes/PINResume.m; sourceTree = "<group>"; }; - 5B3EA1F65B2D98A4AD133E44F283243D /* Pods-BFRImageViewer-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-BFRImageViewer-dummy.m"; sourceTree = "<group>"; }; - 5C64CD3A6AB80870871E550020B11BCF /* PINRemoteImageManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageManager.m; path = Source/Classes/PINRemoteImageManager.m; sourceTree = "<group>"; }; - 5CAFDF8939A7AA00EA7732794769FDD6 /* PINAnimatedImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINAnimatedImage.h; path = Source/Classes/include/PINAnimatedImage.h; sourceTree = "<group>"; }; - 5DBFE22EE3DB87BD9B93FC55683DF1AC /* PINOperation.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PINOperation.debug.xcconfig; sourceTree = "<group>"; }; - 5F91BE554111104933F31BA347FB4673 /* NSHTTPURLResponse+MaxAge.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSHTTPURLResponse+MaxAge.m"; path = "Source/Classes/Categories/NSHTTPURLResponse+MaxAge.m"; sourceTree = "<group>"; }; - 62F2AD6AA1F3A1E5768876504EF39B5A /* PINRemoteImageManagerConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageManagerConfiguration.h; path = Source/Classes/PINRemoteImageManagerConfiguration.h; sourceTree = "<group>"; }; - 657ADA9A42B3C0DF91F4EB414EB95F50 /* PINRemoteImageMemoryContainer.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageMemoryContainer.m; path = Source/Classes/PINRemoteImageMemoryContainer.m; sourceTree = "<group>"; }; - 68499F09BED7B1200F7B6DD661DF3FD9 /* PINRemoteImage.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PINRemoteImage.release.xcconfig; sourceTree = "<group>"; }; - 696C1484D5D34AD868AD3048E936B3A4 /* PINRequestRetryStrategy.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRequestRetryStrategy.h; path = Source/Classes/include/PINRequestRetryStrategy.h; sourceTree = "<group>"; }; - 6A27D5AF5CE58D6A145F7589F9BBEC92 /* PINSpeedRecorder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINSpeedRecorder.m; path = Source/Classes/PINSpeedRecorder.m; sourceTree = "<group>"; }; - 6C898DF7331E6E5DD2607EA6AA0CE2E0 /* PINRemoteImageProcessorTask.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageProcessorTask.h; path = Source/Classes/PINRemoteImageProcessorTask.h; sourceTree = "<group>"; }; - 6DEB1958AF34A7A08EE8136ABCA887D6 /* PINCachedAnimatedImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINCachedAnimatedImage.h; path = Source/Classes/include/PINCachedAnimatedImage.h; sourceTree = "<group>"; }; - 6FD78C987DCEB63A2CDD4CB03E219269 /* PINImage+DecodedImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PINImage+DecodedImage.m"; path = "Source/Classes/Categories/PINImage+DecodedImage.m"; sourceTree = "<group>"; }; - 70E09F0397462FF97C63DD517D70CC65 /* PINCachedAnimatedImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINCachedAnimatedImage.m; path = Source/Classes/AnimatedImages/PINCachedAnimatedImage.m; sourceTree = "<group>"; }; - 724315A8388A5AD7DB72D4AFD9BB2243 /* PINRemoteImageCallbacks.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageCallbacks.m; path = Source/Classes/PINRemoteImageCallbacks.m; sourceTree = "<group>"; }; - 75AFF4AA5194B68ADDCBA57E64AC169D /* PINRemoteLock.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteLock.h; path = Source/Classes/PINRemoteLock.h; sourceTree = "<group>"; }; - 77DD4430B2127D3CCDA0EE0EB45E7C37 /* PINImage+WebP.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINImage+WebP.h"; path = "Source/Classes/Categories/PINImage+WebP.h"; sourceTree = "<group>"; }; - 7869A067EF9AB9E4DC84A3C38FA6507E /* PINOperationQueue.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINOperationQueue.m; path = Source/PINOperationQueue.m; sourceTree = "<group>"; }; - 7BBD9B4E367C8F0FCC72682F4E3FB864 /* PINImageView+PINRemoteImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PINImageView+PINRemoteImage.m"; path = "Source/Classes/ImageCategories/PINImageView+PINRemoteImage.m"; sourceTree = "<group>"; }; - 7BC7F3CC450DB6E3C064D8C773B4CCCE /* PINAnimatedImageView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINAnimatedImageView.h; path = Source/Classes/include/PINAnimatedImageView.h; sourceTree = "<group>"; }; - 813C54C756BD94878446038099EA9510 /* PINAlternateRepresentationProvider.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINAlternateRepresentationProvider.m; path = Source/Classes/PINAlternateRepresentationProvider.m; sourceTree = "<group>"; }; - 86FC9ED9F10AD9DEDC2B5962C89A01CC /* PINRemoteLock.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteLock.m; path = Source/Classes/PINRemoteLock.m; sourceTree = "<group>"; }; - 8795EBD6FE0ED76210CC00FD94B3BAF6 /* PINRemoteImageCategoryManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageCategoryManager.m; path = Source/Classes/PINRemoteImageCategoryManager.m; sourceTree = "<group>"; }; - 87BED11E2796E4204F066A825340C386 /* PINAnimatedImageView+PINRemoteImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINAnimatedImageView+PINRemoteImage.h"; path = "Source/Classes/include/PINAnimatedImageView+PINRemoteImage.h"; sourceTree = "<group>"; }; - 89D00C2D2F52683805E53C7D68C8CFD5 /* PINURLSessionManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINURLSessionManager.m; path = Source/Classes/PINURLSessionManager.m; sourceTree = "<group>"; }; - 8BE04B1E3F0D5C92ADB2D654DB46D646 /* libPods-BFRImageViewer.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-BFRImageViewer.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 91550A66A1184E7F64AC8409B286A367 /* PINRemoteImageMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageMacros.h; path = Source/Classes/include/PINRemoteImageMacros.h; sourceTree = "<group>"; }; - 93349E0B0F486E99E5B33170E8339A3B /* PINRemoteImageCallbacks.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageCallbacks.h; path = Source/Classes/PINRemoteImageCallbacks.h; sourceTree = "<group>"; }; - 94D30AF6E74D6111A47727BE5829E366 /* PINProgressiveImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINProgressiveImage.h; path = Source/Classes/include/PINProgressiveImage.h; sourceTree = "<group>"; }; - 95296C3CB6C5A09DAFB4AD9C2B8D0FB7 /* PINOperationMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINOperationMacros.h; path = Source/PINOperationMacros.h; sourceTree = "<group>"; }; - 972F5B7C2D60D1D56D4423545D84A37B /* PINAnimatedImageView+PINRemoteImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PINAnimatedImageView+PINRemoteImage.m"; path = "Source/Classes/ImageCategories/PINAnimatedImageView+PINRemoteImage.m"; sourceTree = "<group>"; }; - 9B12A5D1BA6CACB40C8F243E9652DA88 /* PINGIFAnimatedImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINGIFAnimatedImage.h; path = Source/Classes/include/PINGIFAnimatedImage.h; sourceTree = "<group>"; }; - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - A1AC8C81D13A72E6424B6851583B2FF5 /* PINOperation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PINOperation-prefix.pch"; sourceTree = "<group>"; }; - A4EA28E5438263F9D90DF27A76C8F999 /* PINWebPAnimatedImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINWebPAnimatedImage.h; path = Source/Classes/include/PINWebPAnimatedImage.h; sourceTree = "<group>"; }; - A575658A6952FB975A8FB6BB2CB4771B /* PINRemoteImageBasicCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageBasicCache.m; path = Source/Classes/PINRemoteImageBasicCache.m; sourceTree = "<group>"; }; - A5B8932933168E6780AB9E6EB49FEF7E /* PINImage+ScaledImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINImage+ScaledImage.h"; path = "Source/Classes/Categories/PINImage+ScaledImage.h"; sourceTree = "<group>"; }; - B21524BF838B1F3C51176F374E4CA5BF /* PINRemoteImageCaching.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageCaching.h; path = Source/Classes/include/PINRemoteImageCaching.h; sourceTree = "<group>"; }; - C18A81389CBC7835889C7CCE1CCC6FA6 /* PINRemoteImageManagerConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageManagerConfiguration.m; path = Source/Classes/PINRemoteImageManagerConfiguration.m; sourceTree = "<group>"; }; - C2859025769D135F3D1690250F54929A /* Pods-BFRImageViewer.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-BFRImageViewer.release.xcconfig"; sourceTree = "<group>"; }; - CAF2E143CE937B846E128BE5462C90FF /* PINRemoteImage-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PINRemoteImage-dummy.m"; sourceTree = "<group>"; }; - CC67D20BEE0B3FB423F210A3DB00F650 /* NSData+ImageDetectors.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSData+ImageDetectors.m"; path = "Source/Classes/Categories/NSData+ImageDetectors.m"; sourceTree = "<group>"; }; - D31B1884BA474ECB1021DF21A819BE89 /* PINRemoteImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImage.h; path = Source/Classes/include/PINRemoteImage.h; sourceTree = "<group>"; }; - D5F3742700436B5D4132BB8F7AD1086E /* PINDisplayLink.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINDisplayLink.h; path = Source/Classes/PINDisplayLink.h; sourceTree = "<group>"; }; - D66843FAE9448ECFAD8390DA5BDC7D79 /* PINAlternateRepresentationProvider.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINAlternateRepresentationProvider.h; path = Source/Classes/include/PINAlternateRepresentationProvider.h; sourceTree = "<group>"; }; - D7CC832EF42943AFDBD1D869237EE0A0 /* PINOperationTypes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINOperationTypes.h; path = Source/PINOperationTypes.h; sourceTree = "<group>"; }; - DC219E9B9D3241CE498ABE51773DB04A /* PINOperationQueue.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINOperationQueue.h; path = Source/PINOperationQueue.h; sourceTree = "<group>"; }; - DC8F8C29E7DD231EB131EC2F4F93D27C /* PINURLSessionManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINURLSessionManager.h; path = Source/Classes/include/PINURLSessionManager.h; sourceTree = "<group>"; }; - E442E412AEA465A82A0A961561317FAE /* PINRemoteImageManagerResult.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINRemoteImageManagerResult.m; path = Source/Classes/PINRemoteImageManagerResult.m; sourceTree = "<group>"; }; - E784AED54790E65E0FF77BFC45580880 /* PINButton+PINRemoteImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PINButton+PINRemoteImage.m"; path = "Source/Classes/ImageCategories/PINButton+PINRemoteImage.m"; sourceTree = "<group>"; }; - EAC1E297434858C34DD080D54758E312 /* PINAnimatedImageView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINAnimatedImageView.m; path = Source/Classes/AnimatedImages/PINAnimatedImageView.m; sourceTree = "<group>"; }; - EC156B8D2BCEB5984208FDE88DE8BDAE /* PINRemoteImageMemoryContainer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINRemoteImageMemoryContainer.h; path = Source/Classes/PINRemoteImageMemoryContainer.h; sourceTree = "<group>"; }; - EC7853B946C74F65FD309F1374E19AB1 /* Pods-BFRImageViewer-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-BFRImageViewer-acknowledgements.plist"; sourceTree = "<group>"; }; - EDB25DE9B7958C755FDB2E09360A5137 /* PINOperation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PINOperation-dummy.m"; sourceTree = "<group>"; }; - F296F215AE94CEEACE18FC3D9EEB6A5E /* PINWebPAnimatedImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINWebPAnimatedImage.m; path = Source/Classes/AnimatedImages/PINWebPAnimatedImage.m; sourceTree = "<group>"; }; - F29CAE8624CA5A640F98A2FFF2A238AD /* PINDisplayLink.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINDisplayLink.m; path = Source/Classes/PINDisplayLink.m; sourceTree = "<group>"; }; - F659FF2A1F9767D71364106E0FEA8DC6 /* PINResume.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINResume.h; path = Source/Classes/PINResume.h; sourceTree = "<group>"; }; - F715C1F8DE83A2FC6B3ED834EE57D494 /* PINAnimatedImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINAnimatedImage.m; path = Source/Classes/AnimatedImages/PINAnimatedImage.m; sourceTree = "<group>"; }; - FDD0512DB8BF16D60D5DB30942D9B349 /* PINImage+DecodedImage.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PINImage+DecodedImage.h"; path = "Source/Classes/Categories/PINImage+DecodedImage.h"; sourceTree = "<group>"; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 91BF160125CA075C97006BAE891E62C3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - BAE7DBB0892F6E8276CE14CB5BAB96F7 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DF5DA30CEB95478135F39A40376873AD /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 136E1AA5FAB4FC857789DEF2F8EF36B8 /* Core */ = { - isa = PBXGroup; - children = ( - 1644D396EA1B10C4CE43ACD2FAEE8F37 /* NSData+ImageDetectors.h */, - CC67D20BEE0B3FB423F210A3DB00F650 /* NSData+ImageDetectors.m */, - 4C067988BC643B0DC85ADE7C962E600D /* NSHTTPURLResponse+MaxAge.h */, - 5F91BE554111104933F31BA347FB4673 /* NSHTTPURLResponse+MaxAge.m */, - D66843FAE9448ECFAD8390DA5BDC7D79 /* PINAlternateRepresentationProvider.h */, - 813C54C756BD94878446038099EA9510 /* PINAlternateRepresentationProvider.m */, - 5CAFDF8939A7AA00EA7732794769FDD6 /* PINAnimatedImage.h */, - F715C1F8DE83A2FC6B3ED834EE57D494 /* PINAnimatedImage.m */, - 7BC7F3CC450DB6E3C064D8C773B4CCCE /* PINAnimatedImageView.h */, - EAC1E297434858C34DD080D54758E312 /* PINAnimatedImageView.m */, - 87BED11E2796E4204F066A825340C386 /* PINAnimatedImageView+PINRemoteImage.h */, - 972F5B7C2D60D1D56D4423545D84A37B /* PINAnimatedImageView+PINRemoteImage.m */, - 1F857AAB7013B2A2167AAC2DAF31221D /* PINButton+PINRemoteImage.h */, - E784AED54790E65E0FF77BFC45580880 /* PINButton+PINRemoteImage.m */, - 6DEB1958AF34A7A08EE8136ABCA887D6 /* PINCachedAnimatedImage.h */, - 70E09F0397462FF97C63DD517D70CC65 /* PINCachedAnimatedImage.m */, - D5F3742700436B5D4132BB8F7AD1086E /* PINDisplayLink.h */, - F29CAE8624CA5A640F98A2FFF2A238AD /* PINDisplayLink.m */, - 9B12A5D1BA6CACB40C8F243E9652DA88 /* PINGIFAnimatedImage.h */, - 0FE1027D8B7070D1BEE51FD1F94EFA4B /* PINGIFAnimatedImage.m */, - FDD0512DB8BF16D60D5DB30942D9B349 /* PINImage+DecodedImage.h */, - 6FD78C987DCEB63A2CDD4CB03E219269 /* PINImage+DecodedImage.m */, - A5B8932933168E6780AB9E6EB49FEF7E /* PINImage+ScaledImage.h */, - 1C13CB7108CEE095AC43A618866BB77F /* PINImage+ScaledImage.m */, - 77DD4430B2127D3CCDA0EE0EB45E7C37 /* PINImage+WebP.h */, - 29D7F6AF61493E0EAF982380618B44E1 /* PINImage+WebP.m */, - 14C06DEC92236008137324C462CFC536 /* PINImageView+PINRemoteImage.h */, - 7BBD9B4E367C8F0FCC72682F4E3FB864 /* PINImageView+PINRemoteImage.m */, - 94D30AF6E74D6111A47727BE5829E366 /* PINProgressiveImage.h */, - 2168B9678F65E29652039361480C9AEF /* PINProgressiveImage.m */, - D31B1884BA474ECB1021DF21A819BE89 /* PINRemoteImage.h */, - 30C5A3C3B05C3F152FDFC6087F0B09CF /* PINRemoteImageBasicCache.h */, - A575658A6952FB975A8FB6BB2CB4771B /* PINRemoteImageBasicCache.m */, - B21524BF838B1F3C51176F374E4CA5BF /* PINRemoteImageCaching.h */, - 93349E0B0F486E99E5B33170E8339A3B /* PINRemoteImageCallbacks.h */, - 724315A8388A5AD7DB72D4AFD9BB2243 /* PINRemoteImageCallbacks.m */, - 2145C19C4823C368040E612FDA4641A4 /* PINRemoteImageCategoryManager.h */, - 8795EBD6FE0ED76210CC00FD94B3BAF6 /* PINRemoteImageCategoryManager.m */, - 37ACE7D802D36A89BB7E7FB9F1978AC0 /* PINRemoteImageDownloadQueue.h */, - 4FD9BE8C58F6E266C3E4BB8F4B389656 /* PINRemoteImageDownloadQueue.m */, - 146562F8B6A9120CEBF8D9801B3FB58D /* PINRemoteImageDownloadTask.h */, - 167F4AF89C5410918F5B931F200E4E4A /* PINRemoteImageDownloadTask.m */, - 91550A66A1184E7F64AC8409B286A367 /* PINRemoteImageMacros.h */, - 4D29988C23393384B5FDEDBEDD7A46D7 /* PINRemoteImageManager.h */, - 5C64CD3A6AB80870871E550020B11BCF /* PINRemoteImageManager.m */, - 305FB83D47E2DBE2D8B2C2DE53161C2A /* PINRemoteImageManager+Private.h */, - 62F2AD6AA1F3A1E5768876504EF39B5A /* PINRemoteImageManagerConfiguration.h */, - C18A81389CBC7835889C7CCE1CCC6FA6 /* PINRemoteImageManagerConfiguration.m */, - 29D8EBCD50608769709D350C13FFBE29 /* PINRemoteImageManagerResult.h */, - E442E412AEA465A82A0A961561317FAE /* PINRemoteImageManagerResult.m */, - EC156B8D2BCEB5984208FDE88DE8BDAE /* PINRemoteImageMemoryContainer.h */, - 657ADA9A42B3C0DF91F4EB414EB95F50 /* PINRemoteImageMemoryContainer.m */, - 6C898DF7331E6E5DD2607EA6AA0CE2E0 /* PINRemoteImageProcessorTask.h */, - 0717190CF83CF0EF2687283E43007A62 /* PINRemoteImageProcessorTask.m */, - 418884CD641A08282DD778B2AF6EA18D /* PINRemoteImageTask.h */, - 1992A045E339418C9BAE0634643DE7C0 /* PINRemoteImageTask.m */, - 14087A9145B2E4DDB179B48B6C2F966F /* PINRemoteImageTask+Subclassing.h */, - 75AFF4AA5194B68ADDCBA57E64AC169D /* PINRemoteLock.h */, - 86FC9ED9F10AD9DEDC2B5962C89A01CC /* PINRemoteLock.m */, - 43839BFD06E99F574431443F4AD2A025 /* PINRemoteWeakProxy.h */, - 4A4339D45EF633EFEA0CFEC2D6A26D14 /* PINRemoteWeakProxy.m */, - 696C1484D5D34AD868AD3048E936B3A4 /* PINRequestRetryStrategy.h */, - 035B2D56B29BB2E21C7EB5D214C26C6D /* PINRequestRetryStrategy.m */, - F659FF2A1F9767D71364106E0FEA8DC6 /* PINResume.h */, - 587877AB95AC080459D5FB2FD4B584B8 /* PINResume.m */, - 49E653FC016454BA2B79AF9AF5BE26BF /* PINSpeedRecorder.h */, - 6A27D5AF5CE58D6A145F7589F9BBEC92 /* PINSpeedRecorder.m */, - DC8F8C29E7DD231EB131EC2F4F93D27C /* PINURLSessionManager.h */, - 89D00C2D2F52683805E53C7D68C8CFD5 /* PINURLSessionManager.m */, - A4EA28E5438263F9D90DF27A76C8F999 /* PINWebPAnimatedImage.h */, - F296F215AE94CEEACE18FC3D9EEB6A5E /* PINWebPAnimatedImage.m */, - ); - name = Core; - sourceTree = "<group>"; - }; - 197DFF511AC20AE8F5D820521A5D4542 /* Products */ = { - isa = PBXGroup; - children = ( - 22C347595B1851A1E5B0A3762BB18EC9 /* libPINOperation.a */, - 115A4FCB2A03922EC10B633F15359653 /* libPINRemoteImage.a */, - 8BE04B1E3F0D5C92ADB2D654DB46D646 /* libPods-BFRImageViewer.a */, - ); - name = Products; - sourceTree = "<group>"; - }; - 1FD840CDD3FCB3CE935478FBF05AFA75 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - FB2B9A3D8A1D7F439DBB25B56A547780 /* Pods-BFRImageViewer */, - ); - name = "Targets Support Files"; - sourceTree = "<group>"; - }; - 2BCBEC9413D24A32A3F7E2055E739746 /* Support Files */ = { - isa = PBXGroup; - children = ( - EDB25DE9B7958C755FDB2E09360A5137 /* PINOperation-dummy.m */, - A1AC8C81D13A72E6424B6851583B2FF5 /* PINOperation-prefix.pch */, - 5DBFE22EE3DB87BD9B93FC55683DF1AC /* PINOperation.debug.xcconfig */, - 34E04ED8C9C00EACF127DCFE4455A738 /* PINOperation.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/PINOperation"; - sourceTree = "<group>"; - }; - 75CAA58554A7BF44B878DB38BA943486 /* Pods */ = { - isa = PBXGroup; - children = ( - 94AA8D575852B3EC3F96F960996AD243 /* PINOperation */, - BB63D0FE1FC9BF12D5EE9430A40071DC /* PINRemoteImage */, - ); - name = Pods; - sourceTree = "<group>"; - }; - 94AA8D575852B3EC3F96F960996AD243 /* PINOperation */ = { - isa = PBXGroup; - children = ( - 15DF37BBC232BE33D49C4BC74B7AB32C /* PINOperation.h */, - 3F52025D18D880746BBD8C8AA97BA4E9 /* PINOperationGroup.h */, - 55E57380D37883D84D5071D9A2811E7F /* PINOperationGroup.m */, - 95296C3CB6C5A09DAFB4AD9C2B8D0FB7 /* PINOperationMacros.h */, - DC219E9B9D3241CE498ABE51773DB04A /* PINOperationQueue.h */, - 7869A067EF9AB9E4DC84A3C38FA6507E /* PINOperationQueue.m */, - D7CC832EF42943AFDBD1D869237EE0A0 /* PINOperationTypes.h */, - 2BCBEC9413D24A32A3F7E2055E739746 /* Support Files */, - ); - path = PINOperation; - sourceTree = "<group>"; - }; - BB63D0FE1FC9BF12D5EE9430A40071DC /* PINRemoteImage */ = { - isa = PBXGroup; - children = ( - 136E1AA5FAB4FC857789DEF2F8EF36B8 /* Core */, - BD098E9415BC8EE9268C7C22D2EBA47A /* Support Files */, - ); - path = PINRemoteImage; - sourceTree = "<group>"; - }; - BD098E9415BC8EE9268C7C22D2EBA47A /* Support Files */ = { - isa = PBXGroup; - children = ( - CAF2E143CE937B846E128BE5462C90FF /* PINRemoteImage-dummy.m */, - 369B5C6E17959D20849F74B6F5EF8BB8 /* PINRemoteImage.debug.xcconfig */, - 68499F09BED7B1200F7B6DD661DF3FD9 /* PINRemoteImage.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/PINRemoteImage"; - sourceTree = "<group>"; - }; - CF1408CF629C7361332E53B88F7BD30C = { - isa = PBXGroup; - children = ( - 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, - 75CAA58554A7BF44B878DB38BA943486 /* Pods */, - 197DFF511AC20AE8F5D820521A5D4542 /* Products */, - 1FD840CDD3FCB3CE935478FBF05AFA75 /* Targets Support Files */, - ); - sourceTree = "<group>"; - }; - D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = "<group>"; - }; - FB2B9A3D8A1D7F439DBB25B56A547780 /* Pods-BFRImageViewer */ = { - isa = PBXGroup; - children = ( - 4503C73CAB8BBBF6E689FAC88DF9E21B /* Pods-BFRImageViewer-acknowledgements.markdown */, - EC7853B946C74F65FD309F1374E19AB1 /* Pods-BFRImageViewer-acknowledgements.plist */, - 5B3EA1F65B2D98A4AD133E44F283243D /* Pods-BFRImageViewer-dummy.m */, - 27FB63967B4796CDB9B774498F92FDD4 /* Pods-BFRImageViewer.debug.xcconfig */, - C2859025769D135F3D1690250F54929A /* Pods-BFRImageViewer.release.xcconfig */, - ); - name = "Pods-BFRImageViewer"; - path = "Target Support Files/Pods-BFRImageViewer"; - sourceTree = "<group>"; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 9C561349536B71C2BCAD3113A5A5F104 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - B508015C2FC4DBDBF883DE139B7AACD2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B63C7DB1DF8A1D2BDEE6CBAD24275A6F /* PINOperation.h in Headers */, - AB765CBC717189A2B0AB5645FE33EE09 /* PINOperationGroup.h in Headers */, - D88DF1F2BB374950F3FC52C250C4875C /* PINOperationMacros.h in Headers */, - 5046E05E04161EABD7267DEAC23A9E84 /* PINOperationQueue.h in Headers */, - DC6FB04A083C55C9BA53DC50990BF520 /* PINOperationTypes.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E81FC168486A9AD545C67644578E2A81 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B48EC5AB3F8FB93FB58F67B96F235E27 /* NSData+ImageDetectors.h in Headers */, - 53ED4DA8223B3E1C5D93A96F0FABB802 /* NSHTTPURLResponse+MaxAge.h in Headers */, - 1018AC44E5AD8D17E1D307B8FEF5AC3F /* PINAlternateRepresentationProvider.h in Headers */, - 780119CDF405929416899CC10648E518 /* PINAnimatedImage.h in Headers */, - 9BCC08E280DE91A8BAD82120FE31EE57 /* PINAnimatedImageView+PINRemoteImage.h in Headers */, - 8B8A7055AFC1157A60204C7C3B3D6FE8 /* PINAnimatedImageView.h in Headers */, - BCFD5AB6DAB8802BFF13869D9889F8F8 /* PINButton+PINRemoteImage.h in Headers */, - 5F38BC545B032EE7CABC0EDA489574EA /* PINCachedAnimatedImage.h in Headers */, - 5F361FBD25BFC7923C9ACF610303C40D /* PINDisplayLink.h in Headers */, - 42AC6C0C868078F1E892489A0CC8102F /* PINGIFAnimatedImage.h in Headers */, - A32E4D5CFDE3E0C5F536B6F0DA802C10 /* PINImage+DecodedImage.h in Headers */, - C4BB5E165B38C88785419C37BD97B28D /* PINImage+ScaledImage.h in Headers */, - 099C91E9F45B03A983C563B47F860EC7 /* PINImage+WebP.h in Headers */, - 1ADCAE485C53C030D4CDE1E5CA44D2C3 /* PINImageView+PINRemoteImage.h in Headers */, - C0919630F6368656B965558745E17F3B /* PINProgressiveImage.h in Headers */, - BE323E7261D9ADE3C9C18AB539303562 /* PINRemoteImage.h in Headers */, - 6616B22DCDA60512038F55DA22A5DF8D /* PINRemoteImageBasicCache.h in Headers */, - 19B010F33C3A919DBD7F26773F57E4FB /* PINRemoteImageCaching.h in Headers */, - C87E0DBF60612A0D60D91B6BC9208BC4 /* PINRemoteImageCallbacks.h in Headers */, - 34FE2FBD071A4CC9416565CCDA8B8A30 /* PINRemoteImageCategoryManager.h in Headers */, - 09FBB00C63FFEBE992FBDB7B3A6A47C6 /* PINRemoteImageDownloadQueue.h in Headers */, - D1D99484AEA8BD228C19B207DA5248B3 /* PINRemoteImageDownloadTask.h in Headers */, - 8B622BECD664DC502779839F090E6801 /* PINRemoteImageMacros.h in Headers */, - 7DB690C595F68BD6BB2159AD609B1BAB /* PINRemoteImageManager+Private.h in Headers */, - 704FCA38C151537ADFFE2774E8A1D6E7 /* PINRemoteImageManager.h in Headers */, - 2163D05EDC3770C380E57E9C9D721C93 /* PINRemoteImageManagerConfiguration.h in Headers */, - 8D990E85DD8429F6C1FBC18117189D29 /* PINRemoteImageManagerResult.h in Headers */, - F8447BCE32265D694BCAE83815B627B6 /* PINRemoteImageMemoryContainer.h in Headers */, - 1AFC0012E384B858F64800530F878D5D /* PINRemoteImageProcessorTask.h in Headers */, - 793943930D49915023119E2818FAB06F /* PINRemoteImageTask+Subclassing.h in Headers */, - 8497E00552D413341ECBF61B365C5BF5 /* PINRemoteImageTask.h in Headers */, - 76E97F63C0B824C1F646EB3010B05EEC /* PINRemoteLock.h in Headers */, - 474F04A616CEDE40E69F619D629FBBD7 /* PINRemoteWeakProxy.h in Headers */, - BB2B2EDE3A176DD2E3735CEA499D1415 /* PINRequestRetryStrategy.h in Headers */, - 327CE13C6D7891A846CB378C76F7EE4E /* PINResume.h in Headers */, - 5BC714DC8EAFB106792F410CAACE9244 /* PINSpeedRecorder.h in Headers */, - F6B421214751261C7AB26DA14C4FA851 /* PINURLSessionManager.h in Headers */, - 22E5260095AA9994047D3BCF82F692EF /* PINWebPAnimatedImage.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 2311EAECA42807F4EFDB38BD85007BC7 /* Pods-BFRImageViewer */ = { - isa = PBXNativeTarget; - buildConfigurationList = EA78A9CDE56B59B87E50321A2E316619 /* Build configuration list for PBXNativeTarget "Pods-BFRImageViewer" */; - buildPhases = ( - 9C561349536B71C2BCAD3113A5A5F104 /* Headers */, - A056796421E9133834C4F40CBEFDFF13 /* Sources */, - 91BF160125CA075C97006BAE891E62C3 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - DC4745B11261D8B8102FB12734593302 /* PBXTargetDependency */, - 11A2A601B089251BE1C9B8229531B09E /* PBXTargetDependency */, - ); - name = "Pods-BFRImageViewer"; - productName = "Pods-BFRImageViewer"; - productReference = 8BE04B1E3F0D5C92ADB2D654DB46D646 /* libPods-BFRImageViewer.a */; - productType = "com.apple.product-type.library.static"; - }; - 57310B016450E63387C9D64F4933E995 /* PINOperation */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2236E652A2405AC5958C1926C0E63424 /* Build configuration list for PBXNativeTarget "PINOperation" */; - buildPhases = ( - B508015C2FC4DBDBF883DE139B7AACD2 /* Headers */, - 8589CF96CD6386F4FCFA3B4D7CD106F6 /* Sources */, - DF5DA30CEB95478135F39A40376873AD /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = PINOperation; - productName = PINOperation; - productReference = 22C347595B1851A1E5B0A3762BB18EC9 /* libPINOperation.a */; - productType = "com.apple.product-type.library.static"; - }; - E2A8B2A28D2EAB2E4CCF3B69E6792851 /* PINRemoteImage */ = { - isa = PBXNativeTarget; - buildConfigurationList = 04F3472BAE0309F66D42F571FE0AB365 /* Build configuration list for PBXNativeTarget "PINRemoteImage" */; - buildPhases = ( - E81FC168486A9AD545C67644578E2A81 /* Headers */, - 57174FD007EB15032A69F157F76D509D /* Sources */, - BAE7DBB0892F6E8276CE14CB5BAB96F7 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 8928ADF392AB6E0F8D38305E6CDC8186 /* PBXTargetDependency */, - ); - name = PINRemoteImage; - productName = PINRemoteImage; - productReference = 115A4FCB2A03922EC10B633F15359653 /* libPINRemoteImage.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - BFDFE7DC352907FC980B868725387E98 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1100; - LastUpgradeCheck = 1250; - }; - buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 197DFF511AC20AE8F5D820521A5D4542 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 57310B016450E63387C9D64F4933E995 /* PINOperation */, - E2A8B2A28D2EAB2E4CCF3B69E6792851 /* PINRemoteImage */, - 2311EAECA42807F4EFDB38BD85007BC7 /* Pods-BFRImageViewer */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 57174FD007EB15032A69F157F76D509D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4D55AFE36B48942E6E913412CB7630C5 /* NSData+ImageDetectors.m in Sources */, - 52C7047639C5279D68CC7A0C4D7CF47F /* NSHTTPURLResponse+MaxAge.m in Sources */, - 812D08E62989BBA10498E48A1B8E4CF9 /* PINAlternateRepresentationProvider.m in Sources */, - CF84333C8305D95638D54BE590DEB29A /* PINAnimatedImage.m in Sources */, - 9AF9A595FF10690E884BD6B7D555311E /* PINAnimatedImageView+PINRemoteImage.m in Sources */, - B601BB17D0A1FF53834EA8C8444DE1ED /* PINAnimatedImageView.m in Sources */, - 9F0F1EF2A791BD145166E1FA7A59C81E /* PINButton+PINRemoteImage.m in Sources */, - EFBBD6591FCD53499CEA002A0DBD707D /* PINCachedAnimatedImage.m in Sources */, - 21DB867B32B47A1699158239CBD896CD /* PINDisplayLink.m in Sources */, - 93A2A3D4A020CE0F6A25FA859FD11C44 /* PINGIFAnimatedImage.m in Sources */, - ACE3CA86739D853D13936789D8F564E4 /* PINImage+DecodedImage.m in Sources */, - 61E6501FD799088F1E4EF84CBBB09339 /* PINImage+ScaledImage.m in Sources */, - A80D544A3044D86DF2993F74C5591C21 /* PINImage+WebP.m in Sources */, - F603EF848066CB9BE7E21C22C1AC2A28 /* PINImageView+PINRemoteImage.m in Sources */, - A86D9952D0FD7F9DA4FFFFC5ADFA7BCF /* PINProgressiveImage.m in Sources */, - DD8DC1CB097FC5997334FAE6B40B5C67 /* PINRemoteImage-dummy.m in Sources */, - C4E59876DC6B4090CA17BDA2BDE4D7BC /* PINRemoteImageBasicCache.m in Sources */, - 31F0E4AE0A1BAA346FAE0ED89A488B49 /* PINRemoteImageCallbacks.m in Sources */, - 0285F11136E34A29C872EDB8E8A96272 /* PINRemoteImageCategoryManager.m in Sources */, - 489AFB94EB4BFDD8FD3E72B057AE0F3B /* PINRemoteImageDownloadQueue.m in Sources */, - 764B931E78649CF3B7B8FD03895C88F6 /* PINRemoteImageDownloadTask.m in Sources */, - 8F45D22B6C7A5BAAB4B6CA23898F8F0A /* PINRemoteImageManager.m in Sources */, - 1DF06ADFCD795822622410E06CC743F6 /* PINRemoteImageManagerConfiguration.m in Sources */, - DCF8D9C71D240F071C2D7B16922CE756 /* PINRemoteImageManagerResult.m in Sources */, - 80B6A635993E2E05E8ADD1F989FCC9F6 /* PINRemoteImageMemoryContainer.m in Sources */, - F8B229B3189C49F3B325CBC0E9F59FAF /* PINRemoteImageProcessorTask.m in Sources */, - D457230757E6C03A435A8EADFFB63E89 /* PINRemoteImageTask.m in Sources */, - ECDDFE8FFA5C1A16BB34194020B09993 /* PINRemoteLock.m in Sources */, - D00581A0E76BA0F5FFBD7767C8613B3E /* PINRemoteWeakProxy.m in Sources */, - 1AF99A1A8FA613CCC96E3E0EECECCEAB /* PINRequestRetryStrategy.m in Sources */, - AD22B05696D094B6B54ECD6FEF6E7A60 /* PINResume.m in Sources */, - CE1D5DFCF4AEFEBCA2577E500E0F2B61 /* PINSpeedRecorder.m in Sources */, - 5F9433BCFC6D938CF30DDA707430705B /* PINURLSessionManager.m in Sources */, - FD01C3E67A57033460B7C71508B46E67 /* PINWebPAnimatedImage.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8589CF96CD6386F4FCFA3B4D7CD106F6 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D1E331D330D00C8358FED8B448790936 /* PINOperation-dummy.m in Sources */, - AA72B1B33439E9BA94012D0B535AD98B /* PINOperationGroup.m in Sources */, - D0BAC7A7865F263B8469B96D7C263DD7 /* PINOperationQueue.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A056796421E9133834C4F40CBEFDFF13 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1860B07FDC2B350C0757D903B8578A18 /* Pods-BFRImageViewer-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 11A2A601B089251BE1C9B8229531B09E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PINRemoteImage; - target = E2A8B2A28D2EAB2E4CCF3B69E6792851 /* PINRemoteImage */; - targetProxy = 1EE50787AEDFAA2BA86BD351BD1220C7 /* PBXContainerItemProxy */; - }; - 8928ADF392AB6E0F8D38305E6CDC8186 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PINOperation; - target = 57310B016450E63387C9D64F4933E995 /* PINOperation */; - targetProxy = BBD1F5F7F245A617489608EBAF92F1FB /* PBXContainerItemProxy */; - }; - DC4745B11261D8B8102FB12734593302 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = PINOperation; - target = 57310B016450E63387C9D64F4933E995 /* PINOperation */; - targetProxy = F775FEA0F16F1E97FD3B9076E84CCC4E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 46182C15801CB34B283B811D5081B96E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 68499F09BED7B1200F7B6DD661DF3FD9 /* PINRemoteImage.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PINRemoteImage; - PRODUCT_NAME = PINRemoteImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 903A0004D3E6651EFD5D2E16214D101B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; - A94FF3EF35F5BFBC1A4CA176366EA0C0 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5DBFE22EE3DB87BD9B93FC55683DF1AC /* PINOperation.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PINOperation/PINOperation-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PINOperation; - PRODUCT_NAME = PINOperation; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - B4EFE046ACF8F37157F6E322C7FCFC28 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - D775936AFF2FB5F9E4F8F7E463FE21EB /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = C2859025769D135F3D1690250F54929A /* Pods-BFRImageViewer.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MACH_O_TYPE = staticlib; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - F1ABA93F643ABEA484045F937319BDAE /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 369B5C6E17959D20849F74B6F5EF8BB8 /* PINRemoteImage.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PINRemoteImage; - PRODUCT_NAME = PINRemoteImage; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - F48F1AB3E200C46B2E6644B09327C495 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 34E04ED8C9C00EACF127DCFE4455A738 /* PINOperation.release.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - GCC_PREFIX_HEADER = "Target Support Files/PINOperation/PINOperation-prefix.pch"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PRIVATE_HEADERS_FOLDER_PATH = ""; - PRODUCT_MODULE_NAME = PINOperation; - PRODUCT_NAME = PINOperation; - PUBLIC_HEADERS_FOLDER_PATH = ""; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - F9E2148AAFB4FCF4910639EC2157D319 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 27FB63967B4796CDB9B774498F92FDD4 /* Pods-BFRImageViewer.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MACH_O_TYPE = staticlib; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 04F3472BAE0309F66D42F571FE0AB365 /* Build configuration list for PBXNativeTarget "PINRemoteImage" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F1ABA93F643ABEA484045F937319BDAE /* Debug */, - 46182C15801CB34B283B811D5081B96E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2236E652A2405AC5958C1926C0E63424 /* Build configuration list for PBXNativeTarget "PINOperation" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A94FF3EF35F5BFBC1A4CA176366EA0C0 /* Debug */, - F48F1AB3E200C46B2E6644B09327C495 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - B4EFE046ACF8F37157F6E322C7FCFC28 /* Debug */, - 903A0004D3E6651EFD5D2E16214D101B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - EA78A9CDE56B59B87E50321A2E316619 /* Build configuration list for PBXNativeTarget "Pods-BFRImageViewer" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F9E2148AAFB4FCF4910639EC2157D319 /* Debug */, - D775936AFF2FB5F9E4F8F7E463FE21EB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; -} diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-dummy.m b/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-dummy.m deleted file mode 100644 index 209943f..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import <Foundation/Foundation.h> -@interface PodsDummy_PINOperation : NSObject -@end -@implementation PodsDummy_PINOperation -@end diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-prefix.pch b/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-prefix.pch deleted file mode 100644 index 2b29dbc..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation-prefix.pch +++ /dev/null @@ -1,15 +0,0 @@ -#ifdef __OBJC__ -#import <UIKit/UIKit.h> -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#ifndef TARGET_OS_WATCH - #define TARGET_OS_WATCH 0 -#endif diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.debug.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.debug.xcconfig deleted file mode 100644 index 8b3e1a2..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PINOperation -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PINOperation" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PINOperation -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.release.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.release.xcconfig deleted file mode 100644 index 8b3e1a2..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PINOperation -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PINOperation" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PINOperation -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.xcconfig deleted file mode 100644 index 43b6b46..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINOperation/PINOperation.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PINOperation -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PINOperation" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PINOperation -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-dummy.m b/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-dummy.m deleted file mode 100644 index d122522..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import <Foundation/Foundation.h> -@interface PodsDummy_PINRemoteImage : NSObject -@end -@implementation PodsDummy_PINRemoteImage -@end diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-prefix.pch b/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import <UIKit/UIKit.h> -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.debug.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.debug.xcconfig deleted file mode 100644 index 6900d40..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PINRemoteImage -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PINRemoteImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" "${PODS_ROOT}/Headers/Public/PINRemoteImage" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PINRemoteImage -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.release.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.release.xcconfig deleted file mode 100644 index 6900d40..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PINRemoteImage -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PINRemoteImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" "${PODS_ROOT}/Headers/Public/PINRemoteImage" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PINRemoteImage -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.xcconfig deleted file mode 100644 index bb6c1bb..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/PINRemoteImage/PINRemoteImage.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/PINRemoteImage -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/PINRemoteImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINCache" "${PODS_ROOT}/Headers/Public/PINOperation" "${PODS_ROOT}/Headers/Public/PINRemoteImage" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/PINRemoteImage -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.markdown b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.markdown deleted file mode 100644 index 77d565f..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.markdown +++ /dev/null @@ -1,363 +0,0 @@ -# Acknowledgements -This application makes use of the following third party libraries: - -## PINOperation - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - -## PINRemoteImage - -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - -Generated by CocoaPods - https://cocoapods.org diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.plist b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.plist deleted file mode 100644 index 3777448..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-acknowledgements.plist +++ /dev/null @@ -1,401 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>PreferenceSpecifiers</key> - <array> - <dict> - <key>FooterText</key> - <string>This application makes use of the following third party libraries:</string> - <key>Title</key> - <string>Acknowledgements</string> - <key>Type</key> - <string>PSGroupSpecifier</string> - </dict> - <dict> - <key>FooterText</key> - <string>Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS -</string> - <key>License</key> - <string>Apache 2.0</string> - <key>Title</key> - <string>PINOperation</string> - <key>Type</key> - <string>PSGroupSpecifier</string> - </dict> - <dict> - <key>FooterText</key> - <string>Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS -</string> - <key>License</key> - <string>Apache 2.0</string> - <key>Title</key> - <string>PINRemoteImage</string> - <key>Type</key> - <string>PSGroupSpecifier</string> - </dict> - <dict> - <key>FooterText</key> - <string>Generated by CocoaPods - https://cocoapods.org</string> - <key>Title</key> - <string></string> - <key>Type</key> - <string>PSGroupSpecifier</string> - </dict> - </array> - <key>StringsTable</key> - <string>Acknowledgements</string> - <key>Title</key> - <string>Acknowledgements</string> -</dict> -</plist> diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-dummy.m b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-dummy.m deleted file mode 100644 index 3c1e979..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import <Foundation/Foundation.h> -@interface PodsDummy_Pods_BFRImageViewer : NSObject -@end -@implementation PodsDummy_Pods_BFRImageViewer -@end diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-frameworks.sh b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-frameworks.sh deleted file mode 100755 index 08e3eaa..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-frameworks.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then - # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy - # frameworks to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" -mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - -COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" - -# Used as a return value for each invocation of `strip_invalid_archs` function. -STRIP_BINARY_RETVAL=0 - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -# Copies and strips a vendored framework -install_framework() -{ - if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then - local source="${BUILT_PRODUCTS_DIR}/$1" - elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then - local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" - elif [ -r "$1" ]; then - local source="$1" - fi - - local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - - if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" - fi - - # Use filter instead of exclude so missing patterns don't throw errors. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" - - local basename - basename="$(basename -s .framework "$1")" - binary="${destination}/${basename}.framework/${basename}" - if ! [ -r "$binary" ]; then - binary="${destination}/${basename}" - fi - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then - strip_invalid_archs "$binary" - fi - - # Resign the code if required by the build settings to avoid unstable apps - code_sign_if_enabled "${destination}/$(basename "$1")" - - # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. - if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then - local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) - for lib in $swift_runtime_libs; do - echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" - rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" - code_sign_if_enabled "${destination}/${lib}" - done - fi -} - -# Copies and strips a vendored dSYM -install_dsym() { - local source="$1" - if [ -r "$source" ]; then - # Copy the dSYM into a the targets temp dir. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" - - local basename - basename="$(basename -s .framework.dSYM "$source")" - binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" - - # Strip invalid architectures so "fat" simulator / device frameworks work on device - if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then - strip_invalid_archs "$binary" - fi - - if [[ $STRIP_BINARY_RETVAL == 1 ]]; then - # Move the stripped file into its final destination. - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" - else - # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. - touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" - fi - fi -} - -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" - - if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - code_sign_cmd="$code_sign_cmd &" - fi - echo "$code_sign_cmd" - eval "$code_sign_cmd" - fi -} - -# Strip invalid architectures -strip_invalid_archs() { - binary="$1" - # Get architectures for current target binary - binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" - # Intersect them with the architectures we are building for - intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" - # If there are no archs supported by this binary then warn the user - if [[ -z "$intersected_archs" ]]; then - echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." - STRIP_BINARY_RETVAL=0 - return - fi - stripped="" - for arch in $binary_archs; do - if ! [[ "${ARCHS}" == *"$arch"* ]]; then - # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 - stripped="$stripped $arch" - fi - done - if [[ "$stripped" ]]; then - echo "Stripped $binary of architectures:$stripped" - fi - STRIP_BINARY_RETVAL=1 -} - -if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then - wait -fi diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-resources.sh b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-resources.sh deleted file mode 100755 index 345301f..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer-resources.sh +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/sh -set -e -set -u -set -o pipefail - -if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then - # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy - # resources to, so exit 0 (signalling the script phase was successful). - exit 0 -fi - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -# This protects against multiple targets copying the same framework dependency at the same time. The solution -# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html -RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") - -case "${TARGETED_DEVICE_FAMILY:-}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - 3) - TARGET_DEVICE_ARGS="--target-device tv" - ;; - 4) - TARGET_DEVICE_ARGS="--target-device watch" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" || true - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - else - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" - fi -fi diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.debug.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.debug.xcconfig deleted file mode 100644 index 022245f..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.debug.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" "${PODS_ROOT}/Headers/Public/PINRemoteImage" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PINOperation" "${PODS_CONFIGURATION_BUILD_DIR}/PINRemoteImage" -OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PINOperation" -isystem "${PODS_ROOT}/Headers/Public/PINRemoteImage" -OTHER_LDFLAGS = $(inherited) -ObjC -l"PINOperation" -l"PINRemoteImage" -framework "Accelerate" -framework "Foundation" -framework "ImageIO" -framework "UIKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.release.xcconfig b/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.release.xcconfig deleted file mode 100644 index 022245f..0000000 --- a/BFRImageViewerDemo/Pods/Target Support Files/Pods-BFRImageViewer/Pods-BFRImageViewer.release.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/PINOperation" "${PODS_ROOT}/Headers/Public/PINRemoteImage" -LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/PINOperation" "${PODS_CONFIGURATION_BUILD_DIR}/PINRemoteImage" -OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/PINOperation" -isystem "${PODS_ROOT}/Headers/Public/PINRemoteImage" -OTHER_LDFLAGS = $(inherited) -ObjC -l"PINOperation" -l"PINRemoteImage" -framework "Accelerate" -framework "Foundation" -framework "ImageIO" -framework "UIKit" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 0000000..baf20e6 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,32 @@ +{ + "pins" : [ + { + "identity" : "pincache", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINCache.git", + "state" : { + "revision" : "2fb85948463292c2e824148cf17dc62a4c217a94", + "version" : "3.0.4" + } + }, + { + "identity" : "pinoperation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINOperation.git", + "state" : { + "revision" : "a74f978733bdaf982758bfa23d70a189f4b4c1b6", + "version" : "1.2.3" + } + }, + { + "identity" : "pinremoteimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINRemoteImage.git", + "state" : { + "revision" : "37022d0fb9359ce33fa06028d03382c8b9957c62", + "version" : "3.0.4" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..3cab173 --- /dev/null +++ b/Package.swift @@ -0,0 +1,34 @@ +// swift-tools-version:5.9 + +import PackageDescription + +let package = Package( + name: "BFRImageViewer", + defaultLocalization: "en", + platforms: [ + .iOS(.v15) + ], + products: [ + .library( + name: "BFRImageViewer", + targets: ["BFRImageViewer"] + ) + ], + dependencies: [ + .package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.0") + ], + targets: [ + .target( + name: "BFRImageViewer", + dependencies: [ + "PINRemoteImage" + ], + path: "BFRImageViewController", + exclude: ["Resources/lowResImage.png"], + resources: [ + .process("Resources/BFRImageViewerLocalizations.bundle") + ], + publicHeadersPath: "" + ) + ] +)