Skip to content

Commit

Permalink
Updated documentation with Carthage steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Nguyen committed Nov 5, 2017
1 parent 14bd261 commit e38a07a
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Expand Up @@ -12,13 +12,22 @@ APAddressBook is a wrapper on [AddressBook.framework](https://developer.apple.co
* Get photo of contact

#### Objective-c
**Installation**
**Installation via Cocoapods**

Add `APAddressBook` pod to [Podfile](http://guides.cocoapods.org/syntax/podfile.html)
```ruby
pod 'APAddressBook'
```

**Installation via Carthage**

Add to your Cartfile
```ruby
github 'Alterplay/APAddressBook'
```

Run `carthage update` to fetch and build the framework. Add `APAddressBook.framework` to your project's 'Linked Frameworks and Libraries'. Ensure that `$(SRCROOT)/Carthage/Build/iOS/APAddressBook.framework` is part of the carthage copy-framework build phase.

**Warning for iOS 10.0 and after**

To protect user privacy, an iOS app linked on or after iOS 10.0, and which accesses the user’s contacts, must statically declare the intent to do so. Include the `NSContactsUsageDescription` key in your app’s `Info.plist` file and provide a purpose string for this key. If your app attempts to access the user’s contacts without a corresponding purpose string, your app exits.
Expand Down Expand Up @@ -158,7 +167,7 @@ switch([APAddressBook access])
```

#### Swift
**Installation**
**Installation via Cocoapods**
```ruby
pod 'APAddressBook/Swift'
```
Expand All @@ -167,6 +176,15 @@ Import `APAddressBook-Bridging.h` to application's objective-c bridging file.
#import <APAddressBook/APAddressBook-Bridging.h>
```

**Installation via Carthage**

Add to your Cartfile
```ruby
github 'Alterplay/APAddressBook'
```

Run `carthage update` to fetch and build the framework. Add `APAddressBook.framework` to your project's 'Linked Frameworks and Libraries'. Ensure that `$(SRCROOT)/Carthage/Build/iOS/APAddressBook.framework` is part of the carthage copy-framework build phase.

**Example**

See example application in `Example/Swift` directory.
Expand Down

0 comments on commit e38a07a

Please sign in to comment.