I have a mac m1. I have xCode installed in mac. But I'm wondering if there are any good IDEs that I can use to make cross-platform apps using swift. What do you recommend?
Try VSCode. It has an official Swift plugin.
What platforms do you want to cover? What kind of applications – console, GUI, games?
In my view, Swift is the language for Apple platforms. I'd be cautious in applying Swift to non-Apple platforms. When you decide on platforms and technologies you want to support, search Github for a similar project in Swift. It would be a red signal if you find little.
Some cross-platforming could be done in Xcode and command line. It depends on your needs.
i've been using swift exclusively on linux since 2016. this is completely false.
using swift on linux has the disadvantage of underdeveloped library support and lack of GUI profiling tools. but you also avoid a lot of OS versioning problems that only affect Apple platforms.
The "in my view" could not be true or false, it is my view. There are many aspects behind the asterisk of using Swift on non-Apple platforms. It seems that OP is new to development, and we don't even know what they would like to build.
† - Just double checking: you don't mean cross-platform just across mac / iOS / tvOS and watchOS? Perhaps you mean Windows / Android / Linux? And that would be a GUI app?
That's a crucial question indeed. Console apps you can do right away, for full screen games you have a choice of the now deprecated OpenGL and the not-so-cross-platform Metal. For GUI apps I'm afraid SwiftUI / UIKit / AppKit are no go for you if you insist on cross-platfomability-†. I am not expert on those other solutions that allow using swift for cross-platform-† apps, but can tell you upright (and that's what @paiv was referring to when said that "Swift is for Apple platforms only"): cross-platform-† GUI apps are rarely written in Swift, I mean really rarely, perhaps in less than one case out of a thousand, check GitHub stats to verify this claim.
Try out swift studio ide
I would also recommend VSCode, especially in combination with cmake.
I'm using this combo since quite a while to develop cross-platform libraries on Linux, Windows and macOS and found no major drawbacks so far. However, its only about console stuff without any GUI.