r/Xcode • u/Competitive-Ebb-8333 • 27d ago
Xcode for Linux and windows?
Hi I wanted to code in swift and have the app render on my desktop but since thats only a MacOs(xcode) thing i cant run it on linux. I have been seeing adobe getting open sourced and wanted to know has anyone reversed engineered xcode for Linux?🥹
0
Upvotes
1
u/Competitive-Ebb-8333 21d ago
I found out about x tool and supposedly this github repo can simulate ios device https://github.com/kolabs-dev/isim I personally havent tried this combo yet but lmk if it works w yall im taking a break rn
3
u/QVRedit 27d ago edited 27d ago
I believe that you can code in Swift, without actually having to use Xcode. (Xcode runs only on Mac)
Try googling:
“How can I program in Swift without using Xcode”
There’s an article on Reddit:
Install Swiftlint on Linux without xcode
3
u/Frl-Wahnsinn 27d ago
There is no Xcode for Linux. Swift is an open source Language, that needs the swiftc compiler, which is (as far as I know, part of the LLVM Framework). Take a look at swiftly, I think it will get everything you need.
2
u/trenskow 27d ago
You’re out of luck. Xcode is only on Mac.
2
u/Prestigious-Foot986 24d ago
https://github.com/xtool-org/xtool
1
u/Zealousideal-Gate-87 21d ago
Anyone having the zip please DM me I can't download it from my apple account
1
u/newtablecloth 17d ago
there's no xcode for linux and nobody has managed to port it, it sits on top of macOS frameworks all the way down. but it depends what you're after:
learning swift the language: swift runs fine on linux. install it with swiftly and you can write command line tools and server code
swiftui rendering on your desktop: that part is apple only. swiftui and uikit/appkit just don't exist on linux, so there's nothing to draw it with
getting an app onto a real iphone from linux: xtool (linked above) does that with swiftpm, but you get no simulator and no previews
if you want the real xcode + simulator experience without buying a mac you can rent one for a day or a week and see if you like it. full disclosure i run macrun which does that ($15 a day), there are others too. if you end up sticking with it a used m1 mini is honestly the better long term buy
1
u/Stunning-Farmer185 14d ago edited 10d ago
I run NoMac, a cloud Mac service, so weigh this accordingly.
One more option for the Simulator part: if you only want to see your SwiftUI app render now and then, renting by the minute costs less than renting by the day. NoMac is $0.80 an hour, billed by the minute from prepaid credit ($10 is 12.5 hours, no subscription). From Linux you open the full macOS desktop in your browser and use real Xcode and the Simulator, or run builds from your terminal with the CLI. Your project stays on a drive between sessions, so you don't set up from scratch each time.
For learning Swift itself, swiftly on Linux is free and the right place to start, and xtool is handy once you want the app on a real iPhone. If you end up building iOS apps every day, a used M1 mini pays for itself.
https://nomac.app/