The app, designed by Peder Norrby, uses the iPhone X's TrueDepth camera to infer the 3D position of a user's eyes.
Using the position of an eye and the device screen rectangle a non-symmetric camera frustum can be defined. The frustum defines an off-axis projection that when used for rendering on the device allows for objects appearing in front of, and behind the screen of the device.
Take a look at the video below to see the illusion in action. A detailed write-up with source code can be found at the link below...