LoginSignup
39
20

More than 5 years have passed since last update.

CocoaPodsをプロジェクトから削除する方法

Posted at

CocoaPods関連のファイルを一つ一つ削除する、というやり方をよく見かけるのですが、ちょっと面倒。
削除するファイルを間違えたりして、ビルドが通らなくなったらまた面倒。

バシッと一発で削除できるプラグインがあったので紹介します。

インストール

ターミナル
$ sudo gem install cocoapods-deintegrate

やってみよう

1.プロジェクトフォルダに移動
ターミナル
$ cd プロジェクト名
2.念のためプロジェクトのバックアップ
3.削除コマンド実行
ターミナル
$ pod deintegrate

ちなみにコマンド実行後も
Podfile, Podfile.lock, Workspace
ファイルは残ります。

Podfile, Podfile.lockはrmコマンドで削除できます。

ターミナル
$ rm Podfile

参照

https://github.com/CocoaPods/cocoapods-deintegrate
https://medium.com/@xwildeyes/remove-uninstall-deintegrate-cocoapods-from-your-xcode-ios-project-c4621cee5e42

39
20
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
39
20