Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced static vs dynamic libraries and frameworks on iOS (and macOS) #23

Open
bpoplauschi opened this issue Oct 29, 2021 · 2 comments

Comments

@bpoplauschi
Copy link
Owner

No description provided.

@vijaytholpadi
Copy link

Nice article @bpoplauschi !

I have been having similar thoughts as I go through modularising the application at my current workplace.

One thing from your article on When to use dynamic linking -> Multiple static modules depending on the same module does not feel fully convincing to me, as dividing the app into modules seems to be a developer side decision and the duplicate symbol symbols issue that happens is because of the way we have setup the app into modules with transitive dependencies.

However making the module dynamic to solve this warning seems to also have end-user impact in terms of increasing the launch times. I would still agree that incase we shared the code between the application and app-extension target, then a dynamic library would still make sense.

Thoughts?

@bpoplauschi
Copy link
Owner Author

Thank you for your feedback @vijaytholpadi !

One thing from your article on When to use dynamic linking -> Multiple static modules depending on the same module does not feel fully convincing to me, as dividing the app into modules seems to be a developer side decision and the duplicate symbol symbols issue that happens is because of the way we have setup the app into modules with transitive dependencies.

I agree this is a developer-side decision. But having the duplicate symbols issue may lead to other issues than just warnings (like crashes in some cases). I mentioned that dynamic linking is a valid option to multiple transitive dependencies to the same module.

However making the module dynamic to solve this warning seems to also have end-user impact in terms of increasing the launch times.

Using dynamic frameworks does have an impact on app launch, but this was improved a lot by Apple over time. So having a handful of dynamic frameworks doesn't have a big effect.
Nevertheless, I recommend you always measure (with Instruments) and understand which setup works best for your apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants