Using remote images in an application is more or less a requirement these days.

Related tags

Image image loader
Overview

Imaginary

CI Status Version License Platform Swift

Brick Icon

Table of Contents

Description

Using remote images in an application is more or less a requirement these days. This process should be easy, straight-forward and hassle free, and with Imaginary, it is. The library comes with a narrow yet flexible public API and a bunch of built-in unicorny features:

  • Asynchronous image downloading
  • Memory and disk cache based on Cache
  • Image decompression
  • Default transition animations
  • Possibility to pre-process and modify the original image
  • Works on any view, including ImageView, Button, ...
  • Supports iOS, tvOS, macOS

Usage

In the most common case, you want to set remote image from url onto ImageView. Imaginary does the heavy job of downloading and caching images. The caching is done via 2 cache layers (memory and disk) to allow fast retrieval. It also manages expiry for you. And the good news is that you can customise most of these features.

Basic

Set image with URL

Simply pass URL to fetch.

let imageUrl = URL(string: "https://avatars2.githubusercontent.com/u/1340892?v=3&s=200")
imageView.setImage(url: imageUrl)

Use placeholder

Placeholder is optional. But the users would be much pleased if they see something while images are being fetched.

let placeholder = UIImage(named: "PlaceholderImage")
let imageUrl = URL(string: "https://avatars2.githubusercontent.com/u/1340892?v=3&s=200")

imageView.setImage(url: imageUrl, placeholder: placeholder)

Use callback for when the image is fetched

If you want to get more info on the fetching result, you can pass a closure as completion.

imageView.setImage(url: imageUrl) { result in
  switch result {
  case .value(let image):
    print(image)
  case .error(let error):
    print(error)
  }
}

result is an enum Result that let you know if the operation succeeded or failed. The possible error is of ImaginaryError.

Advanced

Passing option

You can also pass Option when fetching images; it allows fine grain control over the fetching process. Option defaults to no pre-processor and a displayer for ImageView.

let option = Option()
imageView.setImage(url: imageUrl, option: option)

Pre-processing

Images are fetched, decompressed and pre-processed in the background. If you want to modify, simply implement your own ImageProcessor and specify it in the Option. The pre-processing is done in the background, before the image is set into view.

public protocol ImageProcessor {
  func process(image: Image) -> Image
}

This is how you apply tint color before setting images.

let option = Option(imagePreprocessor: TintImageProcessor(tintColor: .orange))
imageView.setImage(url: imageUrl, option: option)

Imaginary provides the following built in pre-processors

  • TintImageProcessor: apply tint color using color blend effect
  • ResizeImageProcessor: resize
  • RoundImageProcessor: make round corner

Displaying

Imaginary supports any View, it can be UIImageView, UIButton, MKAnnotationView, UINavigationBar, ... As you can see, the fetching is the same, the difference is the way the image is displayed. To avoid code duplication, Imaginary take advantages of Swift protocols to allow fully customisation.

You can roll out your own displayer by comforming to ImageDisplayer and specify that in Option

public protocol ImageDisplayer {
  func display(placeholder: Image, onto view: View)
  func display(image: Image, onto view: View)
}

This is how you set an image for UIButton

let option = Option(imageDisplayer: ButtonDisplayer())
button.setImage(url: imageUrl, option: option)

let option = Option(imageDisplayer: ImageDisplayer(animationOption: .transitionCurlUp))
imageView.setImage(url: imageUrl, option: option)

These are the buit in displayers. You need to supply the correct displayer for your view

  • ImageDisplayer: display onto UI|NSImageView. This is the default with cross dissolve animation.
  • ButtonDisplayer: display onto UI|NSButton using setImage(_ image: UIImage?, for state: UIControlState)
  • ButtonBackgroundDisplayer: display onto UI|NSButton using setBackgroundImage(_ image: UIImage?, for state: UIControlState)

Downloading

Imaginary uses ImageFetcher under the hood, which has downloader and storage. You can specify your own ImageDownloader together with a modifyRequest closure, there you can change request body or add more HTTP headers.

var option = Option()
option.downloaderMaker = {
  return ImageDownloader(modifyRequest: { 
    var request = $0
    request.addValue("Bearer 123", forHTTPHeaderField: "Authorization")
    return request 
  })
}

imageView.setImage(imageUrl, option: option)

Caching

The storage defaults to Configuration.storage, but you can use your own Storage, this allows you to group saved images for particular feature. What if you want forced downloading and ignore storage? Then simply return nil. For how to configure storage, see Storage

var option = Option()
option.storageMaker = {
  return Configuration.imageStorage
}

Configuration

You can customise the overal experience with Imaginary through Configuration.

  • trackBytesDownloaded: track how many bytes have been used to download a specific image
  • trackError: track if any error occured when fetching an image.
  • imageStorage: the storage used by all fetching operations.

ImageFetcher

Imaginary uses ImageFetcher under the hood. But you can use it as a standalone component.

ImageDownloader

Its main task is to download image and perform all kinds of sanity checkings.

let downloader = ImageDownloader()
downloader.download(url: imageUrl) { result in
  // handle result
}

ImageFetcher

This knows how to fetch and cache the images. It first checks memory and disk cache to see if there's image. If there isn't it will perform network download. You can optionally ignore the cache by setting storage to nil.

let fetcher = ImageFetcher(downloader: ImageDownloader(), storage: myStorage()
fetcher.fetch(url: imageUrl) { result in
  // handle result
}

MultipleImageFetcher

It sometimes makes sense to pre download images beforehand to improve user experience. We have MultipleImageFetcher for you

let multipleFetcher = MultipleImageFetcher(fetcherMaker: {
  return ImageFetcher()
})

multipleFetcher.fetch(urls: imageUrls, each: { result in
  // handle when each image is fetched
}, completion: {
  // handle when all images are fetched
})

This is ideal for the new prefetching mode in UICollectionView

Installation

Imaginary is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'Imaginary'

Imaginary is also available through Carthage. To install just write into your Cartfile:

github "hyperoslo/Imaginary"

Imaginary can also be installed manually. Just download and drop Sources folders in your project.

Author

Hyper Interaktiv AS, [email protected]

License

Imaginary is available under the MIT license. See the LICENSE file for more info.

Comments
  • Feature an image manager

    Feature an image manager

    I think it could be interesting to introduce a manager (I don't know the proper name for this). But essentially it would be a struct or class that can be used to preload images before they would appear on screen. So as you scroll, the images would already be pre-loaded. Would this be doable with the current setup?

    enhancement question 
    opened by zenangst 7
  • Add Option. Use .DelayPlaceholder to delay the setting of the placeholder

    Add Option. Use .DelayPlaceholder to delay the setting of the placeholder

    Add Option. For now it is just delay the setting of the placeholder.

    There are cases like the profile page and user changes the profile picture

    • If this is the first time user changes the picture, it should display the placeholder -> actual image
    • If this is the next time user changes the picture, it should only display the placeholder if the image fetching fails
    opened by onmyway133 6
  • Feature ImageManager for fetching image without using an image view

    Feature ImageManager for fetching image without using an image view

    ImageManager can fetch images in the same way as the extension on ImageView. It works pretty much in the exact same way except it does not use any pre or post configuration closures. If the URL already exists in the cache, that resource will be used by default, however you can opt-out of using cache by setting useCache to false at the call site.

    Fetcher is now equitable, it is used to remove fetchers when they are done doing their job in ImageManager.

    This should not affect the current implementation of Imaginary as ImageManager is completely separate from the image view extensions that we had (and still have).

    opened by zenangst 5
  • Imaginary does not compile (Carthage)

    Imaginary does not compile (Carthage)

    Building with Carthage is producing compiler errors. Running MacOS X 10.13.6, Carthage 0.30.1, XCode 9.4.1. I tried all the reasonable variations of Carthage building (build, update, etc)

    Log file output from Carthage build is below:

    /usr/bin/xcrun xcodebuild -project /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Imaginary.xcodeproj -scheme Imaginary-iOS -configuration Release -derivedDataPath /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/_l/t8shcn813_1d8_y26wjyfrgw0000gn/T/Imaginary SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary)User defaults from command line:
        IDEArchivePathOverride = /var/folders/_l/t8shcn813_1d8_y26wjyfrgw0000gn/T/Imaginary
        IDEDerivedDataPathOverride = /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1
    
    Build settings from command line:
        CARTHAGE = YES
        CLANG_ENABLE_CODE_COVERAGE = NO
        CODE_SIGN_IDENTITY = 
        CODE_SIGNING_REQUIRED = NO
        GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
        ONLY_ACTIVE_ARCH = NO
        SDKROOT = iphoneos11.4
        SKIP_INSTALL = YES
        STRIP_INSTALLED_PRODUCT = NO
    
    === BUILD TARGET Imaginary-iOS OF PROJECT Imaginary WITH CONFIGURATION Release ===
    
    Check dependencies
    
    Write auxiliary files
    /bin/mkdir -p /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary-iOS-OutputFileMap.json
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/swift-overrides.hmap
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary.LinkFileList
    /bin/mkdir -p /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources/Imaginary_vers.c
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-project-headers.hmap
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/all-product-headers.yaml
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary.hmap
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-own-target-headers.hmap
    /bin/mkdir -p /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary.LinkFileList
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-all-target-headers.hmap
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Script-D5DF75B31C403FC700BF1AB6.sh
    chmod 0755 /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Script-D5DF75B31C403FC700BF1AB6.sh
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/module.modulemap
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-all-non-framework-target-headers.hmap
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary-iOS-OutputFileMap.json
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Script-BD58C3AF1CF30382003F7141.sh
    chmod 0755 /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Script-BD58C3AF1CF30382003F7141.sh
    write-file /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-generated-files.hmap
    
    Create product structure
    /bin/mkdir -p /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Imaginary.framework/Modules
    /bin/mkdir -p /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Imaginary.framework/Headers
    
    ProcessInfoPlistFile /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Imaginary.framework/Info.plist Imaginary/iOS/Info.plist
        cd /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/davidyork/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public"
        builtin-infoPlistUtility /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Imaginary/iOS/Info.plist -expandbuildsettings -format binary -platform iphoneos -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Imaginary.framework/Info.plist
    
    SymLink /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos/Imaginary.framework /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Imaginary.framework
        cd /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/davidyork/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public"
        /bin/ln -sfh /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/Imaginary.framework /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos/Imaginary.framework
    
    CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
        cd /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
        export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/davidyork/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public"
        export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Imaginary -O -whole-module-optimization -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -target armv7-apple-ios8.0 -g -module-cache-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/ModuleCache.noindex -Xfrontend -serialize-debugging-options -embed-bitcode -swift-version 4 -I /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Carthage/Build/iOS -c -num-threads 8 /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageDownloader.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Option.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Types.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonBackgroundDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageProcessor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/MultipleImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ImageViewDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Configuration.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImaginaryError.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/Decompressor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Result.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Extensions/View+Imaginary.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/TintImageProcessor.swift -output-file-map /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary-iOS-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary.swiftmodule -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-generated-files.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-own-target-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-project-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources/armv7 -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary-Swift.h -Xcc -working-directory/Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
    
    CompileSwift normal armv7
        cd /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageDownloader.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Option.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Types.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonBackgroundDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageProcessor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/MultipleImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ImageViewDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Configuration.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImaginaryError.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/Decompressor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Result.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Extensions/View+Imaginary.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/TintImageProcessor.swift -target armv7-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -I /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Carthage/Build/iOS -g -module-cache-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/ModuleCache.noindex -swift-version 4 -O -serialize-debugging-options -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-generated-files.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-own-target-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-project-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources/armv7 -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources -Xcc -working-directory/Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary -emit-module-doc-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary.swiftdoc -serialize-diagnostics-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageDownloader.dia -module-name Imaginary -emit-module-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary.swiftmodule -emit-objc-header-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Imaginary-Swift.h -emit-dependencies-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageDownloader.d -num-threads 8 -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageDownloader.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Option.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Types.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ButtonBackgroundDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageProcessor.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/MultipleImageFetcher.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageFetcher.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ButtonDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImageViewDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Configuration.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/ImaginaryError.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Decompressor.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/Result.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/View+Imaginary.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/armv7/TintImageProcessor.bc
    /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Configuration.swift:19:45: error: unable to infer complex closure return type; add explicit type to disambiguate
      public static var imageStorage: Storage = {
                                                ^
    /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift:16:24: error: reference to generic type 'Storage' requires arguments in <...>
                  storage: Storage? = Configuration.imageStorage) {
                           ^
                                  <Any>
    Cache.Storage:1:20: note: generic type 'Storage' declared here
    final public class Storage<T> {
                       ^
    /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift:8:24: error: reference to generic type 'Storage' requires arguments in <...>
      private let storage: Storage?
                           ^
                                  <Any>
    Cache.Storage:1:20: note: generic type 'Storage' declared here
    final public class Storage<T> {
                       ^
    
    CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
        cd /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
        export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
        export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/davidyork/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public"
        export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name Imaginary -O -whole-module-optimization -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -target arm64-apple-ios8.0 -g -module-cache-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/ModuleCache.noindex -Xfrontend -serialize-debugging-options -embed-bitcode -swift-version 4 -I /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Carthage/Build/iOS -c -num-threads 8 /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageDownloader.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Option.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Types.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonBackgroundDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageProcessor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/MultipleImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ImageViewDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Configuration.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImaginaryError.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/Decompressor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Result.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Extensions/View+Imaginary.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/TintImageProcessor.swift -output-file-map /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary-iOS-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary.swiftmodule -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-generated-files.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-own-target-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-project-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources/arm64 -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary-Swift.h -Xcc -working-directory/Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
    
    CompileSwift normal arm64
        cd /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -emit-bc /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageDownloader.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Option.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Types.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonBackgroundDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageProcessor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImageDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/MultipleImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ButtonDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/ImageViewDisplayer.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Configuration.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/ImaginaryError.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/Decompressor.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Result.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Extensions/View+Imaginary.swift /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/iOS/TintImageProcessor.swift -target arm64-apple-ios8.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -I /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos -F /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Carthage/Build/iOS -g -module-cache-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/ModuleCache.noindex -swift-version 4 -O -serialize-debugging-options -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-generated-files.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-own-target-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Imaginary-project-headers.hmap -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/BuildProductsPath/Release-iphoneos/include -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources/arm64 -Xcc -I/Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/DerivedSources -Xcc -working-directory/Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary -emit-module-doc-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary.swiftdoc -serialize-diagnostics-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageDownloader.dia -module-name Imaginary -emit-module-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary.swiftmodule -emit-objc-header-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Imaginary-Swift.h -emit-dependencies-path /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageDownloader.d -num-threads 8 -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageDownloader.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Option.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Types.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ButtonBackgroundDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageProcessor.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/MultipleImageFetcher.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageFetcher.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ButtonDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImageViewDisplayer.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Configuration.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/ImaginaryError.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Decompressor.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/Result.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/View+Imaginary.bc -o /Users/davidyork/Library/Caches/org.carthage.CarthageKit/DerivedData/9.4.1_9F2000/Imaginary/3.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Imaginary-iOS/IntermediateBuildFilesPath/Imaginary.build/Release-iphoneos/Imaginary-iOS.build/Objects-normal/arm64/TintImageProcessor.bc
    /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Library/Configuration.swift:19:45: error: unable to infer complex closure return type; add explicit type to disambiguate
      public static var imageStorage: Storage = {
                                                ^
    /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift:16:24: error: reference to generic type 'Storage' requires arguments in <...>
                  storage: Storage? = Configuration.imageStorage) {
                           ^
                                  <Any>
    Cache.Storage:1:20: note: generic type 'Storage' declared here
    final public class Storage<T> {
                       ^
    /Users/davidyork/academia/academia-ios/Carthage/Checkouts/Imaginary/Sources/Shared/Fetcher/ImageFetcher.swift:8:24: error: reference to generic type 'Storage' requires arguments in <...>
      private let storage: Storage?
                           ^
                                  <Any>
    Cache.Storage:1:20: note: generic type 'Storage' declared here
    final public class Storage<T> {
                       ^
    
    ** ARCHIVE FAILED **
    
    
    The following build commands failed:
    	CompileSwift normal armv7
    	CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler
    	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
    	CompileSwift normal arm64
    (4 failures)
    
    opened by DavidEYork 4
  • Update closure reference

    Update closure reference

    • There are some errors like incorrect checksum for freed object - object was probably modified after being freed that may relate to inner closure reference.

      • https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001197.html
      • http://blog.xebia.com/swift-self-reference-in-inner-closure/

    From testing https://gist.github.com/onmyway133/0c76f56c52e4c3a4c0d705481dfaacbc, I see that there's nothing wrong. But I think it's easy to reason with another helper function

    • Running Thead Sanitizer, we have some warnings about accessing fetcher from main queue and from cache queue. This fixes by wrapping the call inside main queue so that actions are processed serially
    opened by onmyway133 4
  • XCode 10 GM and Swift 4.2 fails to build

    XCode 10 GM and Swift 4.2 fails to build

    /Users/joelaws/Workspace/kratos/Pods/Imaginary/Sources/iOS/ImageViewDisplayer.swift:8:32: 'UIViewAnimationOptions' has been renamed to 'UIView.AnimationOptions'
    /Users/joelaws/Workspace/kratos/Pods/UIKit.UIViewAnimationOptions:3:18: 'UIViewAnimationOptions' was obsoleted in Swift 4.2
    /Users/joelaws/Workspace/kratos/Pods/Imaginary/Sources/Shared/Library/Option.swift:26:48: Cannot invoke initializer for type 'ImageViewDisplayer' with no arguments
    /Users/joelaws/Workspace/kratos/Pods/Imaginary/Sources/iOS/ImageViewDisplayer.swift:6:32: 'UIViewAnimationOptions' has been renamed to 'UIView.AnimationOptions'
    /Users/joelaws/Workspace/kratos/Pods/UIKit.UIViewAnimationOptions:3:18: 'UIViewAnimationOptions' was obsoleted in Swift 4.2
    
    opened by jlaws 3
  • Best effort cache

    Best effort cache

    I'm working on a use case where the app is available offline.

    Is it possible for the following scenario to be satisified?

    1. I have images in my cache
    2. images have an expiry set (default set by Imaginary)
    3. I am offline after the image expires
    4. Fetcher can't get image because it's offline so it uses the last known image, even though cache has expired.

    Ideally, I'd want to have the images never expire, but the Fetcher check for an update every X days, in case the image has been modified for whatever reason.

    Thanks!

    opened by Skorch 3
  • Reuse code between iOS and macOS

    Reuse code between iOS and macOS

    As a follow up to https://github.com/hyperoslo/Imaginary/issues/24

    • Use typelias Image and ImageView to reuse code
    • The Decompressor is a bit different. So make it separate
    • Add Configuration, as using Imaginary takes away the namespace
    • Add ImaginaryForMac to demo Imaginary in macOS. Yeah macOS

    window 2016-06-27 13-37-09

    opened by onmyway133 3
  • Improve user experience when using Imaginary

    Improve user experience when using Imaginary

    This PR improves the way that Imaginary works with placeholders and setting the images with animation.

    Before we used UIView.animateWithDuration which could affect the scrolling experience when using Imaginary in a long feed. Now we use CALayer based animations which should hopefully fix the issue.

    This PR also introduces a transition closure that adds a smooth transition between the placeholder and the newly fetch image.

    opened by zenangst 3
  • Decompressor

    Decompressor

    So this decompressor will draw the image in a context and then add some scale if you want. The fetcher will call it from the background, it's not safe enough to just do the background thingy in the method, I'd rather do it in the other fetcher method, where we have access to the imageView and stuff.

    As you can see the blended images are super fine:

    screen shot 2015-11-27 at 2 35 40 pm

    opened by RamonGilabert 3
  • Is it possible to configure the cache key?

    Is it possible to configure the cache key?

    I think what's happening is that the API I'm writing against returns different URLs for the same image. (They are unique to the session.) But I know they are the same image, as they are associated with a resource on the server. I'd like to be able to specify the cache key somehow, so that I can still cache these images. Is this possible?

    Thank you!

    opened by mgrider 2
  • About Swift Package Manager dependency issue.

    About Swift Package Manager dependency issue.

    In Package.swift, the dependencies of Cache should not be master.

    // swift-tools-version:5.1
    import PackageDescription
    
    let package = Package(
        name: "Imaginary",
        products: [
            .library(
                name: "Imaginary",
                targets: ["Imaginary"]),
        ],
        dependencies: [
          // FIXME: it should not depend on `master` branch.
          .package(url: "https://github.com/hyperoslo/Cache", .branch("master"))
        ],
        targets: [
            .target(
                name: "Imaginary",
                dependencies: ["Cache"],
                path: "Sources"
                )
        ],
        swiftLanguageVersions: [.v5]
    )
    
    opened by ToroLiu 0
  • Image rotating in side Collectionview cell after converted to tintcolor of the image

    Image rotating in side Collectionview cell after converted to tintcolor of the image

    I have collection view with horizontal scrolling of images, those images are placing correct with original colour, after changing the images tint colour using this , the images are rotated.

    let headers: [String: String] = BaseService().allheaders(headers: nil)

            var colorOption = Option(imagePreprocessor: TintImageProcessor(tintColor: .black))
            colorOption.downloaderMaker = {
                return ImageDownloader(modifyRequest: {
                    var request = $0
                    for (headerField, headerValue) in headers {
                        request.addValue(headerValue, forHTTPHeaderField: headerField)
                    }
                    return request
                })
            }
            self.setImage(url: imageUrl, option: colorOption) { (result) in
                switch result {
                case .value(let image):
                    completion(image)
                case .error(let error):
                    completion(nil)
                }
            }
    
    opened by NallapatiMalleswari 1
  • MultipleImageFetcher crashfix

    MultipleImageFetcher crashfix

    When trying to prefetch multiple images sometimes app crashed on line: results.append(result) (in file MultipleImageFetcher.swift) Because trying to change array from multiple thread simultaneously. PR contains fix by using serial queue to modify array. But may be better to use lock in this case.

    opened by escfrya 0
  • Insecure Transport: Weak SSL Protocol

    Insecure Transport: Weak SSL Protocol

    The SSLv2, SSLv23, and SSLv3 protocols contain several flaws that make them insecure, so they should not be used to transmit sensitive data. ImageDownloader.swift

    opened by Shakihassan 1
  • Can I download big image without crash

    Can I download big image without crash

    If I download big image via

    self.session.dataTask(with: request, completionHandler: { [weak self] data, response, error}
    

    image stored inside response. And I can catch crash. How can I use URLSession's method

    func downloadTask(with request: URLRequest, 
    completionHandler: @escaping (URL?, URLResponse?, Error?) -> Void) -> URLSessionDownloadTask
    

    to store image in file

    opened by smolskyaleksey 5
Releases(5.0.0)
  • 5.0.0(Oct 4, 2020)

  • 4.3.1(Jun 8, 2020)

  • 4.3.0(Jun 7, 2020)

  • 4.2.0(Sep 24, 2018)

    πŸš€ Merged pull requests

    • Implemented support for fileURLs https://github.com/hyperoslo/Imaginary/pull/80, by radianttap
    • Use Cache 5.0 https://github.com/hyperoslo/Imaginary/pull/83, by onmyway133
    • Made the example project compatible with Swift 4.2. https://github.com/hyperoslo/Imaginary/pull/87, by rizwan95

    🀘 Closed issues

    • Is it possible to use an authentication header in the request? https://github.com/hyperoslo/Imaginary/issues/77
    • Does the library support the usage of an authorization header? https://github.com/hyperoslo/Imaginary/issues/74
    • Imaginary does not compile (Carthage) https://github.com/hyperoslo/Imaginary/issues/85
    Source code(tar.gz)
    Source code(zip)
  • 3.0.3(Jan 3, 2018)

    Merged pull requests

    • Expose image fetch cancelling https://github.com/hyperoslo/Imaginary/pull/72, by VladislavJevremovic
    • Carthage compatibility https://github.com/hyperoslo/Imaginary/pull/73, by vincentsaluzzo
    • fix typo in documentation https://github.com/hyperoslo/Imaginary/pull/75, by alexshepard
    • Customise cache and downloader https://github.com/hyperoslo/Imaginary/pull/76, by onmyway133

    🀘 Closed issues

    • Does the library support the usage of an authorization header? https://github.com/hyperoslo/Imaginary/issues/74
    Source code(tar.gz)
    Source code(zip)
  • 3.0.2(Nov 2, 2017)

  • 3.0.1(Oct 27, 2017)

    πŸš€ Merged pull requests

    • Fix some typos in the README https://github.com/hyperoslo/Imaginary/pull/65, by DevWithTheHair
    • Make download function public in Downloader https://github.com/hyperoslo/Imaginary/pull/68, by onmyway133
    • Not use @testable in tests https://github.com/hyperoslo/Imaginary/pull/70, by onmyway133

    🀘 Closed issues

    • Feature an image manager https://github.com/hyperoslo/Imaginary/issues/36
    • Best effort cache https://github.com/hyperoslo/Imaginary/issues/39
    • Error in doc and internal protection level https://github.com/hyperoslo/Imaginary/issues/66
    • MultipleImageFetcher need public initialiser https://github.com/hyperoslo/Imaginary/issues/69
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Sep 25, 2017)

    Support Swift 4 πŸŽ‰

    πŸš€ Merged pull requests

    • Update project to Swift 4 https://github.com/hyperoslo/Imaginary/pull/53, by onmyway133
    • Refactoring Configuration https://github.com/hyperoslo/Imaginary/pull/54, by onmyway133
    • Use circle ci https://github.com/hyperoslo/Imaginary/pull/55, by onmyway133
    • Fix completion https://github.com/hyperoslo/Imaginary/pull/56, by onmyway133
    • Update Fetcher https://github.com/hyperoslo/Imaginary/pull/57, by onmyway133
    • Add MultipleImageFetcher https://github.com/hyperoslo/Imaginary/pull/58, by onmyway133
    • Add Option https://github.com/hyperoslo/Imaginary/pull/59, by onmyway133
    • Refactor Displayer https://github.com/hyperoslo/Imaginary/pull/60, by onmyway133
    • Update README https://github.com/hyperoslo/Imaginary/pull/61, by onmyway133
    • Add tvOS support https://github.com/hyperoslo/Imaginary/pull/62, by onmyway133
    • Swift4 https://github.com/hyperoslo/Imaginary/pull/63, by onmyway133
    • Update macOS demo https://github.com/hyperoslo/Imaginary/pull/64, by onmyway133

    🀘 Closed issues

    • Feature request: Gif support https://github.com/hyperoslo/Imaginary/issues/51
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Aug 28, 2017)

  • 2.1.0(Jun 27, 2017)

  • 2.0.0(Jun 9, 2017)

    • Fixes issue with preConfigure closure not being invoked in the main thread. #47
    • Updates the source code to use version 3.x of Cache #44
    • Minor bugfixes and improvements 😎
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Mar 28, 2017)

  • 1.0.1(Oct 20, 2016)

  • 1.0.0(Oct 20, 2016)

Owner
HyperRedink
Connected creativity
HyperRedink
Easily display images, animations, badges and alerts to your macOS application's dock icon

DSFDockTile Easily display images, animations, badges and alerts to your macOS application's dock icon. Why? I was inspired by Neil Sardesai after he

Darren Ford 45 Dec 2, 2022
Nilay Dagdemir 0 Jan 23, 2022
A simple macOS app to read code from images, written purely in Swift using Vision Framework.

CodeReader A simple macOS app to read code from images, written purely in Swift using Vision Framework. Usage Drag an image Click the convert button R

Md Ibrahim Hassan 44 Nov 20, 2022
A view that takes a set of images, make transition from one to another by using flipping effects.

CDFlipView A view that takes a set of images, make transition from one to another by using flipping effects. Demo Live Demo: https://appetize.io/app/w

Jianbin LIN 99 Aug 27, 2021
Style Art library process images using COREML with a set of pre trained machine learning models and convert them to Art style.

StyleArt Style Art is a library that process images using COREML with a set of pre trained machine learning models and convert them to Art style. Prev

iLeaf Solutions Pvt. Ltd. 222 Dec 17, 2022
High Quality Image ScrollView using cropped tiled images.

THTiledImageView Feature ?? THTiledImageView fully support UIScrollView. You can subclass it and use it. ?? Support Async Image Downloading & Caching.

null 28 Oct 28, 2022
SDWebImageMockPlugin makes possible the creation of snapshot testing with views using SDWebImage to configure images

SDWebImageMockPlugin makes possible the creation of snapshot testing with views using SDWebImage to configure images.

FABERNOVEL 4 Oct 19, 2022
Agrume - πŸ‹ An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

Jan Gorman 601 Dec 26, 2022
APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS.

APNGKit is a high performance framework for loading and displaying APNG images in iOS and macOS. It's built on top of a modified version of libpng wit

Wei Wang 2.1k Dec 30, 2022
A lightweight generic cache for iOS written in Swift with extra love for images.

Haneke is a lightweight generic cache for iOS and tvOS written in Swift 4. It's designed to be super-simple to use. Here's how you would initalize a J

Haneke 5.2k Dec 11, 2022
Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web

Kingfisher is a powerful, pure-Swift library for downloading and caching images from the web. It provides you a chance to use a pure-Swift way to work

Wei Wang 20.9k Dec 30, 2022
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

null 8.3k Jan 5, 2023
A high-performance image library for downloading, caching, and processing images in Swift.

Features Asynchronous image downloader with priority queuing Advanced memory and database caching using YapDatabase (SQLite) Guarantee of only one ima

Yap Studios 72 Sep 19, 2022
AsyncImageExample An example project for AsyncImage. Loading images in SwiftUI article.

AsyncImageExample An example project for AsyncImage. Loading images in SwiftUI article. Note: The project works in Xcode 13.0 beta (13A5154h).

Artem Novichkov 4 Dec 31, 2021
Combine SnapshotTesting images into a single asset

An extension to SnapshotTesting which allows you to create images combining the output of multiple snapshot strategies, assuming they all output to UIImage.

James Sherlock 41 Nov 28, 2022
A UIActivityViewController to share images while displaying them as a nice preview.

PSActivityImageViewController Overview This view controller allows you to share an image the same way as a normal UIActivityViewController would, with

Peter Salz 11 Oct 19, 2022
πŸ“±iOS app to extract full-resolution video frames as images.

Frame Grabber is a focused, easy-to-use iOS app to extract full-resolution video frames as images. Perfect to capture and share your favorite video mo

Arthur Hammer 319 Jan 7, 2023
Jogendra 113 Nov 28, 2022
Convert HEIC images to JPEG format on the Mac

heic2jpeg Convert HEIC images to JPEG format on the Mac A basic tool to convert Apple's obnoxious HEIC format images (as the default photo format for

Fazal Majid 2 Mar 1, 2022