- before we start, what we have to konw is that iPhone X is the future.
Creating apps for iPhone X
iPhone X features an all-screen Super Retina display for more immersive app experiences and Face ID,a secure new way to unlock,authenticate,and pay. The TrueDepth camera works with ARKit,and the A11 Bionic chip is designed for CoreML and Metal2.
Super Retina display
And now ,let's try to figure out the Retina display. With iPhone X,the device is the display. An all-new 5.8'' Super Retina display employs new technologies to precisely follow the curves of the design,clear to the elegantly rounded corners, so your apps look incredible. It supports High Dynamic Range (HDR) with a 1,000,000 to 1 contrast ratio, wide color support, and the best color accuracy in the industry, enabling amazing viewing experiences.
So we have to make sure we are ready to take advantage of the Super Retina display by respecting safe areas, supporting adaptive layouts,and more.
Run and Test your apps
Testing on a device and trying to find and address UI issues in our app ,and make sure your app looks great on iPhone X.
Enable full screen native resolution. Our app will run in Full Screen Display Mode on iPhone X if your project's base SDK is set to iOS 11 and you have a Launch Storyboard or iPhone X launch image.
Verify all parts of our app. Make sure that your UI displays correctly and no elements are mispositioned, overlapping,incorrectly scaled, or clipped. If you discover issues ,use the safe area guides and layout to correctly position UI elements.
Respect safe Areas
Your layout should fill the all-screen Super Retina display while content and controls appear correctly and are easily tappable. Use these safe areas to make sure your app works properly with the new dimensions of iPhone X.
Apps with custom layouts can also easily support iPhone X,especially when our app uses Auto Layout and adheres to these guidelines.
Status bar.
Allow the proper amount of space below the status bar based on the safe area.Avoid assuming a value for the status bar height, as it may cause your content to be obscured or mispositioned below the status bar.
Rounded display corners and sensor housing.
Keep content and controls away from the corners and sensor housing to allow your app to fill the screen without getting clipped.
Home Indicator.
Make sure your app doesn't interfere with Home Indicator, so your content and controls remain clearly viewable and tappable at all times.
Screen Edge Gestures.
The display on iPhone X uses screen edge gestures to provide access to home screen, app switcher, Notification Center, and Control Center. Avoid interfering with these gestures. Move Controls into the safe area and adjust your UI. In rare cases, you may consider using edge protect, in which the first swipe invokes the app-specific gesture and a second-swipe invokes the system gesture.
Support Various Aspect Ratios and Orientations
The screen height and aspect ratio of iPhone X is different from other iPhone devices. In portrait orientation, the width of the display on iPhoneX matches the width of the 4.7" displays of previous models.
However,the display on iPhone X is 145 points taller than a 4.7" display.
check that your code handles a different screen aspect ratio.Many apps position content based on a particular width,height,or aspect ratio. Verify that your content scales and is positioned correctly.
Test your app in landscape orientation.
while you may discover some issues in portrait orientation, the majority of issues will likely appear in landscape orientation. Be sure to test all of your UI with the device rotated,both to the left and to the right.
Scale videos accordingly.
Video content on iPhone X should fill the display. However,if this results in any cropping on the top or bottom,or to much cropping on the side , the video should be scaled to fit the screen.While AVPlayerViewController manages this automatically,custom video players based on AVPlayerLayer need to select an appropriate initial video gravity setting and allow users to switch between aspect and aspectFill viewing modes based on their preference.
All the them is just come from apple. if you want to learn more
try to visit the official websites.