Failed to import bridging header facebook sdk - ios

Hello guys I got this error when attempting to compile my file in swift:
I have added the frameworks: FSBDKCoreKit, FBSDKLoginKit, FBSDKShareKit, and Bolt to my root folder and not my xcodeprojectworkspace. But I'm receiving these errors. Please I need some assistance.
Also i added the frameworks in DealsApp-Bridging-Header:

I had the same problem some days ago. Couldn't find why but when I tried to install the sdk with cocoa pods instead of just dragging the files it just worked.
Give this a try: https://edbinx.com/apple/ios/use-facebook-fbsdk-swift-cocoapods-ios-9-13369.html

From Errors, I think you need to add
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
in your file "DealsApp-Bridging-Header.h"

Related

How to import framework into XCode project?

I get No such module 'BRLMPrinterKit' error.
I take a reference from official document https://support.brother.com/g/s/es/htmldoc/mobilesdk/guide/getting-started/getting-started-ios.html to import framework.
Here is my step:
drag BRLMPrinterKit.framework and BRLMPrinterKitW.framework into my framework folder
Check they are in Link Binary With Libraries (remove and drag again)
Check Framework Search Paths (I'm not sure it correct or not)
Check Header Search Paths (I'm not sure it correct or not)
Finally I clean and build get No such module 'BRLMPrinterKit' error.
I have no idea how to fix my import problem, any help would be appreciated. Thanks.
That's not a Swift module, so first, you need to create a bridging header, in which you import <BRLMPrinterKit/BRLMPrinterKit.h>, then you can use the BRLM classes in your Swift files.
Try using CocoaPods to install the framework, it's more convenient and faster.
Your framework supports installation using cocoapods
https://cocoapods.org/
https://github.com/jonathantribouharet/BRLMPrinterKit
using CocoaPods to install the 'BRLMPrinterKit' framework.
add the bridge file.(Targets > Build Settings > Swift Compiler - General > Objective-C Bridgeing Header)
the bridge file.h
#ifndef PtouchPrinterKit_Bridging_Header_h
#define PtouchPrinterKit_Bridging_Header_h
#import <BRLMPrinterKit/BRPtouchBluetoothManager.h>
#import <BRLMPrinterKit/BRPtouchDeviceInfo.h>
#import <BRLMPrinterKit/BRPtouchNetworkManager.h>
#import <BRLMPrinterKit/BRPtouchPrinter.h>
#import <BRLMPrinterKit/BRPtouchPrinterData.h>
#import <BRLMPrinterKit/BRPtouchPrinterKit.h>
#import <BRLMPrinterKit/BRPtouchPrintInfo.h>
#endif
then you can use the framework

iOS project won't build when certain pod files are included in files that are included in bridging header

I found a bug that I'm kind of stumped by. Wondering if anyone else experienced this.
I have this MBProgressHud pod that I include in my ViewController.h. Presumably I'll use it in ViewController.m somewhere.
I also want to include ViewController.h in my bridging header so that I can write a Swift extension.
However, when I build and run, I get an error:
'MBProgressHUD.h' file not found
I've recreated the error in this project: https://github.com/zackshapiro/PodTest
Any help would be appreciated
Replace
#import "MBProgressHUD.h"
with
#import <MBProgressHUD/MBProgressHUD.h>
And all will be compiled. MBProgressHUD.h is a file from module MBProgressHUD therefore you can't include it with ""

GoogleMaps not found

I am trying to use google maps in my ios app my Xcode ver is 7.2 and swift ver is 2.1.1. I simply add GoogleMaps in my pod file everything is fine i added frameworks and libs which are required to support Googlemaps all fine, i am following this tut and according to this i have to add a bridging header file to include
#import <GoogleMaps/GoogleMaps.h>. My app already have one bridging header file because i am using facebook login as well so i put the import statement in the same file and in 'others linker flag -ObjC' is already there so after few required settings in storyboard i compiled my proj but i am getting this error "GoogleMaps/GoogleMaps.h" not found. I have searched for it and tried almost all the suggested ways on Stackoverflow but hard luck nothing worked yet.I will be really grateful if anyone could suggest me what i am doing wrong here.
Make sure your pod install went smoothly.
According to the tutorial,
You should see output similar to the following:
Downloading dependencies
Installing GoogleMaps (1.10.4)
Using SwiftyJSON (2.3.0)
Generating Pods project
Integrating client project
try
#import "GoogleMaps.h"
in your bridging header file

Amazon SDK Pod won't compile?

I'm attempting to getting the Amazon iOS SDK integrated into my application and using the cocoapod to install it.
However, it won't compile, I'm getting an error inside of AmazonS3Client.h that says
'AWKRuntime/AmazonWebServiceClient.h' file not found
but it is clearly there in the Pod when I search for it.
Anyone else had this issue?
Note: This answer refers to a now deprecated version of the AWS SDK for iOS.
I ran into the same problem when migrating a project to CocoaPods. Without modifying any of the AWS header files, I was able to avoid by changing my header import lines from:
#import <AWSS3/AWSS3.h>
#import <AWSSNS/AWSSNS.h>
to:
#import <AmazonS3Client.h>
#import <AmazonSNSClient.h>
This works because all that AWSS3.h does is #define AWS_MULTI_FRAMEWORK and then #import "AmazonSNSClient.h", and AWS_MULTI_FRAMEWORK is responsible for the other header files expecting a different directory structure than what CocoaPods sets up.
To find out what file names you need to include, just look inside the AWS*.h file you were importing and then import the files named inside directly.
When using the cocoapod for AWS it has this in the separate framework headers:
#ifndef AWS_MULTI_FRAMEWORK
#define AWS_MULTI_FRAMEWORK
#endif
That makes it look to other frameworks instead of the relative path for the headers for shared frameworks.
If you comment those lines out, it will work.

AFNetworking HTTPClient.networkReachabilityStatusBlock not found?

I just downloaded the latest version of AFNetworking from github .
I drag the folder to my xCode iOS project, disable ARC for the AFNetworking files and compile . The compiler prompts an error, claiming that line 702 of AFHTTPClient.m has error:
HTTPClient.networkReachabilityStatusBlock = self.networkReachabilityStatusBlock;
Any advice? Did I miss something?
I found that Getting Start Guide of AFNetworking missed a critical step :
Add SystemConfiguration.framework to the project
Add the line #import <SystemConfiguration/SystemConfiguration.h> after the line #import <Foundation/Foundation.h> in Prefix.pch
Just to add to Shivan's point, I think you also need to add
1) Add MobileCoreServices/MobileCoreServices to your project
2) Add the line #import to your x.pch file
Otherwise AFNetworking will throw up warnings.

Resources