Lnpopupcontroller: Swift Package Manager - Dynamic vs Static Library

Created on 5 Dec 2020  路  5Comments  路  Source: LeoNatan/LNPopupController

Description

This is simply a question. When installing this library with SPM, I am presented with choosing between dynamic vs static (please see pic below). The documentation doesn't state which one is best.

Which option should we choose here?

spm

Steps to Reproduce

n/a

Device, OS and Xcode Versions

  • Xcode 12.2
  • iOS 13 and iOS 14
question

All 5 comments

Hello,

I always prefer dynamic, but there is a limitation in SPM, where a dependency of a dependency cannot be dynamic. So if you are adding to an app, use dynamic; if you are adding to a package, use static.

Cheers

For example, I had to use static here:
https://github.com/LeoNatan/LNPopupUI

Else, Xcode would fail linking with the UI package. SPM is still a mess.

@LeoNatan Hello, and thank you for answering so quickly!

Just a quick follow up, will dynamic libraries get denied by Apple's App Store Review? Please see this Stack Overflow answer: https://stackoverflow.com/questions/15331056/library-static-dynamic-or-framework-project-inside-another-project

Also, the answer says that iOS 8 and above could use dynamic libraries but just want to make sure.

Exactly, since iOS 8, there are no issues.

Got it, thank you! Appreciate you taking the time to answer

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RajChanchal picture RajChanchal  路  3Comments

funkenstrahlen picture funkenstrahlen  路  3Comments

johnswifttt picture johnswifttt  路  5Comments

amosavian picture amosavian  路  7Comments

dancarasco picture dancarasco  路  6Comments