In precipitating magnesium ammonium phosphate, why can't NH4Cl be used as a substitute for NH3?

Isn't pH critical? The solubility is vastly different at pH 9 versus pH 4.

In addition, how do you obtain NH3 from NH4Cl? The NH3 is for pH adjustment as Bob Pursley writes.