Detect if the device is iPhone X

0 votes

The UINavigationBar in my iOS app has a custom height, which causes issues on the iPhone X.

Exists a reliable way to programmatically determine whether an app is running on an iPhone X (in Objective-C)?

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
    if (screenSize.height == 812)
        NSLog(@"iPhone X");
}

The real query is: "Can I determine whether the current device is an iPhone X directly, such as through an SDK feature, or do I need to use indirect measurements?"​

Nov 16 in IOS by Soham
• 9,670 points
21 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In IOS

0 votes
1 answer

Is it possible to run .APK/Android apps on iPad/iPhone devices?

It is not possible to run Android ...READ MORE

answered Sep 20 in IOS by Aditya
• 7,660 points
180 views
0 votes
1 answer

How is a rounded rect view with transparency done on iphone?

view.layer.cornerRadius = radius; The difficult technique is to ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,680 points
39 views
0 votes
0 answers

iOS Custom Notification Sound (UNNotificationSound) doesn't play when iPhone is locked

I edit the notification before showing it ...READ MORE

Sep 22 in IOS by Soham
• 9,670 points
94 views
0 votes
0 answers

What is the equivalent of apk in iOS?

What is the equivalent of apk in ...READ MORE

Sep 27 in IOS by Soham
• 9,670 points
33 views
0 votes
0 answers

Detect headset button click on iPhone SDK

Is it possible to hear the play/pause ...READ MORE

Sep 28 in IOS by Soham
• 9,670 points
40 views
0 votes
1 answer

Why does the NFC range of an iPhone improve with an application?

I'm not familiar with iPhone, but I ...READ MORE

answered Nov 4 in IOS by Rahul
• 9,680 points
32 views
0 votes
1 answer

Detect if the device is iPhone X

The response to your query is "no" ...READ MORE

answered Nov 8 in IOS by Rahul
• 9,680 points
39 views
0 votes
1 answer

Getting country calling prefix

For a class that offers both this ...READ MORE

answered Sep 20 in Others by Aditya
• 7,660 points
68 views
0 votes
1 answer

Is there a way to to check if a picture was taken on that iPhone?

Actually, the model and manufacturer information is ...READ MORE

answered Sep 22 in IOS by Rahul
• 9,680 points
37 views
0 votes
0 answers

How to receive single tap and hold Remote-Control Event with iOS

I'm looking for my app to listen ...READ MORE

Nov 8 in Mobile Development by gaurav
• 22,040 points
33 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP