"FBDialogs" not available in my app - ios

I am trying to integrate Facebook sdk in my iOS app. I am using the Facebook reference docs and according to it, I am sharing using FBDialogs but the editor returns error "use of undeclared identifier FBDialogs". I have imported the Facebook sdk, other necessary frameworks, and other obvious things but still not getting it. Any help is appreciated.

Not only do you need to add the Framework to the project, but you need to also ensure that the compiler can see the header files.
Add this to the top of the file where you are getting the compiler error.
#import "FBDialogs.h"

You shouldn't have to explicitly import FBDialogs. But you absolutely do need to:
#import <FacebookSDK/FacebookSDK.h>
in the .h files of any and all of classes you've created to manage / access your FB connection.

You should check out the SDK version used and see in this change log if it is available to the version you are using.
Hope it helps!

Related

How to integrate BRLMPrinterKit with iOS for a Flutter App?

I have been trying to integrate the Brother's SDK for printing with the iOS part of my Flutter project.
The following are the steps that I followed :
I added the BRLMPrinterKit.framework & BRLMPrinterKitW.framework to the Framework folder in my Xcode project.
Added $(PROJECT_DIR)/Frameworks to the Framework Search Paths and Header Search Paths.
I then added #import <BRLMPrinterKit/BRLMPrinterKit.h> to the Runner-Bridging-Header.h.
After performing the above steps, when I try to import BRLMPrinterKit in the appdelegate file, I am getting a "No such module BRLMPrinterKit" error.
Any Help will be appreciated.
You don't need to add "import BRLMPrinterKit" in your Swift file. So, just delete this line and you should be OK.
Adding #import <BRLMPrinterKit/BRLMPrinterKit.h> as you did to the Bridging Header is sufficient to be able to use SDK APIs in a Swift file.
A few other tips:
Do NOT include both frameworks in your project.
Use BRLMPrinterKitW.framework if you are ONLY supporting WIFI
Use BRLMPrinterKit.framework if you are supporting Bluetooth (and also WIFI)
You must "embed and sign" the framework via the General tab for the target. Otherwise your app will crash as soon as you run it.
You may need to add #import <BRLMPrinterKit/BRPtouchPrinterKit.h> to your Bridging Header too, if you need to access any APIs from the older v3 SDK (BRPtouchPrinterKit) that do not have equivalent APIs yet in the v4 SDK (BRLMPrinterKit).

No such module FBSDKCoreKit error

I am trying to add the Facebook SDK to my iOS 9.0 Swift app in Xcode. I did the install according to the FB-dev instructions. However, when I add the header to my AppDelegate.m file import FBSDKCoreKit I keep getting a message saying "No such module 'FBSDKCoreKit'" error .
Based on what I read elsewhere
I have already cleaned the build and re-installed Xcode and updated
my OS X
I have double checked the plist and the framework files FB lists in
the instructions, but nothing has seemed missing.
I have set the "Allow Non-modular Includes in Framework modules"
setting to YES in Build settings.
Nothing seems to work. I do not know where to go from here and have done hours of research trying to find the solution.
When you are importing the frameworks, Make sure you have selected "Copy if needed" . Version after Xcode 6.3 seem to be giving issues if this part is NOT ticked.
I solved this by deleting the Framework and adding it again by right click on the project->Add files..., then choose the framework and SELECT the option to Copy files if needed. It's not what Facebook recommends, but it worked!
I'm using v4.6 of FBSDK and Xcode 7 beta 6.
Hope it helps you and everyone else who's facing the same problem :)
With CocoaPods, swift 2.1, and iOS 9, I tried adding it to the bridge header and it works fine, for example:
#ifndef MY_Bridge_Header_h
#define MY_Bridge_Header_h
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
// ... other imports
#endif /* MY_Bridge_Header_h */
I had errors following alongside the AppCoda tutorial which is not fully up to date. I recommend following Facebooks own instructions. The issue for me was that I had to add the frameworks to my project and then add sdk search path. After that I could import without an error.

Facebook App Invite "FBSDKAppInviteContent" not recognized

I am currently trying to implement Facebook's new "App Invites for iOS". I'm using Objective C and I have added the following frameworks:
Bolts.framework
FBSDKCoreKit.framework
FacebookSDK.framework
I have also imported <FBSDKCoreKit/FBSDKCoreKit.h> and <FacebookSDK/FacebookSDK.h>. It's like the code isn't recognized, why? I get the following errors:
What do I need to do so that I can use FBSDKAppInviteContent. Also, is there a special URL or PHP/JS equivalent?
I think you also need to import FBSDKShareKit/FBSDKShareKit.h
Don't forget to link FBSDKShareKit.framework to your library.

Do I need my AppDelegate.swift to be in Objective C for PayPal SDK

I'm creating an iOS application in swift. The SDK for PayPal, appears to only be Objective-C, can I use the SDK in Swift or do I need to change my AppDelegate Files into the old .h and .m files?
Cheers,
Emerson
You can import PayPal's SDK files into the bridging header to enable usage in swift files.
For anyone who had gone through the process as I did, It was much easier to start a new Obj-c project.
I created the new project and imported all my files, with a few minutes set up I was able to incorporate PayPal and Parse SDKs, fully functioning.
Thank you everyone for your answers.

undeclared identifier 'FBAppCall' 'FBDialogs'

I'm recently trying to update the Facebook SDK on our application. I had no worries following the steps fom the Upgrade guide by Facebook.
I was able to compile without issues.
However, when I quit XCode, reopen my project and try to recompile I get an error about 'FBAppCall' (undeclared identifier). All others classes from the SDK are working except this one and 'FBDialogs'.
I am able to solve those errors by deleting the Facebook framework and adding it again. But I must do it every time I quit XCode.
I've tried to check or uncheck "Copy items into destination group's folder (if needed)" with no luck. Also tried older versions of Facebook SDK but it didn't changed anything.
Also tried to clear all the Facebook SDK references from the project.pbxproj before readding the frameworks, in vain.
Thank you for helping me with this annoying issue..
Note: Already did all the configuration Facebook SDK is requiring in the Getting Started page.
Finally found the solution.
Since I was upgrading from an older Facebook SDK, I had to delete the older FacebookSDK.framework file from $(PROJECT_DIR)/Frameworks and then re-add it in XCode.
did you add
#import <FacebookSDK/FacebookSDK.h>
in your AppDelegate.m file?

Resources