28

When performing pod install on a project I get the following output:

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.

How do I resolve this issue so that the install works correctly?

There's more than 20 targets and a post_install pattern could this contribute to the problem?

My CocoaPod version is 1.1.1.

Here is the 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
andygavin
  • 2,784
  • 22
  • 32
Chao
  • 317
  • 1
  • 3
  • 10
  • 4
    @did you `pod init` in your project folder? What do you mean that your project has more than 20 targets? – Mat Oct 25 '16 at 08:47
  • @mat because when it has only a target, they will use target 'MyApp' pod 'AFNetworking', '~> 1.0' ... , but when the project has more target, they use Hooks is practicality i think – Chao Oct 25 '16 at 08:52

3 Answers3

45

Your Podfile should contains information in which target you want to install the cocoapods. The post installer in your Podfile sets only ACTIVE_ARCH flag to NO in each target.

If you have more than 20 targets in your app(and some mess in current Podfile), maybe try to remove Podfile and Podfile.lock and then do pod init. It will make CococaPods gem create a valid Podfile for your app. Then paste the CocoaPods that your app using and paste the post installer instruction to the new Podfile and try to reinstall cocoapods using pod install.

Remember to place pod instructions between correct target.

Look at the CocoaPods site about Podfile.

So your Podfile should look like:

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
kamwysoc
  • 6,709
  • 2
  • 34
  • 48
  • thanks @k8mil, but i get the project from another, the podfile looks like this, they doesn't add any target in the head of the file but works fine. maybe they use a old pod version? – Chao Oct 25 '16 at 09:17
  • Maybe they use old version of cocoapods, and on your computer CocoaPods version is latest. If exist check maybe in `gemfile.lock` the version of CocoaPods that should be used in your project. – kamwysoc Oct 25 '16 at 09:21
  • i will try, thinks – Chao Oct 25 '16 at 09:22
  • 1
    Yes, it's correct. Must to remove all podfile.lock and .xcworkspace and then init pod again. – Trần Trung Hiếu Apr 25 '17 at 08:38
  • I want to highlight that `source` is going to clone that repo which is ~ 1GB in size. If you have `Cocoapods` already installed, you may want to avoid this. Also, you'll need to provide the path to the workspace `workspace '../path/to/your/project.xcworkspace/'` and the path to the project `project '../path/to/your/project.xcodeproj/'` – Sylvester Loreto Jan 20 '20 at 16:21
  • Correction. It is actually ~3GB. – Sylvester Loreto Jan 23 '20 at 12:55
35

Simply add your pod file in below block

target 'YourApp' do
  pod '*******', '~> 1.0'
end
Darshit Shah
  • 2,366
  • 26
  • 33
0

It's a little weird, but the Gimbal SDK contains iCarousel so it might have problems with your podfile.

Source

kevinl
  • 4,194
  • 6
  • 37
  • 55