Does the iPod Touch 5th Generation have a magnetometer sensor?
Here is table about which device has which sensor.

Look to magnetometer compatibility.

So sensor is absent on iphone + iphone 3g + any iPod including iPod 6 gen.