Set both preferences and environment sdk variables