CocoaPods and Swift 3.0
What you're asking is not possible. Xcode builds your Cocoapods dependencies as well as your project. You cannot mix Swift 2.x and Swift 3 code in the same project or use Cocoapods with Swift 3 that are written in Swift 2.x.
How to update a cocoapod built in Swift 3 to Swift 4
Go to your Pods
project, then:
- Select the target you want to update
- Go into its build settings
- Select
Swift 3.2
as the language version
How to update pods to Swift 3.0
First of all you need to update your CocaPod if you haven't done it.
Open terminal and run:
sudo gem install cocoapods --pre
Then add the update part to your pod:
pod 'SwiftDate', :git => 'https://github.com/malcommac/SwiftDate.git', :branch => 'feature/swift-3.0'
Then in terminal run pod update
Module compiled with Swift 3.0 cannot be imported in Swift 2.3
You'll need to change the Use Legacy Swift Language Version
to NO
- this makes sure your project will use swift 3.
If you want to package your project as a POD (for cocoapods) you'll need to add a file named .swift-version (containing 1 single line, "3.0").
This will tell cocoapods to use the swift 3 compiler.
Everything should work after this changes.
Related Topics
Calling Uiviewcontroller Method from App Delegate
Proportional Height (Or Width) in Swiftui
Swift Failed with Exit Code 1 While Compiling in Xcode - Possibly Related to Bridging-Headers
What Do Horizontalaccuracy and Verticalaccuracy of a Cllocation Refer To
Can't Install Watchkit App on Apple Watch
Non Power of Two Textures in iOS
How to Use Crashlytics with iOS/Os X Today View Extensions
Url Scheme "Open Settings" iOS
Getting Button Action:Uicollectionview Cell
Swift "Bridging-Header.H" File Not Allowing Me to Instantiate Objective-C Classes in .Swift Files
Creating Thumbnail for Video in iOS
Avplayer Stops Playing Video After Buffering
Detect Hash Tags #, Mention Tags @, in iOS Like in Twitter App
Can an iOS App Switch to Safari Without Opening a Page
Xcode 7 How to Refresh Provisioning Profiles
Xcode6 Error: "No Matching Provisioning Profiles Found for Application"