As you want the app compatible for iPhones & iPads only but not iPod, I guess you have to set UIRequiredDeviceCapabilities entry (a dictionary) in info.plist file AND the magnetometer key with a value of YES, meaning, only devices that support magnetometer can use the app.
I have checked that magnetometer is supported by iPhones & iPads only not by iPods. Take a look at Device Compatibility - Apple Documnetation for your confirmation.
I have not tested this, but it should work as stated in the documentation:
The value of the UIRequiredDeviceCapabilities key is either an array or a dictionary that contains additional keys identifying features your app requires (or specifically prohibits). If you specify the value of the key using an array, the presence of a key indicates that the feature is required; the absence of a key indicates that the feature is not required and that the app can run without it. If you specify a dictionary instead, each key in the dictionary must have a Boolean value that indicates whether the feature is required or prohibited. A value of true indicates the feature is required and a value of false indicates that the feature must not be present on the device. If a given capability is optional for your app, do not include the corresponding key in the dictionary.
Table 1-1 lists the keys that you can include in the array or dictionary for the UIRequiredDeviceCapabilities key. You should include keys only for the features that your app absolutely requires. If your app can run without a specific feature, do not include the corresponding key.
Good Luck :)