美文网首页
Cocoapods 多项目

Cocoapods 多项目

作者: MI移动 | 来源:发表于2018-06-05 08:51 被阅读0次

1.第一步(子工程配置)

子项目Target->Build Settings->以下四项配置中添加$(inherited)
Other Linker FlagsLibraray Search PathsHeader Search PathsFramework Search Paths

2.第二步(Podfile文件编写)
例:

    platform :ios, '9.0'    

    workspace '主工程.xcworkspace'
    
    # 主工程
    target '主工程' do
        project '主工程.xcodeproj'
        pod 'Masonry'
        pod 'AFNetworking'
        pod 'FLAnimatedImage'
        pod 'MJExtension'
        pod 'MJRefresh'
        pod 'TZImagePickerController'
        pod 'MBProgressHUD'
        pod 'SDWebImage'
        pod 'Reachability'
        pod 'FMDB'
        pod 'Bugly'
    
        pod 'UMCCommon'
        pod 'UMCSecurityPlugins'
        # 日志
        pod 'UMCCommonLog'
        # U-Share SDK UI模块(分享面板,建议添加)
        pod 'UMCShare/UI'
    
        # 集成微信(完整版14.4M)
        pod 'UMCShare/Social/WeChat'
        # 集成QQ/QZone/TIM(完整版7.6M)
        pod 'UMCShare/Social/QQ'
        # 集成新浪微博(完整版25.3M)
        pod 'UMCShare/Social/Sina'
    
        pod 'AMapSearch'
        pod 'AMapLocation'
        pod 'AMap2DMap'
    end
    
    # 系统分享
    target 'ShareExtension' do
        pod 'Masonry'
        pod 'SDWebImage'
        pod 'MBProgressHUD'
    end
    
    # 子工程1
    target '子工程1' do
        project '../子工程1/子工程1.xcodeproj'
        pod 'Masonry'
        pod 'AFNetworking'
        pod 'FLAnimatedImage'
        pod 'MJExtension'
        pod 'MJRefresh'
        pod 'TZImagePickerController'
        pod 'MBProgressHUD'
        pod 'SDWebImage'
    end
    
    # 子工程2
    target '子工程2' do
        project '../子工程1/子工程1.xcodeproj'
        pod 'Masonry'
        pod 'AFNetworking'
        pod 'FLAnimatedImage'
        pod 'MJExtension'
        pod 'MJRefresh'
        pod 'TZImagePickerController'
        pod 'MBProgressHUD'
        pod 'SDWebImage'
    end
    
    
    # 子工程3
    target '子工程3' do
        project '../子工程3/子工程3.xcodeproj'
        pod 'Masonry'
        pod 'SDWebImage'
        pod 'MBProgressHUD'
    end
    
    
    # 网络管理
    target '网络管理' do
        project '../网络管理/网络管理.xcodeproj'
        pod 'AFNetworking'
    end
    
    # 友盟分享
    target '友盟分享' do
        project '../友盟分享/友盟分享.xcodeproj'
        pod 'UMCCommon'
        pod 'UMCSecurityPlugins'
        # 日志
        pod 'UMCCommonLog'
        # U-Share SDK UI模块(分享面板,建议添加)
        pod 'UMCShare/UI'
    
        # 集成微信(完整版14.4M)
        pod 'UMCShare/Social/WeChat'
        # 集成QQ/QZone/TIM(完整版7.6M)
        pod 'UMCShare/Social/QQ'
        # 集成新浪微博(完整版25.3M)
        pod 'UMCShare/Social/Sina'
    end
    
    # 主题
    target '主题' do
        project '../主题/主题.xcodeproj'
        pod 'MBProgressHUD'
    end
    
    # 公用库
    target '共用库' do
        project '../共用库/共用库.xcodeproj'
        pod 'AFNetworking'
        pod 'FMDB'
    end

相关文章

网友评论

      本文标题:Cocoapods 多项目

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