Closed Michele404 closed 6 years ago
Hey @Michele404 there's a PR open https://github.com/Skyscanner/SkyFloatingLabelTextField/pull/236 that needs a few more fixes before it can be merged.
I've just released 3.6.0 which supports Swift 4.2
Still getting a warning in xcode to convert to Swift 4.2 when trying to use version 3.6.0.
Super odd... It should be fine and the syntax is 4.2 compatible. It still compiles I assume?
After a little more research it looks like xcode is really bad at recognizing when multiple versions of swift are supported:
Is there any way to "force" xcode to ignore this type of thing, would be nice not to have the "you need to update your swift projects warning"
We can set swift_version
in the podspec, but if you do that I believe the pod will stop working for other versions. Might be worth looking through the CocoaPod issues? It should be possible to write a post_install
hook in your Podfile to change the SWIFT_VERSION
build setting for the target
Try
post_install do |installer|
installer.pods_project.targets.each do |pod_target|
pod_target.build_configurations.each do |config|
if pod_target.name == 'SkyFloatingLabelTextField'
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end
My swift version is already set to 4.2. This still doesn't prevent xcode from seeing code that is not compat (the code in your else statement) with swift 4.2 and thinking it needs to be converted. Since that code will not run its not a big deal, just more fun with swift and xcode.
And even forcing the target to 4.2 doesn't make Xcode stop warning?
Correct. Xcode is picking up code that is not compat with 4.2 and it wants to update that code.
That sucks :( Don't think there's anything we can do then
Update to 4.2 please