The copilot gives him/her a map and a dart. He/she throws the dart and, whichever country it lands on, the baby becomes a citizen of said nation. Weird, but true!
O.K., you got me! Actually, the head flight attendant writes the names of the origin and destination countries, and any that may lie in between, on little pieces of paper and places them in a hat, the baby then pulls one out of the hat and that is his/her nationality. Scout's honor!
That rarely happens. I've never had a woman give birth on a flight. If it happens, the birth certificate will be issued in the city where the plane lands. The baby may or may not be a citizen of that country. I can only answer for my own country. If the plane is over the ocean, the baby is Argentine citizen if the airline is an Argentine airline regardless of the parents' citizenship. If a foreign airline's plane is over Argentine airspace when the baby is born, the baby is an Argentine citizen regardless of the parents' citizenship. If one parent is an Argentine citizen and the baby is born over or in a foreign country, the baby won't become an Argentine citizen until the parent presents the birth certificate to the authorities to declare the baby's citizenship. If the parent doesn't declare the child's citizenship, that child can choose to become a citizen when he or she turns 18. If the parents are foreign citizens but they have a baby in Argentina, the baby is an Argentine citizen, and they have an exit ban until they can get an Argentine passport for the baby. The exception to that is for foreign diplomats and employees of a foreign government.
It's the law. Argentine citizens of any age leaving the country must leave with an Argentine passport. If they're traveling to another South American country, except Guyana, only their national ID card is needed. The national ID card must always be carried even domestically. I always carry my passport along with my visas anyway so I never forget them. I may be called to work on an international flight at any time.