美文网首页
iOS--[!] Unable to find a target

iOS--[!] Unable to find a target

作者: 原鸣清 | 来源:发表于2017-09-14 12:10 被阅读1614次

目的

项目本身使用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

      本文链接:https://www.haomeiwen.com/subject/gexdsxtx.html