Troubleshoot

Last edited on

Troubleshooting iOS Device Testing

Problem

You want to do iOS device testing and you already did all the necessary modifications described in the documentation. But when you try to attach to the application, it does not work.

Checklist

  1. Testing an iOS app with Squish on the device has some requirements that need to be met. So first you should ensure that they were really met when you tried it:

    • The device must not be locked.

    • The device must not be in sleep mode.

    • The app you want to test has to be running in the foreground on the device.

  2. When building the app with the necessary modifications for Squish, you might have missed a step. In order to test if your modifications were successful, execute the newly built app in Xcode’s debugger and take a close look at the debugger console in Xcode: do you see the message Listening on port 11233 for incoming connections on startup of the app? If you don’t see it, you missed at least one of the necessary steps and you have to check them again.

  3. There are also some requirements on the network connection:

    • The desktop computer connects to the device.

    • The device connects to the desktop computer.

    • So make sure that the device is in a network that is accessible from the desktop computer and vice versa. (It should be sufficient if both, the computer and the device are in the same wifi network. Testing with the device in a 3G network will not work.)

    • Make sure that the firewall on the desktop computer does not block connections from the device. To rule out firewall problems, you should disable the firewall for a quick test alltogether (please remember to enable it again after the experiment).

  4. If you checked all the above and Squish is still not working, please open Terminal.app on your Mac (you find it in /Applications/Utilities and execute telnet <device IP> <port> (make sure to replace <device IP> with the IP address of the device and <port with the attachable port number you used in the squish_allowAttaching() call in the modifications to your application). You can see different output:

    • An error message about the connection to the IP address being refused. Possible reasons (see the above points for resolutions of the problems):

      • You used the wrong IP address or the wrong port number.

      • The application is not running on the device.

      • The modifications to the application were not sufficient.

    • Another error message. This means that there seems to be some other network problems that the desktop computer can’t connect to the device. The exact error message the telnet command gives you should state what the network problem is.

    • You see just the one line go. This means that you are almost there (i.e. the modifications to the application were correct and that desktop computer can connect to the device). The problem is that the device fails to connect to the desktop computer (maybe due to a firewall on the desktop computer).

Note: Please make sure to force quit the app on the device (in the iOS task manager) in case you did the telnet command and saw the go message, before you do any further experiments.