chameleon
chameleon copied to clipboard
The Pod version doesn't compile with latest Xcode and swift 4
This is a shame as this doesn't build anymore.
/Users/houmie/projects/tegant/Pods/ChameleonFramework/Pod/Classes/Swift/ChameleonShorthand.swift:93:12: 'init(averageColorFromImage:)' has been replaced by 'init(averageColorFrom:)'
Kindly advice, Thanks,
+1
It compiles just fine if you use the :git branch in your podfile as described in https://github.com/ViccAlexander/Chameleon#swift-3
In your workspace make sure that the Swift Language Version
in Build Settings of the ChameleonFramework
target inside the Pods project is set to Swift 4.0
Anyhow, the line https://github.com/ViccAlexander/Chameleon/blob/6dd284bde21ea2e7f9fd89bc36f40df16e16369d/Pod/Classes/Swift/ChameleonShorthand.swift#L93 your error is referring to has been set to init(averageColorFrom:)
for over a year, according to the git history of the file, so it shouldn't through that error if set up correctly.
Use this setting in Podfile.
pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git', :branch => 'wip/swift4'
Use this setting in Podfile.
pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git', :branch => 'wip/swift4'
only this error remain others are gone,
enumeration value 'kCGColorSpaceModelXYZ' not handled in switch