AFAIK Preference initializers are not UI code, they can run headless. They just provide default values for preferences.