iOS 多个target中podfile写法

1、Defining an abstract target

platform :ios, '9.0'
# Note: There are no targets called "Shows" in any of this workspace's Xcode projects
 abstract_target 'Shows' do

   pod 'AFNetworking'

   target 'Networking App 1'
   target 'Networking App 1'
 
end

2、Defining an abstract_target wrapping Pods to multiple targets

# Note: There are no targets called "Shows" in any of this workspace's Xcode projects
abstract_target 'Shows' do
  pod 'ShowsKit'

  # The target ShowsiOS has its own copy of ShowsKit (inherited) + ShowWebAuth (added here)
  target 'ShowsiOS' do
    pod 'ShowWebAuth'
  end

  # The target ShowsTV has its own copy of ShowsKit (inherited) + ShowTVAuth (added here)
  target 'ShowsTV' do
    pod 'ShowTVAuth'
  end

  # Our tests target has its own copy of
  # our testing frameworks, and has access
  # to ShowsKit as well because it is
  # a child of the abstract target 'Shows'

  target 'ShowsTests' do
    inherit! :search_paths
    pod 'Specta'
    pod 'Expecta'
  end
end

你可能感兴趣的:(iOS 多个target中podfile写法)