0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CocoaPods ライブラリのコード変更を反映させる方法

Last updated at Posted at 2019-11-14

はじめに

Xcode でメインプロジェクトを開発&デバッグ中、ライブラリ側のコードにデバッグプリントを入れたいことがあります。
Pods/Development Pods/LibraryName ディレクトリにソースが置いてあるのですが、デバッグプリントを仕込み、ビルドしてもそのままでは変更が反映されません...

Build SystemLegacy Build System に変更することで解決する方法がありますが、できれば Legacy に変更したくはありません。

環境

  • OS: macOS Mojave 10.14.4
  • Xcode: 10.2.1 (10E1001)

解決方法

対象のライブラリをビルドに追加することで問題を解決します。

Xcode メニュー -> Product -> Scheme -> Edit Scheme -> Build -> '+'ボタンを押す

ボタンを押すとダイアログボックスが表示されるので、リストからビルドに追加するライブラリを選択します。
この設定で、ビルド時に対象のライブラリもリビルドされるようになり、ソースコードに行った変更が反映されるようになります。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?