chameleon icon indicating copy to clipboard operation
chameleon copied to clipboard

The Pod version doesn't compile with latest Xcode and swift 4

Open houmie opened this issue 7 years ago • 4 comments

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,

houmie avatar Oct 30 '17 16:10 houmie

+1

mayqiyue avatar Oct 31 '17 03:10 mayqiyue

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.

MartinP7r avatar Nov 01 '17 04:11 MartinP7r

Use this setting in Podfile. pod 'ChameleonFramework/Swift', :git => 'https://github.com/ViccAlexander/Chameleon.git', :branch => 'wip/swift4'

lis186 avatar Nov 01 '17 10:11 lis186

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

SohaibSiddique avatar Mar 06 '19 04:03 SohaibSiddique