Reputation: 9835
I'm working on one of my projects (https://github.com/mamaral/Neon) that I've made available via CocoaPods, but since I've migrated to Swift 3.0 I've been unable to release this update as my podspec fails validation.
The first example of one of the errors I'm seeing (I'm hoping the fix for one will be the fix for all) is this:
warning: extraneous '_' in parameter: 'align' has no keyword argument name
This is in reference to the following function declaration:
public func align(_ align: Align, relativeTo sibling: Frameable, padding: CGFloat, width: CGFloat, height: CGFloat, offset: CGFloat = 0) {}
My project compiles/runs fine, without warnings/errors, although it may be relevant that the xcodebuild
command also fails as well, so I'm not sure what the issue is here. Any ideas?
Upvotes: 3
Views: 1059
Reputation: 557
I was having this issue as well. I had a pod in valid Swift 3 syntax but Cocoapods was using the Swift2.3 compiler.
It seems Cocoapods now supports a .swift-version
file to specify the version of Swift to be used (it uses Swift 2.3 as default).
Upvotes: 1