Use Swift 2.2 in Xcode 8?
It is not possible to use Swift2.2 in XCode8, and it is also not possible to use Swift2.3 or Swift3 in XCode3.
The best solution i found is to create a single project file that will compile for both iOS 9 (Xcode 7) and iOS 10 (Xcode 8), and that will support Swift2.2 and Swift2.3 (very similar).
Migrate from swift 2.2 to swift 3.0 in xcode 8
Swift 2.2 unfortunately doesn't work with Xcode 8. But Apple made a good move still supporting Swift 2.3, which is basically almost the same as 2.2.
The problem is with 3rd party libraries, which must be in the same version of Swift as your project.
So, if you're using Swift 2.3, you can't use libraries, that are written in Swift 3.0.
using Swift 2.2 Pods with XCode 8
Please check procedures here that will make your swift 2.2
or swift 2.3
pods compatible with Xcode8 as its.
As steps:
To begin, open your project in Xcode 7. Go to project settings, open the Build settings tab, and click the “+” to add a User-Defined Setting:
SWIFT_VERSION = 2.3
In your Podfile you should put the following post install script. Don't forget to replace YOURTEAMID with your own
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
# Configure Pod targets for Xcode 8 compatibility
config.build_settings['SWIFT_VERSION'] = '2.3'
config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = 'YOURTEAMID/'
config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'NO'
end
en
Keep in mind that will work fine with most Pods, but not all I still struggling with Eureka
pod to work.
Is there any possible way to run my swift 2 project in Xcode 8?
set Use Legacy Swift Language Version to Yes
In Both Project
And Targets
How can I use Swift 2.3 in XCode 8 Playgrounds?
Unfortunately, according to Apple it is impossible:
For instance, Playgrounds in Xcode only work with Swift 3, and notably the Swift Playgrounds app for iPad also uses Swift 3. Xcode project templates all use Swift 3, and all documentation is presented in a format appropriate for Swift 3.
More here.
Related Topics
How to Check Two Instances Are the Same Class/Type in Swift
Swift 2 to 3 Migration for Prepareforsegue
Swift 5: What's 'Escaping Closure Captures Mutating 'Self' Parameter' and How to Fix It
Reference to Property in Closure Requires Explicit 'Self.' to Make Capture Semantics Explicit
Swift5 Macos Imageresize Memory Issue
How to Access Nswindow from @Main App Using Only Swiftui
Swift - Custom Setter on Property
Why Is the Shorthand Argument Name $0 Returning a Tuple of All Parameters
Swift: Failing to Copy Files to a Newly Created Folder
Swift: Setting an Optional Property of a Protocol
How to Create Swift Class for Category
How to Make Class Methods/Properties in Swift
Swift: How to Detect Linear Type Barcodes
How to Convert Timeinterval into Minutes, Seconds and Milliseconds in Swift
Unowned Vs. Weak. Why We Should Prefer Unowned
Is There a Difference Between Swift 2.0 Protocol Extensions and Java/C# Abstract Classes