Xcode10でSnapKitをcocoapodsでインストールすると、SnapKitのバージョン4.0.0がインストールされて、XcodeでError: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attribute
などのエラーが出でます。
SnapKitの公式GithubでもIssues
が上がっており、探ってみるとgittag
の4.2.0
で解決できるそうなので、Podfile
でSnapKit
のインストールにgit
とtag
を指定してインストールすることで解決できたので備忘録
Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'MyApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'SnapKit', :git => 'https://github.com/SnapKit/SnapKit.git', :tag => '4.2.0'
end