Apple released iOS 12 just in time after announcing three new iPhones. The new iOS version has a rich set of features in terms of performance and user experience and comes with huge enhancements in performance, security and privacy. Whilst considering these new features for users, we also need to consider what this release means to every iOS developer and QA engineer. In this post, we will explore some major development and testing considerations for Apple’s new operating system.
Tech Features for Developers
Believe it or not, users are moving very quickly in terms of adopting Apple’s new products, either software or hardware. It’s been proved from the past experiences that users quickly adopt new releases before we think of adopting our technology stacks. We have to be prepared to get our technology stack up to date with new features and tooling as soon as possible to stay competitive in the digital tech market. There is always technologies behind new features. In order to keep up with new changes in tools and technologies, we should be always prepared for upgrading our existing toolset to the latest stack. Now we will see what’s new in developer tools and Apple frameworks that have been relevant for iOS 12.
1. Xcode 10
Apple announced Xcode 10 with a full list of the new features for iOS developers. The most noticeable feature of Xcode 10 is a dark mode with macOS Mojave. With Xcode 10, Developers can enjoy writing code in the dark mode. Xcode 10 obviously shipped with all the iOS 12 simulators and can build an app on the newly launched device. Other important features launched with Xcode 10 are multi-line editing, code snippets for the other languages like Ruby, Python etc. Last year, Apple announced integrated support for Github within Xcode. This year with Xcode 10, we will have support for GitLab and BitBucket as well. You can check all the new features in the Xcode 10 release notes. Xcode 10 shipped with Swift 4.2 but we can use Swift toolchains to switch between the Swift versions.
2. New Build System
With Xcode 10, we will have a new build system enabled by default. The new build system is designed for the faster Swift builds and optimising the speed of the iOS app. From now on, all the apps developed for iOS 12 will be using the new build system. As a developer, we need to make sure that existing apps still work with new build system if not we have to make them compatible or switch to the old build system from Xcode Files->Project/Workspace Setting option.
3. XCTest/XCUITest and Code Coverage
Apple is revamping the tools, technologies and practices for testing iOS apps. As usual, there are some great features added with Xcode 10 and iOS 12. The key improvements are as follows
The support for the parallel testing has been extended to the next level this year. Now we can officially run XCTest or Xcode UI Test in parallel by having the number of clones of a simulator. The native tools xcodebuild has also got an option to run them in parallel. We can enable the parallel testing by updating the scheme and in the Test action, we can select “Options” against a test bundle to choose parallelization option. The details of the parallel testing in practice here.
Previously, XCTest used to run in the alphabetical order but with Xcode 10 onwards we can run tests in the random order. This would be the useful feature to find the dependencies between the tests.
Apple announced the native tool known as xccov to generate code coverage for the Swift code. This reduces the pain of using third-party tools to display the Xcode code coverage reports in the nice format. The details of xccov and latest XCTest features can be found here.
Xcode 10 comes up with Swift 4.2. There is one thing, we need to note is Xcode 10 is the last release supporting Swift 3. If your app is still using Swift 3 then it’s worth thinking out the migration to Swift 4 or later before it gets too late.
5. Siri Shortcut
One of the major feature announced with iOS 12 is Siri Shortcuts. The Siri Shortcuts can be used to expose your app features to Siri so that Siri can suggest some of the features of your apps to users. This enables a new way of interacting with your users from iOS as well from watchOS Now that, developers can use custom intent Siri Shortcuts for iOS 12 apps, Apple has provided resources in terms of WWDC videos and example app to help developers to get started with Siri Shortcuts. The developers can refer to this excellent blog post on how to use Intents Extension in the existing apps. Siri Shortcuts is new of communicating with your existing users so get ready to implement this features in your apps.
6. ARKit 2.0
Arkit is a great framework which allows developers to write augmented reality apps for iOS. With iOS 12, developers can use ARKit 2.0 for face tracking and 3D object detection. If you have already implemented ARKit in your app then its opportunity to expand the horizon.
7. Machine Learning
Apple announced the Core ML framework last year to support the machine learning in iOS apps. However, in order to create machine learning models, the developer has to rely on third-party frameworks like TensonFlow or IBM Watson etc. This year with iOS 12 apps, we can use Create ML framework for generating the machine learning models with Swift and within Xcode. Now developers can implement end to end machine learning flow using Swift and Xcode 10. This will reduce the burden on developers to learn third-party machine learning frameworks and algorithms.
Apple announced a customisable framework for the CarPlay which means with iOS 12, developers can create apps for CarPlay with smooth animations and better communications. The biggest news for developers is that, with iOS 12 latest build, you can use Google map on iOS CarPlay.
9. Photos and Images
Apple has improved the Photos experience a lot in iOS 12. There are some cool features like personalised Photo, Photo searcher etc. The iOS apps involved in the business of printing photos can take benefits of these features. Apple has improved the portrait segmentation API and Depth API to interact with images in a new way. By using this new API, developers can be able to build apps with various photo effects.
The user notifications have been improved drastically since iOS 10 but with iOS 12 we can add more controls in the remote and local notifications. Now it’s possible to add buttons, switches and custom views to the notifications using UserNotificationsUI API.
Apple seems to have made a significant improvement in the performance in all areas including faster keyboard display, faster app launch. It’s worth checking our existing apps on iOS 12 to see app launch improvement hasn’t affected launch screen images or text. It’s great news for the developer that iOS 12 will give them performance improvement for free.
12. Privacy and Security
Apple has packed loads of security and privacy features into iOS 12. The key security and privacy features include a built-in password manager, easy two-factor authentication. And blocked access to USB if locked for more than an hour. Apple has put in all the security features in the single document. With iOS 12, developers can improve the user experience of existing apps while login or onboarding using Password AutoFill API. Whilst considering, this security features developers needs to be aware of upgrades that might lead to terrible consequences like dropping passwords using AirDrop can leak sensitive data to the hacker.
The fancy features of iOS 12 are going to attract users, so pull your socks to upgrade your iOS tech stack to support all the fancy features of iOS 12. Don’t leave it till late. How are you working with these new features from iOS 12 in term of the technical stack? Let us know in the comments below.
Get all essentials about XCTest framework and learn how to get started with it for cloud testingDownload