Unable to find a target named `ProjectName`

After spending hours on Google just opened Podfile and found that project name is wrong. So I have just written correct project name in Podfile and issue has been resolved.

Before:

target 'Wrong Project Name' do
    pod 'Parse'
    pod 'SDWebImage'
end

After:

target 'Correct Project Name' do
    pod 'Parse'
    pod 'SDWebImage'
end

According to the error, you specify a target named ProjectName but this does not exist in your project. Read the podfile syntax reference carefully and make sure you add the right target name (in my case it's called Tester:)

enter image description here


It is due to target name changed.

just opened Podfile and replace target name with new target name.

(In my case “GoogleMapSample” was “Map Sample”,

“GoogleMapSampleTests” was “Map SampleTests”,

“GoogleMapSampleUITests” was “Map SampleUITests”,

means I just replace “Map Sample” with “GoogleMapSample” for all targets)

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'GoogleMapSample' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

    pod 'GoogleMaps'
    pod 'GooglePlaces'
    pod 'Alamofire', '~> 4.4’
    pod 'SwiftyJSON', '~> 4.0'


  # Pods for GoogleMapSample

  target 'GoogleMapSampleTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'GoogleMapSampleUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end