ACAccountStore Error 5

不羁的心 提交于 2019-12-01 03:17:41

This question is a little dated, but I'm struggling in the same area. Here's one thing that should help: I did find documentation on the error codes:

typedef enum ACErrorCode {
   ACErrorUnknown = 1,
   ACErrorAccountMissingRequiredProperty,
   ACErrorAccountAuthenticationFailed,
   ACErrorAccountTypeInvalid,
   ACErrorAccountAlreadyExists,
   ACErrorAccountNotFound,
   ACErrorPermissionDenied,
   ACErrorAccessInfoInvalid
} ACErrorCode;

I found this in the documentation under the Accounts.framework link.

Interpreting this gives error=5 being "Account already exists" and error=6 being "Account not found." I'm hopeful this makes the errors a little less "nondescript."

Ameet Dhas

This error occurs because you didn't set the Facebook account in the settings. The settings are available in iOS 6. Set that account and then try again.

Also give proper alert message on error.

While I didn't find any documentation to support (or contradict) my findings, here is what seems be changed (since iOS 5):

  • In iOS 5, the user is prompted with access request even when there are no Twitter accounts setup. In iOS 6 it seems the request is declined with error code 6 when there are no accounts setup.

  • In iOS 5 the user is prompted again (and again) with access request if the user had previously disabled access to said account from Settings > Twitter. Now, in iOS 6, it seems access request is silently declined (with no error, i.e. nil error) if user has removed access to app from Settings

If anyone else finds a better answer, do comment, please.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!