The only prerequisite is that the phone and Arduino can reach each other over the network, using the same address range or DHCP server. Make sure you are on the same LAN for this to work. When using an Ethernet shield, you communicate from the Arduino via a WiFi router, which in turn connects over WiFi to the smartphone (as phones don't have Ethernet connectors). When using a WiFi shield, you communicate directly from your mobile device to the Arduino. It also works fine with the Intel Edison version of the Arduino SDK. Communication with the Arduino is made using either a WiFi shield or an Ethernet shield. This example shows how to make an app that controls an Arduino board, by communicating over the TCP networking protocol.