• lwouis a day ago

    This tool says "Xcode replacement" and "Xcode-free development". I thought there is no way they can build apps without Xcode. How would they replicate the libraries, compilers, etc.

    I dug more and of course they don't: "Though we don’t rely on the Xcode build system, you still need to install Xcode for the iOS SDK and toolchain"

    I think they should clarify their messaging. This is not a replacement or an alternative. It's a layer on top designed for what they think is a better experience.

    • rockbruno a day ago

      I think you are mixing some different concepts here. It's not that this is a layer on top of Xcode/xcodebuild, it's just that Apple today happens to package everything iOS/Swift-related together with Xcode releases. So even if you couldn't care less about the Xcode IDE itself or the xcodebuild build system, you still need to have it because this is the only way for you to download / install those toolchains. Apple could provide these separately, but they just don't.

      • kabiroberai a day ago

        xtool creator here, this is correct. it wouldn’t have been possible to support Linux if xtool was just a layer on top of Xcode, as Xcode doesn’t run on Linux.

        we only need Xcode to be installed on macOS since it bundles the iOS SDK (ie all the header files.) similarly, we ask the user to supply a copy of Xcode.xip during the setup process on Linux in order to extract the SDK.

        it definitely depends on your definition of “replacement” in the end, but I (and most people I’ve spoken with in the iOS community) would consider “Xcode” to be the Xcode build system, user interface, and proprietary tooling. xtool doesn’t rely on any of this, not even for signing and installation. you can (read: must on Linux, may on macOS) use it with the open-source Swift and Clang toolchain + LLVM’s LLD linker and MachO tooling. Codesigning uses zsign, an MIT-licensed x-platform codesign alternative, and installation relies on the open source libimobiledevice project, which is installed by default on many Linux distributions (eg Ubuntu).

        • lwouis 10 hours ago

          I've been developing a fairly popular macOS app for years. I consider myself in the community for that reason.

          Apple has bundled everything together in a big mess.

          - Only certain macOS versions can run certain XCode versions

          - Only certain XCode versions contain certain SDK versions

          - XCode embeds "Command line tools" which contains things like gcc, ruby, python, installed as a package, and conflicting with other versions on the machine

          - Interface Builder is built into XCode and has its own compatibility story

          It's a big messy blob and you can't pick-and-choose parts. You have to update your whole machine to move to the latest OS so they will let you run the latest XCode, so your app can compile on the latest platform for your users. It's not the best experience for sure. Many ecosystems have SDKs that you can download as you wish. I don't need to update my OS to download a version of the JDK for example.

          That being all said, if you require users to download XCode, regardless of which part of it is necessary, i don't think you should mention "XCode free experience" or "XCode replacement".

          I'm already developing a macOS app without launching the XCode GUI. I use the xcodebuild CLI that ships with XCode. My IDE is AppCode. I also use xcodebuild on CI to build the app headless. I would never call that a XCode free experience though, as i suffer from all the issues i mentionned above with version upgrades and XCode issues

          • rushiiMachine 16 hours ago

            I'm not too familiar with the xcode dev environment; could Theos be used instead of the huge xcode bundle? As far as I know, it provides the compilers and frameworks directly.

            • kabiroberai 7 hours ago

              I’m also one of the maintainers of Theos :)

              When you use Theos outside macOS, you have to install a toolchain and SDK. The toolchain is built from LLVM + cctools, and is in fact very similar to the one we use in xtool (I maintain both.) The SDK is hosted on GitHub and I could’ve decided to use this instead of getting the user to supply a copy of Xcode, but the copyright status is iffy; there’s an argument to be made in light of Google v. Oracle but I didn’t want to take any chances.

          • notpushkin a day ago

            Would it be possible to get just the SDK from the Xcode package? Like Asahi installer streams only the relevant parts of macOS images from Apple’s servers.

            • kabiroberai a day ago

              I looked into streaming but afaict the XIP format doesn’t support random access the same way that ZIP does. specifically because 1) it doesn’t seem to have a Central Directory like ZIP and 2) it has an optimization where files can be hardlinks to other files (by ID) in the XIP, so if you want to extract a file but all you get is a hardlink ID, you can’t expand the contents until you encounter and expand the hardlink pointee. it’s possible I’ve missed something, open to ideas for sure.

              • notpushkin 14 hours ago

                I do have an idea that will add a lot of complexity for sure: you can extract Xcode, mapping out whick portions of the archive correspond to the SDKs we need, then use this mapping to only download these relevant parts, reconstruct the archive and expand it. Not sure if it’s worth it!

              • isodev a day ago

                There are some components that may be downloadable separately but they really are part of Xcode. One ring to rule them all.

              • ImPostingOnHN a day ago

                It sounds like this "cross-platform xcode replacement" isn't cross-platform, and ios app developers still need macos?

                • dadoum a day ago

                  But that's wrong. You don't need macOS. That's why they say "cross-platform Xcode replacement". You just need the SDK, which can be used on every platform.

                  • mathstuf a day ago

                    IIRC, you need to run on Apple hardware for a valid SDK license. VM or Asahi or Hackintosh would suffice, but not a VM on a random Linux box. Or did the terms change lately?

                    • undefined a day ago
                      [deleted]
              • firecall a day ago

                JetBrains used to develop AppCode:

                  AppCode
                
                  A smart IDE for iOS/macOS development
                
                  AppCode is no longer available as a commercial product as of December 14, 2022.
                
                  https://www.jetbrains.com/objc/
                • lwouis a day ago

                  It seems that Fleet will support building XCode apps. It looks like a big regression from AppCode. As of today Fleet doesn't compile my macOS app. I try regularly on new updates. No alternatives, unfortunately

                  • Larrikin a day ago

                    Fleet will also most likely get abandoned as people who pay for an IDE highly prefer the older one and people who want VSCode use VSCode

                    I also think any revival of AppCode is also dead as JetBrains is all in on Kotlin everywhere. iOS multiplatform support hit stable recently.

                    • sandebert a day ago

                      What's Fleet?

                  • mdaniel 19 hours ago

                    It likely doesn't help the ObjC part of that story, but they moved the Swift part out into a CLion plugin https://plugins.jetbrains.com/plugin/8240-swift

                    Regrettably I didn't see that they did anything with the ObjC part, choosing to /dev/null it

                  • zh3 a day ago
                    • flax 2 days ago

                      Would this theoretically allow a Flutter app developer to build and deploy an ios app from Linux? God, I hope so.

                      • candiddevmike 2 days ago

                        It technically violates the Apple Developer Agreement AFAIK, but that seems like yet another lawsuit waiting to happen IMO.

                        • ronsor 2 days ago

                          Apple won't do anything right now as they're certainly afraid the courts* will slap them hard.

                          *Both US and EU now

                          • saagarjha 2 days ago

                            They’re still rejecting Fortnite so I don’t think they’re particularly scared of anything

                            • jchw a day ago

                              Epic Games sure is proving to be a formidable opponent, but they might be getting a little optimistic with thinking that Fortnite will be allowed to return to the App Store; after all, while they have been squabbling over App Store policies, I don't think any of the rulings imply that Apple still can't keep specific titles banned from the App Store at their discretion. In that particular case I kinda feel like Apple might be right to not be afraid, at least not right now.

                              (P.S.: Personally, I initially thought Epic Games was stupid for flagrantly violating the ToS on purpose. Was that really needed to actually file the lawsuit? I dunno; I'm no expert. But it looked stupid. It looks a lot less stupid now, but it still kinda looks like a tactical mistake.)

                              Maybe they needn't be afraid here either, but from a risk perspective it does seem like causing a stink here may not be their best move. They're still going to aggressively try to railroad people into developing on Mac; there's no iPhone Simulator on Windows or Linux after all.

                              • yard2010 a day ago

                                IMHO it's a matter of principle, showing the bully he has limited power no matter how big his muscles are.

                                • chuckadams a day ago

                                  In Epic's case it's just another bully who wants a piece of the first bully's turf.

                                  • solarkraft a day ago

                                    Epic Games may do some despicable things too (this is about micro-transactions after all), but (as a software developer) in this fight I still find it reasonable to root for their side - them winning improves the world for a lot of us.

                                    • tough a day ago

                                      Goliath vs Goliath

                            • petabyt 2 days ago

                              People have been doing hackintoshes and macos VMs for years... And apple hasn't really done anything. So I doubt this tool will provoke them.

                              • karlgkk a day ago

                                A long while ago, they put some company selling hackintoshes straight into the ground. Nobody tried since

                                • conception a day ago

                                  Apple has killed the Hackintosh…. It’s just bleeding out still.

                                  • ofrzeta a day ago

                                    How so? Seems like Hackintosh got kind of obsolete with Apple Silicon.

                                    • cyberax a day ago

                                      You can't install XCode on non-Apple devices. Or use iMessage.

                                      • johnisgood a day ago

                                        Is this the case? How does that work? Genuinely curious. I remember I had macOS (Mac OS X, actually) on my PC. My last Hackintosh was Mac OS X Leopard. Everything seemed to work well... back then. I even had XCode working.

                                        • cosmic_cheese a day ago

                                          iMessage can be made to work with a hackintosh. You just have to go the whole way in making your hackintosh fully Mac-like with a fake but plausible/realistic serial number and expected network setup. You can’t stop at just getting macOS installed and booting.

                                          I’ve had multiple installs in the past where it worked fine.

                                          • jonhohle a day ago

                                            Who minds committing a little wire fraud and possibly screwing over some chump who really owns that serial number?

                                            • cosmic_cheese 21 hours ago

                                              How is it wire fraud?

                                              While it’s ultimately up to the person doing the hackintoshing and thus an “honor system” thing, all the guides are pretty explicit about how you should generate serial numbers that are syntactically valid but cannot belong to real machines, for example that of a 12” Macbook manufactured in 2020 in Cork, Ireland (no such machine exists, as they were discontinued in 2019 and manufactured in China). That way there’s a small chance of collision with other hackintoshers, but no threat of accidentally using the serial of someone’s real Mac.

                                          • zImPatrick a day ago

                                            you can still install xcode - and also still use imessage if you configure your vm correctly, see kholia/OSX-KVM

                                    • notpushkin a day ago

                                      I believe it allows usage on “Apple-branded computers”, so building iOS apps with xtool on Asahi is probably legit.

                                      But yeah, I would probably use this for testing only, and do actual releases from macOS proper.

                                      • nar001 a day ago

                                        Does it? You still need to install Xcode for the iOS SDK, so they're not really doing anything wrong?

                                        • tgma 2 days ago

                                          IIRC it is only a potential issue if the host machine isn't made by Apple. You can install Linux on a Mac and use this.

                                          IANAL yada yada.

                                          • _blk 2 days ago

                                            Yeah weird world. When Gates bundles IE that no one wants it's an abuse of power but when Jobs shoves his apples down your throat just to (try to) publish for their platform it's all OK.. Oh, or was that the lawsuit waiting to happen? ;)

                                            • freeamz 2 days ago

                                              Same thing with the bank bail out, if Bush did oh my we will never hear end of it, but if cool president who smokes weed and get down some good music, then no one really call him out on it.

                                          • loic-sharma a day ago

                                            This project helps but isn’t enough alone:

                                            1. Dart can’t cross-compile from Linux to iOS yet. You could use Dart’s interpreter instead, but that’d significantly regress performance.

                                            2. Flutter iOS projects use the Xcode project format, you’d need to migrate that to xtool’s project format

                                            3. Flutter hasn’t finished migrating its plugin ecosystem from CocoaPods to SwiftPM - any plugin that hasn’t migrated to SwiftPM yet likely won’t work with xtool.

                                            • Cloudef 2 days ago

                                              Afaik its already possible with darling. Nixpkgs also has xcbuild replacement, but not sure if it can handle codesigning.

                                              • gman83 a day ago

                                                Just use something like CodeMagic, I wouldn't risk getting your Apple account banned.

                                              • awinter-py a day ago

                                                xcode, the tool that takes 9 hours to download every few months and makes random edits to my XML and plist files? that xcode?

                                                • novoreorx 13 hours ago

                                                  Reminds me of Sweetpad (https://sweetpad.hyzyla.dev/), which is a bit tedious to setup, XTool seems to provide a better DX, huge wish for this project to grow!

                                                • walterbell a day ago

                                                  Earlier, "Build iOS Apps on Linux and Windows", https://news.ycombinator.com/item?id=43952239

                                                  • jasau 21 hours ago

                                                    Would be cool to have similar tooling (de-attached from XCode) for live previewing interfaces built with Swift UI.

                                                    • bdcravens a day ago

                                                      I see the Github org is "xtool-org". I wonder if XTool the company (makes laser engravers and other creative/crafting tech) will take issue.

                                                      • waynecochran a day ago

                                                        The screenshot has a vscode icon?

                                                        • bdcravens a day ago

                                                          Yes, because the tool itself is just a command line app, replacing the build tools, but not the IDE. You edit the code in your tool of choice.

                                                        • pjmlp a day ago

                                                          More likely a command line xcodebuild replacement.

                                                          • woleium 2 days ago

                                                            no android support?

                                                            • landr0id 2 days ago

                                                              ...this is for building apps targeting iOS and macOS on non-macOS platforms. Why would Android support be necessary?

                                                              • thayne 2 days ago

                                                                So you can build iOS apps on your android device?

                                                                If for no other reason, it would be gloriously ironic.

                                                                • woleium 2 days ago

                                                                  Oh, i misunderstood. my bad!

                                                                  I thought it was for compilation of ios apps for linux and macos.

                                                                • undefined 2 days ago
                                                                  [deleted]