2016-10-25 2 views
10

を使用していない私はインストールポッドたときに、私は、コンソールが私に教えて、別のプロジェクトを持っている:ポッドインストール、依存 `` *****任意の具体的な目標で

Analyzing dependencies 
[!] The dependency `MMDrawerController (~> 0.5.7)` is not used in any concrete target. 
The dependency `ViewUtils` is not used in any concrete target. 
The dependency `CPAnimationSequence` is not used in any concrete target. 
The dependency `iCarousel` is not used in any concrete target. 
The dependency `BlocksKit (~> 2.2.5)` is not used in any concrete target. 
The dependency `AFNetworking` is not used in any concrete target. 
The dependency `MBProgressHUD (~> 0.8)` is not used in any concrete target. 
The dependency `NSString-UrlEncode` is not used in any concrete target. 
The dependency `INTULocationManager` is not used in any concrete target. 
The dependency `SDWebImage (= 3.7.2)` is not used in any concrete target. 
The dependency `Adjust (from `https://github.com/adjust/ios_sdk.git`, tag `v3.4.0`)` is not used in any concrete target. 
The dependency `TARTT (from `https://github.com/takondi/tartt-sdk-ios.git`)` is not used in any concrete target. 
The dependency `SIAlertView (~> 1.3)` is not used in any concrete target. 
The dependency `GoogleAppIndexing` is not used in any concrete target. 
The dependency `Gimbal` is not used in any concrete target. 

問題が何でありますか? プロジェクトには20個以上のtragetがあるため、post_installパターンを使用してうまく動作しますが、私にとってはうまくいきません。

私のcocoapodバージョンは1.1.1、pls helpです。ここ

がPodfileがある:

source 'https://github.com/CocoaPods/Specs.git' 
platform :ios, '7.0' 

pod 'MMDrawerController', '~> 0.5.7' 
pod 'ViewUtils' 
pod 'CPAnimationSequence' 
pod 'iCarousel' 
pod 'BlocksKit', '~> 2.2.5' 
pod 'AFNetworking' 
pod 'MBProgressHUD', '~> 0.8' 
pod 'NSString-UrlEncode' 
pod 'INTULocationManager' 
pod 'SDWebImage', '3.7.2' 
pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v3.4.0' 
pod 'TARTT', :git => 'https://github.com/takondi/tartt-sdk-ios.git' 
pod 'SIAlertView', '~> 1.3' 
pod 'GoogleAppIndexing' 
pod 'Gimbal' 

post_install do |installer_representation| 
    installer_representation.project.targets.each do |target| 
     target.build_configurations.each do |config| 
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' 
     end 
    end 
end 
+1

であなたのポッドファイルを追加するには、プロジェクトフォルダ内のあなた 'ポッドinit'を@did?あなたのプロジェクトに20以上のターゲットがあるということはどういう意味ですか? – mat

+0

@matなぜなら、ターゲットだけを持っている場合、ターゲット 'MyApp'を使用するからです。 ポッド 'AFNetworking'、 '〜> 1.0' ...しかし、プロジェクトがもっとターゲットを持っている場合、フックは実用性があると思います – Chao

答えて

22

あなたPodfile必要がありますあなたがcocoapodsをインストールしたいターゲットした情報が含まれています。ポッドファイル設定のポストインストーラは、ACTIVE_ARCHフラグを各ターゲットのNOに設定するだけです。

アプリ内に20個以上のターゲットがある場合(現在のPodfileで混乱している)、おそらくPodfilePodfile.lockを削除してからpod initを実行してみてください。あなたのアプリに有効なPodfileをCococaPods gemに作成させます。次に、あなたのアプリが使用するCocoaPodを貼り付け、インストール後のインストラクションの指示を新しいPodfileに貼り付け、pod installを使ってcocoapodsを再インストールしようとします。

正しいターゲットの間にpod命令を配置することを忘れないでください。

Podfileについては、CocoaPods siteをご覧ください。

は、だからあなたのPodfileは、次のようになります。

target 'YourTargetName' do 

source 'https://github.com/CocoaPods/Specs.git' 
platform :ios, '7.0' 

pod 'MMDrawerController', '~> 0.5.7' 
pod 'ViewUtils' 
pod 'CPAnimationSequence' 
pod 'iCarousel' 
pod 'BlocksKit', '~> 2.2.5' 
pod 'AFNetworking' 
pod 'MBProgressHUD', '~> 0.8' 
pod 'NSString-UrlEncode' 
pod 'INTULocationManager' 
pod 'SDWebImage', '3.7.2' 
pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => 'v3.4.0' 
pod 'TARTT', :git => 'https://github.com/takondi/tartt-sdk-ios.git' 
pod 'SIAlertView', '~> 1.3' 
pod 'GoogleAppIndexing' 
pod 'Gimbal' 

post_install do |installer_representation| 
    installer_representation.project.targets.each do |target| 
    target.build_configurations.each do |config| 
     config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' 
    end 
    end 
end 
end 
+0

@ k8mil、しかし、私は別のプロジェクトを得る、podfileはこのように見える、彼らはファイルの頭に任意のターゲットを追加しませんが、うまく動作します。多分彼らは古いポッドバージョンを使用していますか? – Chao

+0

たぶん彼らは古いバージョンのcocoapodsを使用していて、あなたのコンピュータのCocoaPodsバージョンは最新です。存在する場合は、 'gemfile.lock'にあなたのプロジェクトで使われるCocoaPodのバージョンをチェックしてください。 – kamwysoc

+0

私は試してみる – Chao

0

それは少し奇妙だが、それはあなたのpodfileに問題がある可能性がありますので、ジンバルSDKはiCarouselが含まれています。

Source

12

単に以下のブロック

target 'YourApp' do 
    pod '*******', '~> 1.0' 
end 
+1

YourApp =バンドル名 –

+0

はい、上記のフォーマットに追加すると機能しました。 –

関連する問題