I'm trying to learn about frameworks and how to use them in my Swift app. I'm a beginner at Swift, I understand OOP concepts but am completely new to handling libraries and frameworks.
I want to use frameworks like SwiftyJSON, Alamofire, and plenty more but want to use them in the simplest way possible. I found out that Carthage is the easiest way to update these into your project. However I haven't found a single user-friendly guide or tutorial on using this! I read the documentation here (https://github.com/Carthage/Carthage/blob/master/README.md) but it was very confusing for me. I am completely stuck at creating a Cartfile.
How do you create a Cartfile? Where should it be located?
After that I understand the commands to put in it, but I'm stuck at creating it and understanding the fundementals.
A Cartfile is a simple text file that describes your project's dependencies to Carthage, so it can determine what to install. Each line in a Cartfile states where to fetch a dependency, the dependency's name, and optionally, which version to use. A Cartfile is the equivalent of a CocoaPods Podfile.
Cartfile is simple plain-text file, that should be located in the same folder as your *.xcodeproj
file.
One way of creating it is via terminal:
$ cd <Path_to_the_project_folder>
$ touch Cartfile
$ open Cartfile -a Xcode
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