Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you create a Cartfile? Or easily add frameworks to your app?

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.

like image 512
trixmasta Avatar asked Jul 31 '15 06:07

trixmasta


People also ask

What is a Cartfile?

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.


1 Answers

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
like image 105
Jakub Vano Avatar answered Oct 23 '22 16:10

Jakub Vano