LoginSignup
8
7

More than 5 years have passed since last update.

CocoaPodsでSwift 3.0へのアップデートが別ブランチで進んでいるライブラリに対応する

Last updated at Posted at 2016-09-20

ObjectMapperのswift-3ブランチを使いたかったので色々いじってたらCocoaPodsはブランチを指定できるということを知った。
ので、Podfileにて

pod 'ObjectMapper', :git => 'https://github.com/Hearst-DD/ObjectMapper.git', :commit => '6ba230a'

とかしてあげることで、最新の変更を利用することができました。

(2016/09/23追記:cocoapodsにSwiftのバージョンを伝えてあげる必要がありそうです。Podfileに以下を追加します)

...

target 'hoge-app' do

  ...

  post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['SWIFT_VERSION'] = '3.0'
      end
    end
  end

end
8
7
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
8
7