Cabot Technology Solution

@cabot_solutions

The Best Features of iOS 11 and What’s New with Swift 4

The Worldwide Developers Conference (WWDC) in June 2017 saw the new Apple iOS 11 introduced to the world. After giving us a peek into the wonders offered within it through 10 betas, you can expect the new OS to feature in the new iPhone 8S, 8S Plus and iPhone X devices. The conference only showed a teeny-weeny bit into what is offered through the new OS, so you can brace up for a lot more. Here are some of features:

ARKit

Augmented Reality still rules the world. The ARKit allows developers to build apps with complete AR experiences where your users can enjoy a blend of digital objects and the real environment to have an immersive experience.

Document Scanning in Notes

The Notes app in the phone comes with a document scanner, making it easier for you to take photos of the document, crop the edges, correct the lighting, cut the glare and so on. You can also fill in the blanks, and perform editing with the help of Apple Pencil.

DND Feature during Driving

The new OS in Apple detects when you are in transit, and immediately turns off the notifications, text messages and phone calls so you will not be distracted. People who are trying to call you when the DND is activated, will get the message that you are not available right then.

A Whole New Control Center

Image Credit: Apple

The Control Center features the biggest change in the new operating system. Now, it is not just a small box at the bottom of the screen, but rather a full page, with its own space. You can even customize the elements you wanted included in the page.

Sharing Wifi Password

If you are the sharing kind, you can actually share your Wi-Fi with another person having a phone with the same OS. The person wouldn’t even have to type the password.

Amazing Drag and Drop Option

The new OS allows you to drag and drop your content within the app, and between two different apps.

Files App

Image Credit: Apple

Files app is a new app for the iPad. It allows you to search, manage and arrange all the files in the cloud and within the device. You can also have separate folders so it’s easy to save important files in a Favorite folder, add color tags like you do in an iMac and so on.

The Airplane Mode Remembers your Settings

In the earlier versions, the phone did not remember your Bluetooth or Wi-Fi settings while it resumed the old state after being in the ‘Airplane mode’. But with iOS 11, it will remember the settings and switch it back on again.

Storing Messages in the iCloud

This feature is expected to come soon. You can sync all your messages in the iPhone and iMac, so whatever you delete in the phone, will be deleted in other devices also.

Multitasking with iPad

Another noted feature in the new OS is that you can work on two different apps on the same screen by controlling them with Split View and Slide Open features. The App Switcher comes with a stylish and user-friendly layout that helps you switch from one to the other.

What’s in Store for Swift 4?

Image Credit: Swift

Swift is a very powerful, yet intuitive programming language for writing MacOS, iOS and watchOS. The code itself is interactive with a concise and expressive syntax and a number of modern features loved by developers. The newest version of Swift is Swift 4, and this was also introduced at the WWDC 2017. The new version is expected to have changes right from the APIs to language syntax.

The good news is that the migration from Swift 3 to Swift 4 is going to be an easy one, compared to the huge code change that you had to go through in the previous version. The Swift migration tool would help you 80% of the way, if you are using Swift 3.1, and the extra fixes can be done quickly. However, certain features of the new version might take a longer time to update because you will have to rewrite the code using the new syntax and functionality.

Here is a glimpse of what you can expect in the new language version. Of course, this is not all-inclusive list, you really do have many more features in the new version.

Xcode Setup

Swift 4 needs the Xcode 9 IDE which can be downloaded from the Apple Developer portal. You can then unpack the special .xip file and open Xcode to set up the dependencies like command line tools and SDKs.

Xcode 9.2 can be used to build targets that are written in either Swift 4 or Swift 3. If you’re working on a large project that’s been divided into multiple frameworks, your code can be migrated from Swift 3 to Swift 4 one framework at a time.

New Encodable and Decodable Protocols

One of the most common topic of discussion in the Swift community is JSON parsing. In Swift 4, you don’t have to parse or encode your class, struct or enum manually, because refreshing the archival and serialization APIs in the Foundation framework is already done. You can just add the ‘Codable’ (which is an alias for Decodable & Encodable) to the class’s inheritance list and use the JSONEncoder to encode an instance of the class. New Encodable and Decodable protocols are already added.

Refreshed String Manifesto

The String type also went through a new change. It was removed in Swift 2, and now in version 4, it conforms once again to the ‘Collection’ protocol. You can just enumerate over a string to get all characters.

Enhanced Key Paths

Swift 3 had the new addition of Key Paths, but their usage was limited, and didn’t really play well with structs. In Swift 4, you get an enhanced version of the Key Path where a new syntax was decided by the community to specify the key path.

Generic Subscripts

In other versions of Swift, the developer had to define a specific return value type in the subscript. In Swift 4, you can define a single generic subscript to infer the return type based on the defined result value.

Closing Thoughts

With the major new features in Swift 4 and the revelation of iOS 11, developers can enjoy a fresh and clean codebase. They are already looking forward to write new code and refractor the previous ones to make them simpler and easier. If you are ready to migrate to Swift 4, you can use the migration tool provided by Xcode. Migration from 3 to 4 is definitely easier than the migration from 2.3 to 3. So, go for it!

Interested in adopting the latest features in your next iOS app development project? We’re happy to help…

Contact Us Today!

More by Cabot Technology Solution

Topics of interest

More Related Stories