Soheil Novinfard Soheil Novinfard - 1 year ago 88
Objective-C Question

Duplicate target after "pod install"

After I added new dependency to my project and run

pod install
, I have duplicate target in my workspace(.xcworkspace) as below:

enter image description here

And this is the pod file structure:

platform :ios, '8.0'
pod 'AFNetworking', '~> 2.6'
pod 'Fabric'
pod 'Crashlytics'
pod 'SocketRocket'

I restart the project and also Xcode, but it does not help. What is the reason and how can I solve the problem?

Answer Source

First, try to wrap your pods with target specification, like this:

target 'TargetName' do
  pod 'Fabric'
  pod 'Crashlytics' 
  #other pods 
  1. Delete your .xcworkspace, podfile.lock and pods folder, just as @SukruK suggested.
  2. Do pod install again and open the workspace created.

You can do the following instructions in order to fix this configuration issue CocoaPods did not set the base configuration of your project because your project already has a custom config set.

  1. Go to your project settings
  2. Set None configuration set for both Pods-related targets
  3. Run pod install again

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download