Minimum deployment target of Charts is iOS8.0.
use_frameworks!for iOS 8+;
- Specify a target for each pod.
eg. if before you had your Podfile written like this:
pod 'Alamofire', '~> 3.1.4' pod 'SwiftyJSON', '~> 2.3.2'
just change it to
target "TargetName" do pod 'Alamofire', '~> 3.1.4' pod 'SwiftyJSON', '~> 2.3.2' end
Bridging between Objective-C and Swift.
- In fact, after installing
Chartswith Cocoapods and building
.xcworkspace, it automatically generates
Charts-Swift.hfile, which you can use directly in you
#import <Charts/Charts-Swift.h>.(Here my project is OC-based.)
- Check some build settings and parameters:
- Product Module Name: yourProject
- Defines Module: YES
- Embedded Content Contains Swift: YES
- Install Objective-C Compatibility Header: YES
- Objective-C Bridging Header: $(SRCROOT)/Sources/SwiftBridging.h
However, I failed to use OC framework in Swift-based project with Cocoapods and still couldn’t tell why. I’ll add it later if I make it.