Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ImageCache.swift:479:62: error: #572

Closed
IAskWind opened this issue Jan 22, 2017 · 4 comments
Closed

ImageCache.swift:479:62: error: #572

IAskWind opened this issue Jan 22, 2017 · 4 comments

Comments

@IAskWind
Copy link

  • ERROR | [iOS] xcodebuild: Kingfisher/Sources/ImageCache.swift:479:62: error: result values in '? :' expression have mismatching types '_' and 'Date'
@onevcat
Copy link
Owner

onevcat commented Jan 22, 2017

It's a bug of Xcode 8. Please upgrade to Xcode 8.2, or you can just use an earlier version of Kingfisher (3.2.4) for a while until you upgrade your Xcode version.

@borut-t
Copy link

borut-t commented Jan 27, 2017

@onevcat You are right. This is solved in 8.2. But on older versions this causes an error. We are using CircleCI and they obviously have older version. Tests fails because of this issue.

You could make this right on older versions like this:

let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond)

That way property doesn't need to infer data type and will not cause error on older versions.

Could you make a fix asap?

@borut-t
Copy link

borut-t commented Jan 27, 2017

@onevcat CircleCI did upgrade to version 8.2 and there is no more problem.

@onevcat
Copy link
Owner

onevcat commented Jan 27, 2017

Indeed, I think we'd better modify it to support some (not so) early Xcode version. I will take look at it later. Thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants