Commit 6d2604cc authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4321 from CocoaPods/seg-app-extension-only-api

[Installer] Also set APPLICATION_EXTENSION_API_ONLY when the user tar…
parents 669f7a5a e307ca15
......@@ -58,6 +58,12 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins)
[#4421](https://github.com/CocoaPods/CocoaPods/issues/4421)
* Set the `APPLICATION_EXTENSION_API_ONLY` build setting if integrating with a
tvOS extension target, or a target that has the setting set to `YES`.
[Samuel Giddins](https://github.com/segiddins)
[#3644](https://github.com/CocoaPods/CocoaPods/issues/3644)
[#4393](https://github.com/CocoaPods/CocoaPods/issues/4393)
## 0.39.0 (2015-10-09)
......
......@@ -641,7 +641,8 @@ module Pod
frameworks_group = pods_project.frameworks_group
aggregate_targets.each do |aggregate_target|
is_app_extension = !(aggregate_target.user_targets.map(&:symbol_type) &
[:app_extension, :watch_extension, :watch2_extension]).empty?
[:app_extension, :watch_extension, :watch2_extension, :tv_extension]).empty?
is_app_extension ||= aggregate_target.user_targets.any? { |ut| ut.common_resolved_build_setting('APPLICATION_EXTENSION_API_ONLY') == 'YES' }
aggregate_target.pod_targets.each do |pod_target|
configure_app_extension_api_only_for_target(aggregate_target) if is_app_extension
......
......@@ -629,6 +629,24 @@ module Pod
test_extension_target(:watch2_extension)
end
it 'configures APPLICATION_EXTENSION_API_ONLY for tvOS extension targets' do
test_extension_target(:tv_extension)
end
it 'configures APPLICATION_EXTENSION_API_ONLY for targets where the user target has it set' do
mock_user_target = mock('UserTarget', :symbol_type => :application)
mock_user_target.expects(:common_resolved_build_setting).with('APPLICATION_EXTENSION_API_ONLY').returns('YES')
@target.stubs(:user_targets).returns([mock_user_target])
build_settings = {}
mock_configuration = mock('BuildConfiguration', :build_settings => build_settings)
@mock_target.stubs(:build_configurations).returns([mock_configuration])
@installer.send(:set_target_dependencies)
build_settings.should == { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
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)
......
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