Commit e504e0c8 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7103 from dnkoutso/fix_macos

Do not set a `CODE_SIGN_IDENTITY` for macOS app hosts or xctest bundles
parents bd9e7f40 c8999d00
...@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7104](https://github.com/CocoaPods/CocoaPods/pull/7104) [#7104](https://github.com/CocoaPods/CocoaPods/pull/7104)
* Do not set a `CODE_SIGN_IDENTITY` for macOS app hosts or xctest bundles
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7103](https://github.com/CocoaPods/CocoaPods/pull/7103)
* Fix framework and resources paths caching * Fix framework and resources paths caching
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7068](https://github.com/CocoaPods/CocoaPods/pull/7068) [#7068](https://github.com/CocoaPods/CocoaPods/pull/7068)
......
...@@ -200,6 +200,7 @@ module Pod ...@@ -200,6 +200,7 @@ module Pod
configuration.build_settings.merge!(custom_build_settings) configuration.build_settings.merge!(custom_build_settings)
configuration.build_settings['PRODUCT_NAME'] = name configuration.build_settings['PRODUCT_NAME'] = name
configuration.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}' configuration.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = 'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
configuration.build_settings['CODE_SIGN_IDENTITY'] = '' if target.platform == :osx
end end
Pod::Generator::AppTargetHelper.add_app_host_main_file(project, app_host_target, platform_name, name) Pod::Generator::AppTargetHelper.add_app_host_main_file(project, app_host_target, platform_name, name)
app_host_info_plist_path = project.path.dirname.+("#{name}/Info.plist") app_host_info_plist_path = project.path.dirname.+("#{name}/Info.plist")
...@@ -248,6 +249,8 @@ module Pod ...@@ -248,6 +249,8 @@ module Pod
configuration.build_settings['PRODUCT_NAME'] = name configuration.build_settings['PRODUCT_NAME'] = 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
configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'YES' unless target.platform == :osx configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'YES' unless target.platform == :osx
# For macOS we do not code sign the XCTest bundle because we do not code sign the frameworks either.
configuration.build_settings['CODE_SIGN_IDENTITY'] = '' if target.platform == :osx
end end
# Test native targets also need frameworks and resources to be copied over to their xctest bundle. # Test native targets also need frameworks and resources to be copied over to their xctest bundle.
......
...@@ -200,6 +200,7 @@ module Pod ...@@ -200,6 +200,7 @@ module Pod
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['CODE_SIGNING_REQUIRED'].should == 'YES' bc.build_settings['CODE_SIGNING_REQUIRED'].should == 'YES'
bc.build_settings['CODE_SIGN_IDENTITY'].should == 'iPhone Developer'
end end
native_test_target.symbol_type.should == :unit_test_bundle native_test_target.symbol_type.should == :unit_test_bundle
@coconut_pod_target.test_native_targets.count.should == 1 @coconut_pod_target.test_native_targets.count.should == 1
...@@ -215,6 +216,7 @@ module Pod ...@@ -215,6 +216,7 @@ module Pod
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['CODE_SIGNING_REQUIRED'].should.be.nil bc.build_settings['CODE_SIGNING_REQUIRED'].should.be.nil
bc.build_settings['CODE_SIGN_IDENTITY'].should == ''
end end
native_test_target.symbol_type.should == :unit_test_bundle native_test_target.symbol_type.should == :unit_test_bundle
@coconut_pod_target2.test_native_targets.count.should == 1 @coconut_pod_target2.test_native_targets.count.should == 1
......
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