Skip to content

Commit

Permalink
Fix potential Gatekeeper problems by removing the `LD_RUNPATH_SEARCH_…
Browse files Browse the repository at this point in the history
…PATHS` referencing outside the App bundle for macOS targets. (CocoaPods#10954)
  • Loading branch information
GetToSet committed May 17, 2023
1 parent 5773558 commit 6322f83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`

##### Bug Fixes

* None.
* Fix potential Gatekeeper problems by removing the `LD_RUNPATH_SEARCH_PATHS` referencing outside the App bundle for
macOS targets.
[Ethan Wong](https://github.com/GetToSet)
[#11837](https://github.com/CocoaPods/CocoaPods/pull/11773)
[#10954](https://github.com/CocoaPods/CocoaPods/issues/10954)


## 1.12.1 (2023-04-18)
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/target/build_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def _ld_runpath_search_paths(requires_host_target: false, test_bundle: false, us
else
"'@loader_path/Frameworks'"
end
paths << '${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}' if uses_swift
paths << '${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}' if uses_swift && test_bundle
else
paths << "'@executable_path/Frameworks'"
paths << "'@loader_path/Frameworks'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def pod_target(spec, target_definition)
mock_user_target = mock('usertarget')
mock_user_target.stubs(:symbol_type).returns(:application)
@target.stubs(:user_targets).returns([mock_user_target])
@generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == %q[$(inherited) /usr/lib/swift '@executable_path/../Frameworks' '@loader_path/Frameworks' "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"]
@generator.generate.to_hash['LD_RUNPATH_SEARCH_PATHS'].should == "$(inherited) /usr/lib/swift '@executable_path/../Frameworks' '@loader_path/Frameworks'"
end

it 'uses the target definition swift version' do
Expand Down

0 comments on commit 6322f83

Please sign in to comment.