LoginSignup
0
0

More than 5 years have passed since last update.

Xcode10 + Swift 4.2 + SnapKit 4.2.0

Last updated at Posted at 2018-10-23

Xcode10でSnapKitをcocoapodsでインストールすると、SnapKitのバージョン4.0.0がインストールされて、XcodeでError: 'NSLayoutAttribute' has been renamed to 'NSLayoutConstraint.Attributeなどのエラーが出でます。

SnapKitの公式GithubでもIssuesが上がっており、探ってみるとgittag4.2.0で解決できるそうなので、PodfileSnapKitのインストールにgittagを指定してインストールすることで解決できたので備忘録

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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0