iPhone X Review: Developer Considerations
Fifth in my look at the iPhone X we will tackle an area which will not be prudent to everyone, but may be of some interest to many. That topic is what developers need to look at when it comes to their applications on iPhone X.
The iPhone X represents a number of changes, an OLED screen with High Dynamic Range (HDR) support, improved camera, significantly improved processor, and Face ID, just to name a few. Many of these new features require some thought from developers to be able to have the best iPhone X experience for your users. If you have been keeping your application up to date, there may only be a few tweaks that need to be done to fully accommodate the iPhone X. Let us start with items revolving around the screen.
Screen
The iPhone X has an all new 5.8 Super Retina HD screen. This screen is an OLED based screen with a resolution of 2436 pixels tall by 1125 wide with 458 pixels per inch. This means that it has a true 3x screen due to the width being 375 points, and the height being 812 points.
This 3x screen means that developers may need to provide assets at true 3x resolution. It was possible to provide almost 3x resolution assets before since the Plus-sized iPhones were scale down any 3x resolution assets to appropriately fit the screen.
It is not likely that many developers would have not had true 3x resolution assets, but in case you did not, it is important to do so now. Along with this, the iPhone X is its own distinct screen size. Throughout the iPhone's history there have been a total of six different screen resolutions. These have been:
- 320 pixels by 480 pixels
- 640 pixels by 960 pixels
- 640 pixels by 1136 pixels
- 750 pixels by 1334 pixels
- 1080 pixels by 1920 pixels
- 1136 pixels by 2436 pixels
If you are planning on supporting all of the currently supported devices, you will need to support the last four screen resolutions. Since the iPhone X is quite a bit taller, 216 pixels to be exact, you will need to make sure that your assets support the proper aspect ratios in order to be sure that everything appears correctly on each different iPhone model. There is one thing somewhat related to the screen.
Dark Modes
Each user of any application is unique. While you will never be able to please everyone, there is something that you can do to help a segment of your user base. Some users enjoy customizing the way that things look and for some of these users prefer a darker screen. This could be due to eye issues, or just because these themes are more visually appealing to them. For whatever the reason, it may help expand your user base to include a darker theme. The iPhone X may just give you the impetus to creating one within your application.
With the iPhone X being OLED, burn-in may become an issue over time. Even though Apple has done many things to help minimize burn-in, there is one thing that app developers can do to help; implement a dark mode within your app. With OLED, pixels are only turned on when the color is anything other than black. This means that if your application has a dark mode built-in you can help save a user's screen. Another side benefit of this is that you can also help save battery life for users since the iPhone X will not need to turn on the super dark pixels. If you do not have a dark mode, it may be a good time to start implementing one, you never know it may just help expand your user base.
Face ID
Starting with the iPhone 5s, Apple has included a biiometric authentication mechanism with Touch ID. Touch ID has allowed for convenience when needing to unlock your iOS device or enter in a password. In order for developers to access the Touch ID sensor, Apple created the LocalAuthentication Framework.
The LocalAuthentication Framework provides two return values, a Boolean for the success or failure, and an NSError object, so you can determine the actual error that has occurred. That is all that you, as the developer receive. Given that the LocalAuthentication framework handles the actual authentication and determines which authentication mechanism to use, there is not much that a developer has to do.
The approach of only providing a success or failure, as well as an error, makes the LocalAuthentication framework infinitely scalable, from a developer's point of view, and reduces the need for complex code. Ultimately what this means for developers is that they have minimal work to do to support Face ID on the iPhone X. In fact the only work that needs to be done is updating strings to refer to Face ID instead of Touch ID, when on an iPhone X. There are no other code changes necessary in order to support Face ID. If a developer does not have time to update their application right away, their application should continue to work, just with the wrong text showing on the iPhone X.
The Notch
The iPhone X brings a new wrinkle for developers, the notch at the top of the screen. The notch houses the True Depth Camera sensor. The notch actually protrudes into the screen and creates two areas that cannot really be used for anything. If a developer has decided to hide the status bar, there could potentially be option available for usage. However, for most developers they do not do this and will need to accommodate a bit within their application.
Apple has indicated that developers should "embrace the notch". This means that they should not attempt to hide it with black bars. Apple made this decision, not only because it would create a lopsided application, and it would, but also because iOS 11 on the iPhone X utilizes the areas to the left and right of the True Depth Camera are where users access Notification Center, on the left, as well as Control Center, on the right.
If your application is using standard UIKit elements, those elements should automatically extend up to the notch and if you have any colors applied, those should also extend to the top as well. If you do have custom controls, you will need to extend your colors up to the status bar, to provide a more consistent look and feel to your application. One aspect that is new to iOS 11 directly relates to the iPhone X and that aspect is Safe Areas.
Safe Areas
Due to the notch it is important for developers to be able to know just how their applications will function. Until the iPhone X, if a developer chose to support all orientations, they could be reasonably reassured the they would only have two potential layouts to deal with, one in portrait orientation and one in landscape orientation. The iPhone X adds a bit of complexity to this arrangement.
One of the most important aspect to any application is the content. In order to provide developers with the confidence they need when building their apps, Apple introduced a new concept with iOS 11 called "Safe Areas". Safe Areas, are just as they sound, they are areas where it is safe to put content.
Safe Area Guides are the actual term used to describe these areas. Safe Area Guides can be used on a controller by controller basis. Safe Areas will allow your content to stay within proper areas, not just on the iPhone X, but across all iOS devices. You can choose to allow some aspects of your interface to extend beyond the safe areas if it is appropriate to your application.
A peripheral item that developers need to be aware of, that relates to Safe Areas, is the new home indicator. The home indicator occupies a small portion of the bottom of the screen and automatically adjusts based on the background color. The home indicator will provide a significant amount of contrast so that it is always visible.
What this means for developers is that any controls need to be above the home button area. The area itself is not very large, but it is present. It is important to allow users to interact with this area. Safe Area Guides will allow developers to more easily determine where their application's content will be shown, without having to worry about customizing each interface differently just for the iPhone X.
Letterboxed
If you have an iOS application and you have not yet updated it to support the iPhone X, it may be worth your while to do so. If you do not your app will have black bars above and below the primary content of your app. This is because Apple cannot accurately determine how best to show your application. Therefore, they will present it using a compact size class, with a resolution of 375 points wide and 667 points of height, or 1125 pixels by approximately 2000 pixels.
While it will take some time to adapt your applications to support the iPhone X doing so will allow your application look like it belongs on the iPhone X and not like it belongs on an older iOS device. For many users. having a letterboxes application may result in them abandoning that application in favor of another one that is more native to the iPhone X.
Closing Thoughts
The notch on the iPhone X is the biggest impediment for many developers to update their applications. This is particularly true for full screen applications and games. This is due not only to the notch itself and the work that needs to be done but also because their assets may not be able to scale properly due to the new aspect ratio.
Even though it may take some work on a developers' part, to update their applications for the iPhone X, in the long run it will be well worth the effort, primarily because the iPhone X form factor is not likely to be a one-off model. Additionally, having an application that looks like it belongs on the iPhone X will not only be better not only for users, but also for developers as it will mean less work in the long run. Next let us turn to another new feature, one that is not exclusive to the iPhone X, but is also present on the iPhone 8 and iPhone 8 Plus; Wireless Charging.