perrpell
perrpell

Reputation: 89

iOS ACAccountStore Code=7, Cannot renew credentials. Unknown client:

I'm working with the new iOS 6 Facebook API and have generally had a "challenging" time with the ACAccountStore methods. I retrieve an ACAccount with:

[accountStore requestAccessToAccountsWithType:self.facebookAccountType
                                          options:options completion:^(BOOL granted,     NSError *error) {

I then need to periodically renew the ACAccount token with:

[accountStore requestAccessToAccountsWithType:self.facebookAccountType
                                      options:options completion:^(BOOL granted, NSError     *error) {

This works whenever I start from a clean iOS simulator environment using "Reset Contents and Settings.."

But after a while I get the following.

Error Domain=com.apple.accounts Code=7 "Cannot renew credentials. Unknown client: FBTest     (org.my.app.FBTest)"

I'm executing the call from the FBTest app.

There are a lot of posts on how to get iOS 6 FB up and running and I'm past that point. The tricky part with the framework is keeping it running over time.

Upvotes: 4

Views: 865

Answers (1)

Nils Munch
Nils Munch

Reputation: 8846

I would recommend the following :

  • Ensure that you are using the very latest accounts framework.
  • Give the application its real bundle ID, not "org.my.app.FBTest".
  • Make sure the keystore settings is on in the entitlements file.
  • Test this on a adhoc distribution build.

Upvotes: 1

Related Questions