You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pod install with in a project with use_frameworks! (and dynamic linking), where one of the dependencies includes a vendored XCFramework containing a .a library where the library name does not match the XCFramework name.
(Specifically, I'm working with Swift-sodium, a Swift wrapper of the Sodium C library, which vendors Clibsodium.xcframework that contains libsodium.a libraries for various architectures.)
What did you expect to happen?
The pod target's xcconfig should have OTHER_LDFLAGS = $(inherited) -l"sodium"
What happened instead?
The XCFramework's name is used instead: OTHER_LDFLAGS = $(inherited) -l"Clibsodium"
... and the build fails.
However, if :linkage => :static is used, the app target's OTHER_LDFLAGS does contain the correct -l"sodium", and things work correctly.
I believe the issue is that define_build_settings_method :libraries uses the raw name
Report
What did you do?
pod install
with in a project withuse_frameworks!
(and dynamic linking), where one of the dependencies includes a vendored XCFramework containing a.a
library where the library name does not match the XCFramework name.(Specifically, I'm working with Swift-sodium, a Swift wrapper of the Sodium C library, which vendors
Clibsodium.xcframework
that containslibsodium.a
libraries for various architectures.)What did you expect to happen?
The pod target's xcconfig should have
OTHER_LDFLAGS = $(inherited) -l"sodium"
What happened instead?
The XCFramework's name is used instead:
OTHER_LDFLAGS = $(inherited) -l"Clibsodium"
... and the build fails.
However, if
:linkage => :static
is used, the app target'sOTHER_LDFLAGS
does contain the correct-l"sodium"
, and things work correctly.I believe the issue is that
define_build_settings_method :libraries
uses the raw namewhile
define_build_settings_method :static_libraries_to_import
actually inspects for the contained library's name:Assuming that's the case, and both these code blocks should be the same, I'll have a PR to fix this shortly.
CocoaPods Environment
Stack
Installation Source
Plugins
The text was updated successfully, but these errors were encountered: