我试图找出如何使用CocoaPods在XCode中为Embed Frameworks Build Phase添加大量框架。我的项目使用私有pod repo中的几个销售框架。我可以成功安装和构建pod。框架没有被添加为嵌入式框架,因此我将在应用程序运行时收到运行时错误。我可以解决这个问题的唯一方法是手动将框架手动添加到构建阶段。
以下是pod规范示例:
Pod::Spec.new do |s|
s.name = "ExampleiOS"
s.version = "1.0.1"
s.summary = "ExampleiOS"
s.homepage = "http://www.example.com"
s.author = { "Example.com" => "" }
s.platform = :ios
s.source = { :git => "ssh://git.example.com:1234/pkg/ExampleiOSFramework", :tag => "1.0.1" }
s.source_files = "ExampleiOS/ExampleiOS.framework/Headers/*.h"
s.vendored_frameworks = "ExampleiOS/ExampleiOS.framework"
s.ios.deployment_target = "8.0"
s.requires_arc = true
s.xcconfig = { 'LIBRARY_SEARCH_PATHS' => '"$(PODS_ROOT)/ExampleiOS"',
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/Headers/ExampleiOS"' }
s.license = {
:type => "Copyright",
:text => <<-LICENSE
Copyright 2015 Example.com. All rights reserved.
LICENSE
}
end
有没有办法对此进行修改,以便将框架添加到Embed Frameworks Build Phase?