2016-07-13 21 views
1

我有這個莢文件:的CocoaPods莢文件與外部庫

# Uncomment this line to define a global platform for your project 
platform :ios, ‘9.0’ 

inhibit_all_warnings! 
use_frameworks! 

target 'testthing' do 
pod 'Alamofire', '~> 3.1.2' 

end 

沒什麼特別的。但是,我想鏈接的startApp,所以我發現這個代碼與莢使用它:

Pod::Spec.new do |s| 

    s.name   = "StartApp" 
    s.version  = "3.2.0" 
    s.summary  = "StartApp SDK for iOS" 

    s.description = <<-DESC 
        StartApp SDK for iOS. 
        DESC 

    s.homepage  = "https://www.startapp.com" 

    s.license  = { :type => 'Apache License, Version 2.0', :text => <<-LICENSE 
    Licensed under the Apache License, Version 2.0 (the "License"); 
    you may not use this file except in compliance with the License. 
    You may obtain a copy of the License at 
    http://www.apache.org/licenses/LICENSE-2.0 
    Unless required by applicable law or agreed to in writing, software 
    distributed under the License is distributed on an "AS IS" BASIS, 
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
    See the License for the specific language governing permissions and 
    limitations under the License. 
    LICENSE 
    } 

    s.author    = { "StartApp" => "https://www.startapp.com" } 

    s.platform  = :ios 
    # s.platform  = :ios, "5.0" 

    s.source  = { :http => "http://s3.startapp.com.s3.amazonaws.com/Resource/SDK_TEMP/IOS-InApp%20SDK-InApp-3.2.0.zip" } 
    s.vendored_frameworks = "StartApp.framework" 
    s.resource = "StartApp.bundle" 

    s.frameworks = "AdSupport", "StoreKit", "CoreTelephony", "SystemConfiguration", "CoreGraphics", "QuartzCore", "CoreMedia", "AVFoundation" 
    s.library = "z" 

end 

但我怎麼能融入到這個莢文件,我試圖取下S,並將它放在我的莢文件但那不起作用?

+0

那你嘗試把你的POD文件中添加pod 'StartApp'?把'pod'StartApp'放在AFNetworking下面 – dan

回答

1

添加source 'http://s3.startapp.com.s3.amazonaws.com/Resource/SDK_TEMP/IOS-InApp%20SDK-InApp-3.2.0.zip'在podfile上層平臺,然後在目標

+0

如果你有問題,請隨時問:) –