Cannot find protocol declaration for 'FBLoginV

2019-08-07 03:43发布

For some reason I'm getting the error Cannot find protocol declaration for 'FBLoginViewDelegate' when trying to include the FBLoginViewDelegate protocol to my ViewController interface.

I've searched for other similar questions but most of them seem to be related to circular inclusions...I don't think that's the case for me.

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController <UITextFieldDelegate, FBLoginViewDelegate>

//Properties    
@property (weak, nonatomic) IBOutlet UITextField *txtPassword;
@property (weak, nonatomic) IBOutlet UITextField *txtEmail;
@property (weak, nonatomic) IBOutlet UILabel *lblResult;

- (IBAction)loginClicked:(id)sender;
- (IBAction)backgroundTap:(id)sender;

@end

I'm quite new to iOS development and any help would be greatly appreciated!

1条回答
冷血范
2楼-- · 2019-08-07 03:53

just remove and add the add the FacbookSDK and

make it

 #import<FacbookSDK/FaceBookSDK.h> in your VC.h file or .pch file (the compiler takes the Facebook delegate in all VC's)

finally clean and run your project, it surely works

查看更多
登录 后发表回答