Can't use FBSDK - ios

I'm writing login via Facebook in Swift app. I downloaded FacebookSDK, linked libs and created bridge header and added it to Objective-C bridging headers. Imported libraries in it:
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <FBSDKShareKit/FBSDKShareKit.h>
I tried to use classes, but have errors.
In AppDelegate.swift:
FBLoginView.self
Error: "use of unresolved identifier 'FBLoginView'"
Help me plz(

Try doing:
"import FBSDKCoreKit"
"import FBSDKLoginKit"
"import FBSDKShareKit"
at the top of your AppDelegate.swift
I hope that helps

Here is an example project using Facebook Login

Related

IOS error when I use Facebook SDK

I have added FacebookSDK.framework into my project,
#import <FacebookSDK/FacebookSDK.h>
but I get this error:
Use of undeclared identifier 'FBAppCall'
I am working about function LoginFB, please help me.
Please check all below points -
Select Project and goto Build phase -> Link binary with Libraries and select FacebookSDK.framework
Goto your viewcontroller and import - #import and #import
Please delete existing added FacebookSDK.framework before doing the above step.
please use latest Facebook sdk.
https://github.com/facebook/facebook-ios-sdk
it will work fine with me.

Google Admob integration error

i use the latest version of SDK for iphone integration but it give me this error.
Remove the AdMob Framework from your project, clean your project, and import the AdMob Framework again.
and Download the Framework here enter link description here
#import <GoogleMobileAds/GADBannerView.h>
#import <GoogleMobileAds/GADRequest.h>
As it's now a Framework. You have to include it like this : #import GoogleMobileAds;

Google AdMob error in iOS 7

I've integrated AdMob in my iOS project but it gives me the following error.
module 'GoogleMobileAds' not found
I have already imported the AdMob SDK into my project and added the following import.
#import GoogleMobileAds;
In the Build Settings of you project set the Define Modules to YES. Then, remove the AdMob Framework from your project, clean your project, and import the AdMob Framework again.
Change the import calls:
#import GoogleMobileAds
to this
#import <GoogleMobileAds/GoogleMobileAds.h>

PFLogInViewController issue

I am trying to compile an iOS app that has been on the appStore for a while, in other words an app already running.
At this line of code:
#interface CustomLogInViewController : PFLogInViewController
I get an error saying:
Cannot find interface declaration for PFLogInViewController
I have recently downloaded the last version (parse-library-1.6.2) of the Parse SDK.
Could that be the cause?
I have checked the Parse.h (and other .h files) file contents and indeed it does not contain PFLogInViewController. It seems that older versions were different.
In an older SDK I can see under
Parse.framework/Versions/A/Headers
a file called Parse.h containing a line:
#import <Parse/PFLogInViewController.h>
Does anyone see what I am missing here?
Here is the solution I found.
Replacing:
#import <Parse/Parse.h>
by:
#import <Parse/Parse.h>
#import <ParseUI/ParseUI.h>
and the problem is gone.

Use of unresolved identifier PFFacebookUtils

I've done all is mentioned here (https://www.parse.com/docs/ios_guide#fbusers/iOS) for implement in iOS the Facebook Login.
The problem is that i have an compile error "Use of unresolved identifier PFFacebookUtils"
near che line
PFFacebookUtils.initializeFacebook()
in AppDelegate. I've correctly imported the Parse and Facebook Framework into my project.
Are there some bug knowed in Xcode 6 Beta?
Parse docs doesn't mention this yet: After downloading the Parse iOS SDK, You should include the ParseFacebookUtils.framework into your project, then import it in each file you want to use it, like you did for the Parse.framework itself:
#import <Parse/Parse.h>// This use to be enough to use Facebook utilities
#import <ParseFacebookUtils/PFFacebookUtils.h>// But now we should import this framework as well to use Facebook utilitis
Parse team has separated the Facebook related classes from Parse API, hence a ParseFacebookUtils.framework
You may need to
import ParseFacebookUtils
in your AppDelegate
If you want to use PFFacebookUtils or/and PFLogInViewController with swift, you have to do this:
For not V4 version:
#import <ParseFacebookUtils/PFFacebookUtils.h>in bridging header and then import ParseFacebookUtils in swift file. And call PFFacebookUtils.initializeFacebook() somewhere, of course best place for this is application didFinishLaunchingWithOptions.
For V4 version:
#import <ParseFacebookUtilsV4/PFFacebookUtils.h> in bridging header and import ParseFacebookUtilsV4 in swift file. And call PFFacebookUtils.initializeFacebookWithApplicationLaunchOptions(launchOptions) in application didFinishLaunchingWithOptions.
Of course you should have set your bridging header correctly and import frameworks.
Resolved! #import in bridging header
After the update to Parse/FacebookUtils, to import you do #import <Parse/PFFacebookUtils.h>

Resources