Just starting to learn Xcode and for this lesson I'm supposed to add the Social Framework in Xcode as to add Twitter composer features.
So I'm following the steps in the book:
Code:
SLComposeViewController *composer = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[composer setInitialText:self.tweetTextView.text];
[self presentViewController:composer animated:YES completion:nil];
It then shows 3 error signs saying : 'Use of undeclared Identifier: SLComposeViewController'
. And the project won't build.
Have I done something wrong?
You simply need to add:
#import <Social/Social.h>
to the top of your .m file where you're using Social framework API's.
I also did a chat.stackoverflow.com presentation on the Social framework and that transcript is here, and a sample project can be found on github.