4.9 C
Canberra
Thursday, June 4, 2026

ios – Why does my dynamic XCFramework work with out its dependency, however the static XCFramework offers undefined symbols?


I am new to iOS linking/frameworks, so this can be a primary query.

I’ve:

DependencySDK.xcframework (static)

and

MySDK.xcframework

MySDK makes use of DependencySDK.

Case 1 – MySDK is Dynamic

I construct MySDK as:

Mach-O Kind = Dynamic Library

Then I create MySDK.xcframework and add solely MySDK to my app.

App

└── MySDK.xcframework

The app builds and runs efficiently.

Case 2 – MySDK is Static

I construct MySDK as:

Mach-O Kind = Static Library

Then I create MySDK.xcframework and once more add solely MySDK to my app.

App

└── MySDK.xcframework

This time the app fails to construct with:

Undefined symbols

for symbols coming from DependencySDK.

What I am confused about

I believed static libraries had been supposed to incorporate their dependencies greater than dynamic libraries.

So I anticipated:

* Dynamic MySDK → ought to want DependencySDK individually

* Static MySDK → ought to work by itself

However I am seeing the alternative.

My questions

1. Why does the dynamic model work despite the fact that I do not add DependencySDK to the app?

2. Is Xcode in some way together with DependencySDK contained in the dynamic framework?

3. Why does the static model fail with undefined symbols?

4. If I wish to distribute just one XCFramework, what’s the really useful method?

Any clarification of what’s occurring behind the scenes could be actually useful. I am nonetheless studying how static/dynamic linking works in iOS. Thanks!

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles