NOTE: We might get the "duplicate symbols" error when building the project.
This issue happens when having the -ObjC flag in the linking process.
A workaround to fix it is to specify the -ld64 option (mentioned here).
This can be done by using the :linker_flags nested inside in :linking option.
spm_pkg ...
:linking => {
:use_default_xcode_linking => true, # <-- HERE
:linker_flags => ["-ld64"], # <-- HERE
}
This PR introduces the option to fall back to the default Xcode linking, ie. adding products to the "Link Binary With Libraries" section.
Use this option by:
NOTE: We might get the "duplicate symbols" error when building the project. This issue happens when having the
-ObjC
flag in the linking process. A workaround to fix it is to specify the-ld64
option (mentioned here). This can be done by using the:linker_flags
nested inside in:linking
option.