Skip to content

Commit 163ce9d

Browse files
author
César Pinto Castillo
committed
Adds Usage examples to README.md
1 parent d6311a1 commit 163ce9d

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ The best way to install CloudKitCurrentUser to your project is to use Carthage.
3434

3535
Take a look at the [documentation](https://github.com/Carthage/Carthage#installing-carthage) for more information on how you set up Carthage.
3636

37+
## Usage
38+
39+
To get the status of the current user you just call the `currentStatus` function, like this:
40+
41+
```
42+
CurrentUser.sharedInstance.currentStatus { status, error in
43+
// Act accordingly here
44+
}
45+
```
46+
47+
And to get the current user identifier, you write the following:
48+
49+
```
50+
CurrentUser.sharedInstance.userIdentifier { identifier, error in
51+
// Act accordingly
52+
}
53+
```
54+
3755
## Get in touch
3856

3957
Feel free to get in touch if you have any questions. I'm available on Twitter as [@JagCesar](http://twitter.com/JagCesar).

0 commit comments

Comments
 (0)