Cosmopolitanism may actually be impossible for humanity to accomplish globally and in the sense that, to paraphrase John Lennon, there’d be “no countries.” For more on this, see Mill’s On Liberty and his definition of ‘nations.’ I don’t think Mill was placing a social construct atop a group of humans. I think he really was onto an ontological truth. However, in my country, the USA, we typically have a warm and practicing form of cosmopolitanism, where Appiah’s theory of identity fits perfectly well. It’s sometimes philosophers–and sometimes evil or crazy people (in the bad sense)–who muddy the waters.
EDITED TO FOR A CORRECTION: Mill’s quite lovely and beautiful definition of ‘nation’ can be found in On Representative Government, which you can read right here.