To obtain bit perfect playback;
Disable all DSP like "Crossfade songs", "Sound Enhancer" and "Sound Check"

Disable the equalizer

If you use an outboard DAC over Toslink or USB; set volume to max

Source: krmathis
Just like Microsoft, Apple don’t support FLAC.
You can install Fluke to import FLAC in iTunes.
You can use software provided by Xiph.
A detailed description can be found here.