-
Notifications
You must be signed in to change notification settings - Fork 341
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
Allow static library usage from Cocoapods #74
Comments
Hi @bridger, thanks for the update. If we add |
Honestly, I'm not sure... I guess the dynamic framework is nice if you don't want to repeat the binary size in each extension, like an Apple Watch binary that also uses Keychain? For keychain-swift I'd imagine that binary size concern would be tiny. If people still needed to, they could make their own dynamic framework target which depends on keychain-swift then make their app and watch extension depend on that framework. |
That's good to know, thanks. I will do some Googling to see if there are any side effects that can affect our current users. In addition, I wonder if there is a way do switch to static framework on the client side, in Podfile instead of doing it for everyone in the podspec of the library? |
For the referece, I've asked about the side effects of I can see two potential problems:
|
Thanks for digging into this! Sorry it is more complicated than I thought it would be. It would be awesome if CocoaPods allowed the app to choose whether it is imported statically or dynamically, but that option doesn't exist. I think Carthage allows the user of the library to choose. Let's see if the CocoaPods peeps will comment on what to do. |
Version 1.4.0 of Cocoapods allows a pod to be used as a static library, even in a Swift app. It requires the library's podspec to contain
s.static_framework = true
.I believe this will help apps launch faster. Here's a blog post that explains why too many dynamic frameworks slows down launch: https://blog.automatic.com/how-we-cut-our-ios-apps-launch-time-in-half-with-this-one-cool-trick-7aca2011e2ea
The text was updated successfully, but these errors were encountered: