I need a way to figure out if someone is using a iphone with the bigger notch which includes:
iphone x - iphone 12
or if they are using a newer iphone:
iphone 13 - iphone 16 and beyond
i want to push buttons beyond the safe insets so they can go all the way to the edge of the screen but the button is too big to fit on iphones with bigger notch.
Unfortunately, there’s no way that a developer can identify which device a player is running on. We already have to do a lot of hacky stuff to determine whether they’re on a specific platform, let alone which model.
Your best bet would be to continue using the CoreUISafeInsets.
You can use a screen GUI’s AbsoluteSize to figure out a specific model. For example, the absolute size of an iPhone XR is 800, 414. If we know the absolute size of a screen GUI is 800, 414 we will know it’s an iPhone XR. On studio you can check like this: Test → Device → Select device → Pick actual resolution → check screen GUI absolute size.
Some devices may have the same or extremely similar sizes, and sometimes the application may return inconsistent values. This isn’t really a reliable option.
If it returns inconsistent values then we can see how much it offsets to determine the device. We can set the max offset and check if the current offset is within our max offset then we will decide on the device.
Also, all devices of the same model have the same screen size so the offset will probably not be that big anyway (Excluding consoles)
I wasn’t giving a method to 100% detect what device the player is using but rather a prediction on the used device model. If you factor in the absolute size and some other factors you should get a near accurate prediction.
I recommend against using screen sizes for device prediction as some Android devices allow you to change the scaling of games through applications as well as many screens having the same size resolutions. My Samsung S21+ has Roblox currently at half resolution to keep a good framerate for more heavy games, tho I can set it easily to 1x or even 0.25x the resolution
It’s best to try and fit your UI inside of the preset device bounds Roblox offers to ensure that all devices can have the best fit possible. One thing I know for sure about the preset bounds is that it respects resolution scaling
There are hundreds of device models out there, so trying to predict them will always lead to false positives in your design
there is currently no way to do this, i would advise to still implement it but have the user be required to enable it themselves so that extra space isn’t wasted completely (or hell, even custom ui placement if you’re brave enough)
thanks for the suggestion but this won’t work. the roblox mobile app controls the resolution of a game and doesnt usually let it be the devices actual resolution, i assume for performance reasons