5

I'm trying to use the ios Account Framework. I already added the Accounts.Framework in my build phases, but I still get the error

Use of undeclared identifier "ACAccountStore"

Anyone know why? Social.Framework works fine for me.

Max Zheng
  • 61
  • 1
  • 4

2 Answers2

9

Did you make sure to include the header?

Objective-C

#import <Accounts/Accounts.h>

Swift

import Accounts
Brandon Buck
  • 7,177
  • 2
  • 30
  • 51
  • I didn't. Now it works. Somehow I didn't import the but my code with SLComposeViewController worked. Thanks! – Max Zheng Apr 09 '13 at 20:38
3

Maybe you forgot to import it?

#import <Accounts/Accounts.h>

EDIT: Now I know where it's declared, so updated my answer. :)

Erik B
  • 40,889
  • 25
  • 119
  • 135