Its Good to hear for all iOS Developers that Recently apple has Released Swift 3.1 Language which supports many new minor Features which is added and Faced Some Issued in Swift 3.0
“It is a strong goal that the vast majority of sources that built with the Swift 3.0 compiler continue to build with the Swift 3.1 compiler. The exception will be bug fixes to the compiler that cause it to reject code that should never have been accepted in the first place,” said Ted Kremenek, senior manager for languages and runtimes, Apple, in a blog post.
Apple has provided a minor Release an has The Following Compatible Features with Linux Implemenatation:
- Swift 3.1 is Source Compatible with Swift 3.0
2. Following Language Updates are:
1) Sequence(Protocol) which ha two new Members
protocol Sequence {
// ...
/// Returns a subsequence by skipping elements while `predicate` returns
/// `true` and returning the remainder.
func drop(while predicate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.SubSequence
/// Returns a subsequence containing the initial elements until `predicate`
/// returns `false` and skipping the remainder.
func prefix(while predicate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.SubSequence
}
3. @availability
It can be written with @available if we have to include with swift 3.1 language
e.g, @availability(swift, obsoleted : 3.1)
4. It also Numeric Conversion which means it either completes the whole type numerical conversion or returns nil
5. UnsafeMutablePointer.initialize(from:) which holds for memory safety and fasts initialise in memory.
6.Some of the Improvements in Linux implementation are: NSDecimal, NSlenghtFormatter, Progress, URLSession, NSUUId, NSUrlComponents and UrlSession
7.Though it would be good to know that swift 3.1 uses Package Manager Updates which has:
1)Editable package which denotes at the begin editing of Package.
2)Version Pinning which records in package.pins manifest
8.Tools Version
Swift 3.1 has package Tools Version which records the it in package.swift manifest
While Swift 3.1 Works with Updated Xcode 8.3 and Works as Code Migrator.
While the repositories which has been made in GITHUB are:
swift
swift-llvm
lldbswift
cmark
corelibs -libdiepatch
corelibs-detect
lllBuild
packageManager
While Swift 3.1 also supports Server API’a with LINUX Implemantation , Some of the web frameworks are Kitara, vapor , Perfect & zewo and many more.
So, These are new Supporting Lists which have been faced by many developers in previous Swift 3 and has Upgraded in Swift 3.1
Enjoy 3.1…..