iOS--[!] Unable to find a target named `xxx`, did find `xxx` and `xxx`.

目的

项目本身使用cocoapods,现将某一个部分抽出来作为子项目B,在项目B中也需要使用主项目用到的第三方库,比方说:
pod 'AFNetworking', '~> 3.1.0',

方法

改写你的Podfile,格式变成这样:

platform :ios, '8.0'
workspace 'xxx.xcworkspace'
abstract_target 'abs_name' do
  project 'aaa.xcodeproj'

  pod 'AFNetworking', '~> 3.1.0'
  pod 'SSZipArchive', '~> 1.1'
  pod 'MJRefresh'
  ...
 
  target 'AAA'
  target 'AAA_live'
end

target :BBB do
  project 'BBB/BBB.xcodeproj'

  pod 'AFNetworking', '~> 3.1.0'
end

示例中(文件|workspace|target|project)名字换成你自己的

资料

https://stackoverflow.com/questions/23864700/cocapods-unable-to-find-a-target-named/34513737#34513737

你可能感兴趣的:(iOS--[!] Unable to find a target named `xxx`, did find `xxx` and `xxx`.)