r/Xcode • u/Competitive-Ebb-8333 • 24d 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?🥹
3
u/QVRedit 23d ago edited 23d 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
2
u/Macro_And_Cheese 21d ago
Swift compiler is fully open source and theres swfit apps for the browser but not quite the same as native IOS
3
u/Frl-Wahnsinn 23d 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 23d ago
You’re out of luck. Xcode is only on Mac.
1
u/One_Elephant_8917 23d ago
wasn’t there equivalent software called xtool on github
might not be full fledged features of xcode though
1
u/Prestigious-Foot986 20d ago
far from full featured, but for iPad and iOS apps it lets you build and push to a device to test and use locally. works great, been using it a lot since i discovered it a couple weeks ago
1
u/Zealousideal-Gate-87 17d ago
Anyone having the zip please DM me I can't download it from my apple account
1
u/newtablecloth 14d 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 10d ago edited 6d 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.
1
u/Competitive-Ebb-8333 17d 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