Commit 0505ce41 authored by Boris Bügling's avatar Boris Bügling

[Installer] Fix for empty app-extension targets

Installation of app-extension targets which had no dependencies
configured in the Podfile would cause an exception before.
parent 6f0164ab
...@@ -13,6 +13,13 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -13,6 +13,13 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Kyle Fuller](https://github.com/kylef) [Kyle Fuller](https://github.com/kylef)
[#2996](https://github.com/CocoaPods/CocoaPods/issues/2996) [#2996](https://github.com/CocoaPods/CocoaPods/issues/2996)
##### Bug Fixes
* Fixed installation for app-extension targets which had no dependencies
configured in the Podfile.
[Boris Bügling](https://github.com/neonichu)
[#3102](https://github.com/CocoaPods/CocoaPods/issues/3102)
## 0.36.0.beta.2 ## 0.36.0.beta.2
......
...@@ -468,9 +468,10 @@ module Pod ...@@ -468,9 +468,10 @@ module Pod
frameworks_group = pods_project.frameworks_group frameworks_group = pods_project.frameworks_group
aggregate_targets.each do |aggregate_target| aggregate_targets.each do |aggregate_target|
is_app_extension = aggregate_target.user_targets.map(&:symbol_type).include?(:app_extension) is_app_extension = aggregate_target.user_targets.map(&:symbol_type).include?(:app_extension)
configure_app_extension_api_only_for_target(aggregate_target) if is_app_extension
aggregate_target.pod_targets.each do |pod_target| aggregate_target.pod_targets.each do |pod_target|
configure_app_extension_api_only_for_target(aggregate_target) if is_app_extension
unless pod_target.should_build? unless pod_target.should_build?
pod_target.resource_bundle_targets.each do |resource_bundle_target| pod_target.resource_bundle_targets.each do |resource_bundle_target|
aggregate_target.native_target.add_dependency(resource_bundle_target) aggregate_target.native_target.add_dependency(resource_bundle_target)
......
...@@ -456,6 +456,18 @@ module Pod ...@@ -456,6 +456,18 @@ module Pod
build_settings.should == { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' } build_settings.should == { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
end end
it 'does not try to set APPLICATION_EXTENSION_API_ONLY if there are no pod targets' do
lambda do
mock_user_target = mock('UserTarget', :symbol_type => :app_extension)
@target.stubs(:user_targets).returns([mock_user_target])
@target.stubs(:native_target).returns(nil)
@target.stubs(:pod_targets).returns([])
@installer.send(:set_target_dependencies)
end.should.not.raise NoMethodError
end
xit 'sets the pod targets as dependencies of the aggregate target' do xit 'sets the pod targets as dependencies of the aggregate target' do
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment