Skip to content

Commit a57a235

Browse files
authored
Add Carthage section to README
1 parent b2f4a0a commit a57a235

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ UIViewController which allows to detect smile in real time.
1414
$ gem install cocoapods
1515
```
1616

17-
## Podfile
17+
### Podfile
1818

1919
To integrate SmileViewController into your Xcode project using CocoaPods, specify it in your `Podfile`:
2020

@@ -33,6 +33,33 @@ Then, run the following command:
3333
$ pod install
3434
```
3535

36+
## Installation with Carthage
37+
To install [Carthage](https://github.com/Carthage/Carthage) run following command:
38+
```bash
39+
$ brew install carthage
40+
```
41+
42+
### Cartfile
43+
1. To integrate SmileViewController into your Xcode project using Carthage, specify it in your `Cartfile`:
44+
```ruby
45+
github "MaximAlien/SmileViewController" ~> 1.0.8
46+
```
47+
48+
2. Then, run the following command:
49+
```bash
50+
$ carthage update
51+
```
52+
53+
3. On your application targets’ *General* settings tab, in the *Linked Frameworks and Libraries* section, drag and drop SmileViewCtrlr.framework you want to use from the Carthage/Build folder on disk.
54+
55+
4. 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:
56+
```bash
57+
/usr/local/bin/carthage copy-frameworks
58+
```
59+
60+
5. Add path to the framework you want to use under *Input Files*: $(SRCROOT)/Carthage/Build/iOS/SmileViewCtrlr.framework
61+
6. Add path to the copied frameworks to the *Output Files*, e.g.: $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/SmileViewCtrlr.framework
62+
3663
## Usage
3764

3865
To use this view controller simply load it up from AppDelegate:
@@ -41,6 +68,8 @@ To use this view controller simply load it up from AppDelegate:
4168
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
4269

4370
SmileViewController *smileViewController = [SmileViewController new];
71+
// or (in case when using Carthage)
72+
SmileViewController *smileViewController = [[SmileViewController alloc] initWithNibName:@"SmileViewController" bundle:[NSBundle bundleForClass:SmileViewController.class]];
4473
self.window.rootViewController = smileViewController;
4574
[self.window makeKeyAndVisible];
4675

0 commit comments

Comments
 (0)