美文网首页
Podfile文件书写

Podfile文件书写

作者: 失忆的程序员 | 来源:发表于2021-11-01 09:21 被阅读0次

    Podfile文件书写

    #source 'https://github.com/CocoaPods/Specs.git'
    
    platform :ios, '10.0'
    
    # 忽略引入库的所有警告
    inhibit_all_warnings!
    
    target 'demoCS' do
      
      pod 'AFNetworking'
      pod 'AFNetworking', '~> 3.0'
    
    end
    

    普遍

    # 下面两行是指明依赖库的来源地址
    #source 'https://github.com/CocoaPods/Specs.git'
    #source 'https://github.com/Artsy/Specs.git'
    
    # 平台,版本
    platform :ios, '9.0'
    
    # 忽略引入库的所有警告
    inhibit_all_warnings!
    
    # 针对MyApp target引入AFNetworking
    # 针对MyAppTests target引入OCMock,
    target 'MyApp' do 
        pod 'AFNetworking', '~> 3.0' 
        target 'MyAppTests' do
           inherit! :search_paths 
           pod 'OCMock', '~> 2.0.1' 
        end
    end
    # 这个是cocoapods的一些配置,官网并没有太详细的说明,一般采取默认就好了,也就是不写.
    
    

    依赖

     pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git' //默认master
     pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :branch => 'develop' 
     pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git',:tag => '0.7.0' 
     pod 'AFNetworking', :git => 'https://github.com/gowalla/AFNetworking.git', :commit => '082f6719af'
     pod 'AFNetworking', :path =>'/Users/XXXXX/XXXXX/XXXXX/AFNetworking' 
     pod 'JSONKit', :podspec => 'https://example.com/JSONKit.podspec'
    
    
    

    相关文章

      网友评论

          本文标题:Podfile文件书写

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