How Many Airplay Devices can an iPad Support?

I had been told this but never proved it for myself. This post is broken up into two parts. First I’m going to give you the answer to how many airplay devices the iPad can support and what happens after that, then I’m going to explain how I proved this to myself!

The Answer

The iPad (or your iPhone for that matter) can display exactly 64 airplay devices in the airplay device list. It only lists the first 64 it finds and it ignores any devices it discovers after those. As of iOS 7 the devices are listed in Alphabetical order.

Here’s a screenshot I took to demonstrate this. Note that there is a Device0, so Device63 in the listing represents the 64th device found.

IMG_0152

(click on the picture to make it larger or just look at the bigger one at the top of this post 🙂 )

How this was proved:

I don’t have 64 airplay devices to test. Well, correction, I do – but it would take ages to configure and set up the test. So I decided to tell the iPad about a lot of fake devices. To do this I took the code for Pairplay and adapted it slightly to create a rogue version! Instead of coding in just one device I coded in a loop that simply counted upwards.

The iPad checks the airplay server actually is live. So device0 was a copy of Airserver running on my Mac. The loop in the program code created fake copies pointing to device0 and modifying the deviceid and name in the mDNS packets. I deliver these fake mDNS packets to the iPad and it is suitably convinced that there are lots of airplay devices!

From there it’s trivial. We simply wait until the iPad stops listing the new devices that the program is telling it about and find the highest number that it got to.

Note that I sent the iPad the numbers in sequence. i.e. Device0-Device63. But the ordering in the device list on the iPad is re-ordered (so Device63 comes before Device7). This demonstrates the alphabetical sort ordering that the iPad is using.

Leave a Reply

Your email address will not be published. Required fields are marked *