https://github.com/ikesyo/reactiveaccountstore
ReactiveCocoa support for Accounts.framework.
https://github.com/ikesyo/reactiveaccountstore
Last synced: over 1 year ago
JSON representation
ReactiveCocoa support for Accounts.framework.
- Host: GitHub
- URL: https://github.com/ikesyo/reactiveaccountstore
- Owner: ikesyo
- License: mit
- Created: 2014-04-28T06:45:42.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-05-05T03:07:38.000Z (about 12 years ago)
- Last Synced: 2025-04-06T06:32:03.344Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 258 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReactiveAccountStore 
[](https://travis-ci.org/ikesyo/ReactiveAccountStore)
[](https://cocoapod-badges.herokuapp.com/v/ReactiveAccountStore/badge.png)
[](https://cocoapod-badges.herokuapp.com/p/ReactiveAccountStore/badge.png)
[](https://github.com/igrigorik/ga-beacon)
[**ReactiveCocoa**](https://github.com/ReactiveCocoa/ReactiveCocoa) support for `Accounts.framework`.
## Usage
Requests access and saves an account:
```objc
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
ACAccountType *type = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
[[[accountStore
rac_requestAccessToAccountsWithType:type options:nil]
concat:[RACSignal defer:^{
ACAccount *account = [accountStore accountsWithAccountType:type][0];
account.accountDescription = @"description";
return [accountStore rac_saveAccount:account];
}]] subscribeError:^(NSError *error) {
// Failed to save or access was not granted.
} completed:^{
// Succeeded to save.
}];
```
## Requirements
- iOS 6.0+
- OS X 10.8+
## Installation
Let's use [CocoaPods](http://cocoapods.org/).
Add the following line to your Podfile:
```ruby
pod 'ReactiveAccountStore'
```
Then, run the following command in the project direcotry:
```sh
$ pod install
```
## Contributors
Syo Ikeda, [suicaicoca@gmail.com](mailto://suicaicoca@gmail.com)
## License
ReactiveAccountStore is licensed under the MIT license.