Commit 9ea34717 authored by Danielle Tomlinson's avatar Danielle Tomlinson Committed by GitHub

Merge pull request #5953 from benasher44/basher_messages_app_build_phase

Added messages application to the list of targets that should have embed frameworks build phases
parents 051b2761 91d7b57a
...@@ -22,6 +22,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -22,6 +22,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Ben Asher](https://github.com/benasher44) [Ben Asher](https://github.com/benasher44)
[#5860](https://github.com/CocoaPods/CocoaPods/issues/5860) [#5860](https://github.com/CocoaPods/CocoaPods/issues/5860)
* Ensure messages apps have an embed frameworks build phase
[Ben Asher](https://github.com/benasher44)
[#5860](https://github.com/CocoaPods/CocoaPods/issues/5860)
## 1.1.0.rc.2 (2016-09-13) ## 1.1.0.rc.2 (2016-09-13)
##### Enhancements ##### Enhancements
......
...@@ -25,7 +25,7 @@ module Pod ...@@ -25,7 +25,7 @@ module Pod
# For messages extensions, this only applies if it's embedded in a messages # For messages extensions, this only applies if it's embedded in a messages
# application. # application.
# #
EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :ui_test_bundle, :watch2_extension, :messages_extension].freeze EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :ui_test_bundle, :watch2_extension, :messages_application].freeze
# @return [String] the name of the embed frameworks phase # @return [String] the name of the embed frameworks phase
# #
......
...@@ -137,6 +137,15 @@ module Pod ...@@ -137,6 +137,15 @@ module Pod
phase.nil?.should == false phase.nil?.should == false
end end
it 'adds an embed frameworks build phase if the target to integrate is a messages application' do
@pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:messages_application)
@target_integrator.integrate!
phase = target.shell_script_build_phases.find { |bp| bp.name == @embed_framework_phase_name }
phase.nil?.should == false
end
it 'does not add an embed frameworks build phase if the target to integrate is a framework' do it 'does not add an embed frameworks build phase if the target to integrate is a framework' do
@pod_bundle.stubs(:requires_frameworks? => true) @pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first target = @target_integrator.send(:native_targets).first
...@@ -173,7 +182,7 @@ module Pod ...@@ -173,7 +182,7 @@ module Pod
phase.nil?.should == false phase.nil?.should == false
end end
it 'does not add an embed frameworks build phase if the target to integrate is a messages extension for an iOS app' do it 'does not add an embed frameworks build phase if the target to integrate is a messages extension' do
@pod_bundle.stubs(:requires_frameworks? => true) @pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:messages_extension) target.stubs(:symbol_type).returns(:messages_extension)
...@@ -182,16 +191,6 @@ module Pod ...@@ -182,16 +191,6 @@ module Pod
phase.nil?.should == true phase.nil?.should == true
end end
it 'adds an embed frameworks build phase if the target to integrate is a messages extension for a messages application' do
@pod_bundle.stubs(:requires_frameworks? => true)
@pod_bundle.stubs(:requires_host_target? => false) # Messages extensions for messages applications do not require a host target
target = @target_integrator.send(:native_targets).first
target.stubs(:symbol_type).returns(:messages_extension)
@target_integrator.integrate!
phase = target.shell_script_build_phases.find { |bp| bp.name == @embed_framework_phase_name }
phase.nil?.should == false
end
it 'adds an embed frameworks build phase if the target to integrate is a UI Test bundle' do it 'adds an embed frameworks build phase if the target to integrate is a UI Test bundle' do
@pod_bundle.stubs(:requires_frameworks? => true) @pod_bundle.stubs(:requires_frameworks? => true)
target = @target_integrator.send(:native_targets).first target = @target_integrator.send(:native_targets).first
......
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