As titled, what's the purpose of "--no-use-binaries" in carthage command line? if missing this, what could happen and what's the benefit to have this?
The bootstrap command downloads and builds the exact versions of your dependencies specified in Cartfile. resolved. carthage update would update the project to use the newest compatible versions of each dependency, which may not be desirable.
If you've modified your Cartfile, or you want to update to the newest versions of each framework (subject to the requirements you've specified), simply run the carthage update command again. If you only want to update one, or specific, dependencies, pass them as a space-separated list to the update command.
The Cartfile. resolved file ensures that any given commit of a Carthage project can be bootstrapped in exactly the same way, every time. For this reason, you are strongly recommended to commit this file to your repository.
Carthage is a decentralized dependency manager for Swift and Objective-C Cocoa projects. It is open-source and built with Swift by the open-source community.
Sometimes the prebuilt frameworks are corrupted in the dependencies’ project, so you need to build them locally.
Also, those prebuilt frameworks don’t support step-by-step debugging, so unless you build them locally, you won’t be able to use this feature with your dependencies.
Using --no-use-binaries
compiles the projects locally, using your compiler.
Executing the update
command might occasionally produce an error when the Swift language updates to a newer version while the dependency is built for an older version of Swift (even if it’s still compatible). You can solve such scenarios by using this flag.
One disadvantage is that it takes longer to compile the project with the --no-use-binaries
flag. Without the flag, you’re requesting the prebuilt framework if it’s available. For more information you can see this Carthage issue on GitHub.
Hope I cleared up your doubts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With