Reputation: 2824
I have 2 frameworks, which are both Swift Statically-linked frameworks.
This means that my Mach-O Type
is Static Library
for both of the targets.
One of the targets (A
) depends on another target (B
).
I successfully archive A
, and then I successfully archive B
, linking against A
. Embedding is enabled, however I don't seem to find any mentions of A in the exported build artifacts.
However, when I import archived and exported B
in another target, it gives me a compilation error:
ld: warning: Could not find or use auto-linked framework 'A'
Undefined symbols for architecture x86_64:
"A.someMethodInsideA() -> Swift.Int", referenced from:
B.someMethodInsideB() -> Swift.Int in B(B.o)
ld: symbol(s) not found for architecture x86_64
You see, I set the A's Mach-O Type to Static Library
, so I expect A's binaries to be completely embedded into B with static linkage, but this doesn't happen for some reason.
How can I embed a static framework inside a static framework?
Upvotes: 0
Views: 283
Reputation: 234
I'd try setting the following flags in xcode:
-Xlinker -undefined -Xlinker dynamic_lookup
Regards.
Upvotes: 1