Created
January 10, 2018 10:42
-
-
Save vikrant-Ios/61109617967246de3a0e163997b4fea2 to your computer and use it in GitHub Desktop.
Carthage integrate in your project in simple way
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Carthage integrate in your project | |
1) #Download the latest release of Carthage from https://github.com/Carthage/Carthage/releases. Select the most recent build, then under Downloads select Carthage.pkg. | |
2) #Double-click Carthage.pkg to run the installer. Click Continue, select a location to install to, click Continue again, and finally click Install. | |
#if Carthage.pkg not installed | |
#Note: When you may see a message stating “Carthage.pkg can’t be opened because it is from an unidentified developer.” Open the finder Right click on Carthage.pkg --- > openwith ----> Installer(default ) | |
Installation process start select a location to install, Click to continue | |
And you done,To check that Carthage installed correctly, open Terminal and run the following command: | |
$ carthage version | |
#Creating Your First Cartfile | |
#Navigate to the root directory of your project in Terminal e.g: | |
$ cd ~/Path/To/Starter/Project | |
#Create an empty Cartfile with the touch command: | |
$ touch Cartfile | |
And then open the Carthage file in the Xcode for editing with command: | |
$ open -a Xcode Cartfile | |
Add the following lines to the Cartfile and save it: | |
github "Result" // dependancy framwork | |
Close your Cartfile in Xcode and head back to Terminal. Run the following command: | |
$ carthage update --platform iOS | |
Open up this directory now by running: | |
$ open Carthage | |
#On your Project targets “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. | |
#On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell: | |
/usr/local/bin/carthage copy-frameworks | |
#Add the paths to the frameworks you want to use under “Input Files”, e.g.: | |
$(SRCROOT)/Carthage/Build/iOS/Result.framework | |
#Add the paths to the copied frameworks to the “Output Files”, e.g.: | |
$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/Result.framework |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment