Opposite is not true though, there are lots of troubles you have to go through to have Swift on Android/Windows.
Very often, especially in startups, when the new app is created, it is first created for iOS and then for Android. Having proper Swift support would reduce effort for bringing apps to Android/Windows.
Apple doesn't really care about Swift outside their wallet garden. How dare other companies refrain from investing in such a wonderful creation!
Investing in Swift would to an extent canibalize Go, Dart/Flutter, TypeScript, C#. You know, the technologies which have creators that actually care and invest billions in cross-platform development.
Not to mention fragmentation.
Apple doesn't even care about Linux running in their own hardware. Their contribution towards that goal ranges from hostile to scraps, depending on who you ask.
In fact, they don't even have to do that much for Swift. They don't have to develop neither the language nor the compiler.
They need to do similar to what The Browser Company did, exposing and allowing usage of their APIs from Swift, and maintain it as their API evolves.
If The Browser Company could afford it, while developing the browser, Google and Microsoft can afford it as well.
If The Browser Company could afford it, 3 trillion USD market cap Apple can afford it as well.
Commoditizing your own product is never in a company's best interest so don't expect it to happen willingly.
Yes it can. It's just Apple can't be bothered - most of the work to do that doesn't benefit Apple - it does benefit the Swift ecosystem and community of devs, but not Apple - the venn diagram of Apple vs the Swift dev community overlaps but doesn't completely close.
Swift came out in 2014 - Windows support for the compiler came out in 2020. That's it. They haven't bothered to upgrade the tooling support in VSCode or any other app because most VSCode users aren't Apple devs. The ball is literally in Apple's court - no one elses.
Plus, honestly, moving from swift to kotlin or even dotnet is marginal. The problem is getting into the qwirks of the underlying frameworks like swiftui, the ios sdk, the android sdk, and the conventions of these platforms. Language itself is relatively marginal in that. So really I don't see the value in what you're claiming.
The future is not that far off where you can write a 100% native Android app and, minus any Android OS-specific functionality, port it over as-is to iOS and desktop.
I mean, this is just absurd logic. How is the lack of Swift support on non-Apple platforms somehow up to Google or Microsoft? The burden to support more platforms is on the language developer, not the platform dev.