美文网首页
iOS 多个target中podfile写法

iOS 多个target中podfile写法

作者: tongyuling | 来源:发表于2021-01-04 11:09 被阅读0次

    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写法

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