First, install the WiFi Mouse app on you iPhone: https://itunes.apple.com/app/id591076411?mt=8
If you are using Fedora Linux, you need to convert the .deb package to a .rpm package first https://www.systutorials.com/qa/212/how-to-install-deb-packages-on-fedora .
Then, start the Mouse server.
On Linux, run
Open the firewall to allow connects to port 1978.