please do not follow people which does not know neither the GPS2IP tool nor have other network knowledge.
To get GPS2IP working you will have to configure it to your networking environment
. Here is an example with a few pictures for my network. You will have other item numbers.
Go to Settings in GPS2IP and check first the iPhone IP Selection with "i" gadget at WiFi
IP. Keep the shown IP address and activate WiFi
Check the Socket number in Connection Method Socket. I use normally always 10110 because it is the standard for nautical devices. Change when needed and activate Socket.
Make other settings as shown in picture GPS2IP-2. I always use 1 second (1 Hz) for data transmit because this is the standard for GPS
My local network on the boat is 192.168.10.x. The iPhone therefor has 192.168.135 because it is part of my boat network which has a router. See pic GPS2IP-1 which shows one connection because I have configured OpenCPN
as shown in pic GPS2IP-OCPN with IP 192.168.10.52 which is the IP of my computer.