I am trying to figure out how use CocoaPods to add a number of frameworks to the Embed Frameworks Build Phase in XCode. My project uses several vendored frameworks from a private pod repo. I can pod install and build successfully. The frameworks are not being added as Embedded Frameworks, so I will get a runtime error when the application runs. The only way I can fix this is to manually add the frameworks to the build phase manually.
Here is an example pod spec:
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
Is there a way to modify this so the framework will be added to the Embed Frameworks Build Phase?
I was able to solve this problem by using the the latest beta of CocoaPods.
The fix to the embedded framework problem is listed in this bug report.
Hopefully the beta will soon be released.