Using cocoapods-0.37.2 Here's my Podfile
:
platform :ios, "8.0"
use_frameworks!
pod "GoogleMaps"
pod 'FontAwesomeKit'
pod 'PureLayout'
I'm trying to import PureLayout
in my .swift file like this:
import PureLayout
class ViewController: UIViewController {
...
But I get error:
No such module 'PureLayout'
Why??? I thought that Cocoapods creates -Bridging-Header.h
by itself when using use_frameworks!
?
I did not use the
use_framework
option but I used PureLayout in Swift with CocoaPods without issues.pod 'PureLayout'
.<Your Module>-Bridging-Header.h
file myself as instructed by Apple here. I added a line#import "PureLayout.h"
. I've also updated my target build settings to enter the bridging header file name as per instructions.import PureLayout
. It would give me an error as you mentioned. The auto layout calls would just work, since it's defined through bridging header.One side point - the test target would fail to compile if you add bridging header file to its build settings. So make sure the bridging header update is done on target not project level.
I guess the current README in PureLayout github page is a bit outdated, since it currently asks you to do
import PureLayout
in the .swift file. I added a comment in this README enhancement issue too.