TestsTested | ✓ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Syo Ikeda.
ReactiveCocoa support for Accounts.framework
.
Requests access and saves an account:
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.
}];
Let's use CocoaPods.
Add the following line to your Podfile:
pod 'ReactiveAccountStore'
Then, run the following command in the project direcotry:
$ pod install
Syo Ikeda, [email protected]
ReactiveAccountStore is licensed under the MIT license.