Reputation: 1877
Hope you can help me with this errors.
I have this code on AppDelegate.h
#import <UIKit/UIKit.h> #import "FBConnect.h" @class ViewController; @interface AppDelegate : UIResponder <UIApplicationDelegate,FBSessionDelegate> { Facebook *facebook; } @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) ViewController *viewController; @property (nonatomic, retain) Facebook *facebook; @end
I have this code on AppDelegate.m
#import "AppDelegate.h" #import "ViewController.h" @implementation AppDelegate @synthesize window = _window; @synthesize viewController = _viewController; @synthesize facebook; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; facebook = [[Facebook alloc] initWithAppId:@"HERE_APP_ID" andDelegate:self]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; if ([defaults objectForKey:@"FBAccessTokenKey"] && [defaults objectForKey:@"FBExpirationDateKey"]) { facebook.accessToken = [defaults objectForKey:@"FBAccessTokenKey"]; facebook.expirationDate = [defaults objectForKey:@"FBExpirationDateKey"]; } if (![facebook isSessionValid]) { [facebook authorize:nil]; } return YES; } - (BOOL) application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [facebook handleOpenURL:url]; } -(void) fbDidLogin { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"]; [defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"]; [defaults synchronize]; }
My .plist file configured with my fb"HERE_MY_APP_ID"
- MyProject
- src
- AppDelegate.h
- AppDelegate.m
- MainStoryboard.storyboard
- ViewController.h
- ViewController.m
- Supporting Files
- Frameworks
- Products
The thing is that I don't have any errors, but when I Run I got a lot of them. Almost 81, and a warning. Hope you can help me. Thanks.
Upvotes: 0
Views: 334
Reputation: 12460
From what I can see your project is using ARC and the facebook SDK is not. It's telling you the method -release
isn't available so you need to look into disabling ARC for the Facebook SDK.
Upvotes: 1