带有外部库的 cocoaPods pod 文件

cocoaPods pod file with external library

我有这个 pod 文件:

# 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

没什么特别的。但是我想 link 启动应用程序,所以我发现这段代码可以与 pods 一起使用:

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

但是我怎样才能将它集成到 pod 文件中,我已经尝试删除 s 并将其放入我的 pod 文件中,但这不起作用?

在podfile上层平台添加source 'http://s3.startapp.com.s3.amazonaws.com/Resource/SDK_TEMP/IOS-InApp%20SDK-InApp-3.2.0.zip',target下添加pod 'StartApp'