The government can compel you to testify either in person or by record production -- that is, they can compel you to turn over something you have. That's what a subpoena or court order does and we complied with these subpoenas as an ordinary matter of operations because there is nothing legally -- or constitutionally -- wrong with being compelled to testify (whether by document or by personal utterance) to the truth before a court of law.
But the government has no power to compel you to make that which you do not have.
It does not matter if the government is offering to pay Apple or not, nor does it matter how much they are offering to pay. There is no authority anywhere in the Constitution and in fact there is an explicit prohibition against involuntary servitude, with pay or not, in the 13th Amendment:
"Neither slavery nor involuntary servitude, except as a punishment for crime whereof the party shall have been duly convicted, shall exist within the United States, or any place subject to their jurisdiction."
Apple not only has not been convicted of a crime it has not even been accused of an offense.
There is simply no authority for the FBI or any other organ of the government to compel the company to make anything. They can compel the firm to hand over something the company possesses under due process of law but in this case the operating system version they wish to obtain does not exist.
A judicially-issued demand to Apple, or anyone else, that reads "Write software to do X for us" is facially invalid.