Bridging Header for Flurry.h not working with Pod
The problem wasn't Flurry Podspec. I was running an older cocoapods so updated it using
sudo gem install cocoapods
Flurry.h not found through bridging header when using cocoapods
Cocoapods 0.36 and later uses the use_frameworks! statement which means that bridging header is not required for importing Objective-C pods in Swift
What is a correct bridging header for Flurry?
When you are using latest CocoaPod
to install external dependencies to Xcode Project, you don't really need the bridging header to expose Objective-C
methods to Swift
. See below screenshots once to understand it clearly.
Creating and Installing Pods.
Importing Flurry SDK
in a Swift
class.
Hope this helped. Thanks.
Bridging header doesn't work with two frameworks (Flurry)
Okay I found the solution. I just made a mistake and @BC_Dilum was right by adding
#import "Flurry/Flurry.h"
and not just #import Flurry.h
How to reference header files in Bridging-Header.h after updating CocoaPods to 0.36.x and above?
In your Podfile
, you specified use_frameworks!
.
As a result, the Objective-C code you're including as a dependency (DBSphereTagCloud
) is packaged as a framework, instead of a static library. Please see CocoaPods 0.36 - Framework and Swift Support for more details.
As a consequence, you don't need a bridging header file. It's enough for you to add:
import DBSphereTagCloud
in all the Swift files that need that module.
Related Topics
Access Class Property from Instance
Variable with Getter/Setter Cannot Have Initial Value, on Overridden Stored Property
How to Find Realm File Location of a MAC App
Issue with Returning a Directory Enumerator from Nsfilemanager Using Enumeratoraturl in Swift
Crash Casting Wknsurlrequest As? Other Type
Difference Between @Propertydelegate and @Propertywrapper
How to Decode a Utf16 String into a Unicode Character
Swift Playground with Debugger Support
How to Split a String at The Last Occurence of a Sequence
When How to Start Submitting Apps to The iOS App Store Written Using The Swift Programming Language
Fbsdksharephoto Not Sharing Link Alongside Photo Using Swift
Uisearchcontroller Searchbar Misaligns While Active During Rotation
Realm: Predicate Returning Lazyfiltercollection - How to Convert to Results<T>
Set an Horizontal Scroll to My Barchart in Swift
Cell Is Duplicated Multiple Times When Posting to Firebase
Carthage Update Error: "Github API Request Failed: Bad Credentials"