Commit 534a2bf5 authored by Paul Zabelin's avatar Paul Zabelin

Use xcode default PRODUCT_MODULE_NAME for generated test targets

parent 18fd90e1
...@@ -60,6 +60,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -60,6 +60,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
Use xcode default `PRODUCT_MODULE_NAME` for generated test targets
[Paul Zabelin](https://github.com/paulz)
[#7506](https://github.com/CocoaPods/CocoaPods/issues/7506)
* Prevent `xcassets` compilation from stomping over the apps `xcassets` * Prevent `xcassets` compilation from stomping over the apps `xcassets`
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7003](https://github.com/CocoaPods/CocoaPods/issues/7003) [#7003](https://github.com/CocoaPods/CocoaPods/issues/7003)
......
...@@ -277,7 +277,10 @@ module Pod ...@@ -277,7 +277,10 @@ module Pod
# requires frameworks. For tests we always use the test target name as the product name # requires frameworks. For tests we always use the test target name as the product name
# irrelevant to whether we use frameworks or not. # irrelevant to whether we use frameworks or not.
configuration.build_settings['PRODUCT_NAME'] = name configuration.build_settings['PRODUCT_NAME'] = name
configuration.build_settings['PRODUCT_MODULE_NAME'] = name # Use xcode default product module name, which is $(PRODUCT_NAME:c99extidentifier)
# this gives us always valid name that is distinct from the parent spec module name
# which allow tests to use either import or @testable import to access the parent framework
configuration.build_settings.delete('PRODUCT_MODULE_NAME')
# We must codesign iOS XCTest bundles that contain binary frameworks to allow them to be launchable in the simulator # We must codesign iOS XCTest bundles that contain binary frameworks to allow them to be launchable in the simulator
unless target.platform == :osx unless target.platform == :osx
configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'YES' configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'YES'
......
...@@ -199,7 +199,7 @@ module Pod ...@@ -199,7 +199,7 @@ module Pod
native_test_target.product_reference.name.should == 'CoconutLib-Unit-Tests' native_test_target.product_reference.name.should == 'CoconutLib-Unit-Tests'
native_test_target.build_configurations.each do |bc| native_test_target.build_configurations.each do |bc|
bc.build_settings['PRODUCT_NAME'].should == 'CoconutLib-Unit-Tests' bc.build_settings['PRODUCT_NAME'].should == 'CoconutLib-Unit-Tests'
bc.build_settings['PRODUCT_MODULE_NAME'].should == 'CoconutLib-Unit-Tests' bc.build_settings['PRODUCT_MODULE_NAME'].should.be.nil
bc.build_settings['CODE_SIGNING_REQUIRED'].should == 'YES' bc.build_settings['CODE_SIGNING_REQUIRED'].should == 'YES'
bc.build_settings['CODE_SIGNING_ALLOWED'].should == 'YES' bc.build_settings['CODE_SIGNING_ALLOWED'].should == 'YES'
bc.build_settings['CODE_SIGN_IDENTITY'].should == 'iPhone Developer' bc.build_settings['CODE_SIGN_IDENTITY'].should == 'iPhone Developer'
...@@ -217,7 +217,7 @@ module Pod ...@@ -217,7 +217,7 @@ module Pod
native_test_target.product_reference.name.should == 'CoconutLib-Unit-Tests' native_test_target.product_reference.name.should == 'CoconutLib-Unit-Tests'
native_test_target.build_configurations.each do |bc| native_test_target.build_configurations.each do |bc|
bc.build_settings['PRODUCT_NAME'].should == 'CoconutLib-Unit-Tests' bc.build_settings['PRODUCT_NAME'].should == 'CoconutLib-Unit-Tests'
bc.build_settings['PRODUCT_MODULE_NAME'].should == 'CoconutLib-Unit-Tests' bc.build_settings['PRODUCT_MODULE_NAME'].should.be.nil
bc.build_settings['CODE_SIGNING_REQUIRED'].should.be.nil bc.build_settings['CODE_SIGNING_REQUIRED'].should.be.nil
bc.build_settings['CODE_SIGNING_ALLOWED'].should.be.nil bc.build_settings['CODE_SIGNING_ALLOWED'].should.be.nil
bc.build_settings['CODE_SIGN_IDENTITY'].should == '' bc.build_settings['CODE_SIGN_IDENTITY'].should == ''
......
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