Screen DPI of varied devices

I’d like to get physical scale of each screen for letting graphics keep proper scale on the screen by human eye.
It doesn’t matter how it’s been called as PPI or screen density.

Android has DisplayMetrics

I don’t know whether iOS has kind of API or not.

There’s such API in Unity 3D (Screen.dpi)

Can I do it on oF?