🚫 If this template is not filled out your issue will be closed with no comment. 🚫
Info | Value |
-------------------------|-------------------------------------|
Platform | ios
Platform Version | 11.0 / Xcode 9 GM
SnapKit Version | 4.0.0
Integration Method | cocoapods
So I am using the latest Xcode 9 GM and when I try to build and run, it got below fatal errors
self.view.contentHuggingPriority(for: .horizontal).rawValue
Error: Value of type 'UILayoutPriority' (aka 'Float') has no member 'rawValue'
self.view.setContentHuggingPriority(LayoutPriority(rawValue: newValue), for: .horizontal)
Error: Argument labels '(rawValue:)' do not match any available overloads
if (layoutConstraint.priority.hashValue < requiredPriority), (self.priority.constraintPriorityTargetValue != requiredPriority) {
layoutConstraint.priority = LayoutPriority(rawValue: self.priority.constraintPriorityTargetValue)
}
Error1 : Binary operator '<' cannot be applied to operands of type 'Int' and 'Float' at line 246
Error2 : Argument labels '(rawValue:)' do not match any available overloads at line 247
if self.priority.rawValue != 1000.0 {
description += " ^\(self.priority)"
}
Error: Value of type 'UILayoutPriority' (aka 'Float') has no member 'rawValue'
I am seeing this same issue, why closed?
Make sure you clean your DerivedData folder and are using the tagged v4.0.0 release. It should be great!
I cleaned DerivedData and Installed SnapKit 4.0.0 (was 3.2.0), but I have the same issue
@dkorkin how are you integrating it? Does it work if you just download a .tar.gz from this repo and load up the project file and build it?
@robertjpayne I used cocoapods, pod cache --all clean and pod install
@robertjpayne downloaded repo perfectly works
@dkorkin sounds like Cocoapods cannot support both Swift 4.0 and Swift 3.2 at the same time, you need to continue to use version 3.2.0 until all your pods are Swift 4.0.
For what it's worth functionally there is zero difference…
@robertjpayne yes, just got this solution, thanks!
@dkorkin did you manage to solve it? I am facing the same issue and cannot find a solution.
@robertjpayne Perhaps you could point me in the right direction?
Swift 4
XCode Version 9.0 (9A235)
this is in my podfile:
platform :ios, '10.0'
...
use_frameworks!
...
pod 'SnapKit', '~> 4.0.0' #Layout constraints made easy
@leandromperez I have the same issue, and I tried to install 3.2.0 it worked.
pod 'SnapKit', '~> 3.2.0'
Most helpful comment
@leandromperez I have the same issue, and I tried to install 3.2.0 it worked.