The language will compile, but all of the UI frameworks for iOS aren't available on other platforms.
It strikes me as similar to how .NET is cross platform. Command line apps will run, but anything with a GUI would have to be written with a cross-platform UI kit.