I downloaded GCM sdk through cocoapods successfully and everything is fine. But Swift don't recognize GCM library imports
this image in Xcode:
and this Podfile :
how to fix this problem. thanks.
I downloaded GCM sdk through cocoapods successfully and everything is fine. But Swift don't recognize GCM library imports
this image in Xcode:
and this Podfile :
how to fix this problem. thanks.
You don't need a bridging header, in your pod file put this use_frameworks!
. Then you can import the framework into your swift file.
Updated: I recommend Stefan Scoarta's answer to add use_frameworks!
to your podfile if you're targeting iOS 8 or higher and can use frameworks.
Original answer: Make sure that you've configured a bridging header as described in Apple's Using Swift with Cocoa and Objective-C document.
To import a set of Objective-C files in the same app target as your Swift code, you rely on an Objective-C bridging header to expose those files to Swift…Alternatively, you can create a bridging header yourself by choosing File > New > File > (iOS or OS X) > Source > Header File.
There are some useful answers to a related question here: How to integrate Cocoapods with a Swift project?