FBSDKCoreKit and the include of non-modular header inside framework module errors - xcode8

None of the following threads (and many similar) helped me:
Include of non-modular header inside framework module
XCode6: Receiving error "Include of non-modular header inside framework module"
While trying to install the Facebook SDK in my iOS project via cocoapods, I ran into that error:
Inside the FBSDKCoreKit.h header:
Include of non-modular header inside framework module 'FBSDKCoreKit.FBSDKCoreKit'
As I said, I tried the solutions proposed in the answers above without any success.
It's important to mention that this use to work fine on Xcode 7.

Turn on allowing modular headers

Upgrading to the latest version of CocoaPods (1.5.3), the latest Facebook SDK, removing my Pods folder, and doing a fresh pod install fixed this issue for me.

Just deleted the Swift Package Manager Facebook library and run a pod update

Related

Could not build Objective-C module 'ChameleonFramework'

I am trying to include the ChameleonFramework in my project but it shows this message:
Could not build Objective-C module 'ChameleonFramework'
I install the framework using cocoapods and solve like 49 errors in the code because I'm using Swift 5 and Xcode 12.2.
Also, I delete the cache for the project, uninstall the pods and install them from the console, but still not working.

Alamofire is not working

I'm trying to install Alamofire onto my app, and I created a test app just in case, and no matter how many times I try and do it, it fails because there are like 250 errors all in the Alamofire section:
I've no idea what to do, I am stuck. I am still relatively new to coding, so I am not sure what to do here, but I was also wondering if there is a better thing to do rather then using Alamofire, because I have tried over 20 different apps to try and download Alamofire and they all have the same problem, as is seen above.
This could be caused by different swift versions vs different alamofire versions. For Swift 3 you need AlamoFire 4.3..
Also, try building your project with alamofire imported.
If that doesn't work and you're using CocoaPods then navigate to your app folder via terminal (cd /path/to/app) then do pod reinstall - make sure you have a podfile.

xCode 7.1: Could not build Objective-C module 'GoogleMaps'

I am using the GoogleMaps iOS SDK in my app and added it with cocoapods. However, after updating xCode from 7.0 to 7.1 I'm suddenly getting the following error: Could not build Objective-C module 'GoogleMaps'
In addition xCode also gives me an error in the GoogleMaps.h file in the GoogleMaps.framework:
Include of non-modular header inside framework module 'GoogleMaps'
I already deleted my DerivedData folder, updated cocoapods, reinstalled the GoogleMaps iOS SDK and cleaned and build the framework's scheme and my app's scheme. But nothing helped so far.
Answered in this similar question: xCode 7 error: include of non-modular header inside framework module with Google Maps
...but essentially you'll need to create an Objective-C bridging header file whereas you may not have needed one with Xcode 7.0. The why still eludes me.
you should open the .xcworkspace not .xcodeproj
once you added cocoa pods your project folder will contain the .xcworkspace file

Importing VLCKit (after c59cb1b) in a Swift based project

So I get the latest VLCKit to compile and I see in the xcode project it has it's Defines Module set to Yes in the project Build Settings, and it has the Product Module Name set to VLCKit.
I run make VLCKit to build the framework, everything builds and I get my VLCKit.framework file.
I embed that framework into my Swift based app.
If I use the bridging header, it complains that it can't find the VLCKit/VLCKit.h
from the swift side import VLCKit is also an error.
Anyone get this to work?
Well I managed to fix the issue by just creating a new project VLCKit won't play in my swift bridged project, which is another issue entirely. It will play in a purely obj-c project though.

Facebook sdk framework not found ios7, xcode5

I am new to Facebook SDK with iOS. I want to send invitation to friends on Facebook for using my app for this I am using Facebook (developer.facebook.com)sdk api I have registered my app installed sdk and imported framework. After importing got error as,
ld: warning: directory not found for option '-
F/Users/vijaywebsolutions/Documents/FacebookSDK'
ld: framework not found FacebookSDKkk
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Why don't you try CocoaPods for your projects its the dependency manager for Objective-C projects.
Refer CocoaPods
Simple Setup
Open Terminal and type sudo gem install cocoapods
Once installed you need to create a simple Pod file in your project directory and add the dependency to that file example.
Go to your project root directory and create Pod File by typing in terminal touch Podfile
Once created add the following line to the podfile.
platform :ios
pod 'Facebook-iOS-SDK', '~> 3.11.0'
Save the file and then in the terminal(where pod file exist) run pod install
Now it will install the requested dependencies and will create a Workspace for your project, you don't need to take any effort to configure it.
Its the best way to manage your dependencies. Give it a try you won't regret.
First you have to include facebook sdk in you project, steps as follows :
click on your project folder in xcode.
go to general tab and find Linked framework and libraries.
in that click on + sign and provide path to FacebookSDK.framework
These steps will facebook sdk in your project.
Then you have to import it in any of .m file where you want to use is it. like following line :
#import <FacebookSDK/FacebookSDK.h>
I also ran into similar error when integrating FacebookSDK into my app. I have added the framework in the Link Binary with Libraries, however, error persisted. One important thing to note when app is built, is it should be build against source Facebook iOS SDK and NOT binary SDK. I got latest source from here Facebook iOS SDK, downloaded Bolts-iOS and XCTOOL and then ran build_framework.sh Once completed, copied FacebookSDK.framework to my app and everything worked perfect.