jjzjj

AccessToAccountsWithType

全部标签

ios - ACAccountStore 请求AccessToAccountsWithType :options:completion always showing permissions prompt

如标题所示,我对ACAccountStorerequestAccessToAccountsWithType:options:completion方法有疑问。我希望此方法仅在第一次为我的应用程序调用时提示用户许可,但它每次都会显示。有没有什么方法可以检查用户是否已授予权限,这样我就不必请求了?还是有其他魔法可以阻止这种行为?我觉得这很奇怪,因为在同一应用程序的早期版本中,行为符合我的预期——它只在第一次调用时提示权限。 最佳答案 回答我自己的问题。希望有一天有人会发现这很有用。问题的原因似乎是我的应用可用的权限(尤其是基本读取权限)与

ios - ACAccountStore 请求AccessToAccountsWithType :options:completion: returning nil error and granted as NO

我正在尝试使用ACAccountStore进行登录测试,但效果不是很好。我正在尝试像这样访问该帐户:ACAccountStore*store=[ACAccountStorenew];ACAccountType*accountType=[storeaccountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];NSDictionary*options=@{ACFacebookAppIdKey:@"12345678987654",ACFacebookPermissionsKey:@[@"email"]};[stor