TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Xcode users – how do you make it more usable?

78 pointsby isomorphover 2 years ago
I’ve come from JS in VSCode (with loads of extensions) to Swift in Xcode. In XCTest, I miss the red and green diffs between expected output and actual output. In Xcode itself, I miss the ability to perform code refactoring easily (extracting code to new files etc - more than just extracting to new functions). I also miss linting &#x2F; prettier.<p>What tools and plugins for Xcode do you all use to make developing Swift in Xcode faster and easier? General Xcode hints and tips welcome.

21 comments

danpalmerover 2 years ago
Lots of people mentioning AppCode as a replacement, but damn JetBrains apps suck if you&#x27;re used to macOS. Basic things like windows misbehaving, poor multi-monitor support (yes, really), and being unusably slow for almost every aspect of the user interface. I could go on, but if you hate Xcode I think you&#x27;ll find AppCode to be just a different set of crap. If you like using a Mac you&#x27;ll positively hate AppCode.<p>I personally have little problem with Xcode now. My recommendations would be: don&#x27;t use the built-in source control integration, it mostly sucks. Get an M1&#x2F;M2 Mac, the speed boost is great. Use a lighter weight editor (not IDE) for editing data files, large text files (&gt;5k lines) and for anything that&#x27;s not Swift&#x2F;Obj-C&#x2F;UI work. And lastly, stay up to date. Xcode has crashed much less for me on 12&#x2F;13&#x2F;14 than it did on ~9&#x2F;10&#x2F;11.
评论 #32973954 未加载
评论 #32975164 未加载
评论 #32973544 未加载
a9exover 2 years ago
1) Here are some tips &amp; tricks for refactoring: <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;xcode&#x2F;finding-and-refactoring-code" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;documentation&#x2F;xcode&#x2F;finding-and-...</a><p>The “rename in project” and “rename in scope” functions are quite neat.<p>2) Check out SwiftLint: <a href="https:&#x2F;&#x2F;github.com&#x2F;realm&#x2F;SwiftLint" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;realm&#x2F;SwiftLint</a><p>I have not used it in a while, but it comes with good defaults and is highly customizable to your own preferred Swift style.
评论 #32972797 未加载
nchaseover 2 years ago
I don&#x27;t spend very much time in Xcode.<p>I try to use the command-line tools instead.<p>xcodebuild and xcrun are solid. check out xcpretty[^1] to improve the output of xcodebuild.<p>Here&#x27;s a blog post that someone wrote about using xctest from the terminal with xcpretty to make the output nice: <a href="https:&#x2F;&#x2F;mokacoding.com&#x2F;blog&#x2F;running-tests-from-the-terminal&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mokacoding.com&#x2F;blog&#x2F;running-tests-from-the-terminal&#x2F;</a><p>[^1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;xcpretty&#x2F;xcpretty" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;xcpretty&#x2F;xcpretty</a>
KMnO4over 2 years ago
Check out AppCode by JetBrains. It reduces the need to use Xcode by 90%.<p><a href="https:&#x2F;&#x2F;www.jetbrains.com&#x2F;objc&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.jetbrains.com&#x2F;objc&#x2F;</a>
zkirillover 2 years ago
1. Have a dedicated Apple machine for Xcode. Don&#x27;t put anything else on it.<p>2. Reformat (clean install) machine every 1-2 months.<p>3. Upgrade machine every 1-2 years.<p>* Regularly export and back up your Xcode developer profiles and certificates.<p>* If you&#x27;re thinking about doing something fancy, don&#x27;t. It will come back to haunt you in ways you cannot even imagine.<p>Source: 10+ years of iOS development.
评论 #32972822 未加载
评论 #32972388 未加载
评论 #32972775 未加载
评论 #32972628 未加载
评论 #32973722 未加载
评论 #32976462 未加载
评论 #32972371 未加载
评论 #32973641 未加载
评论 #32979947 未加载
评论 #32985058 未加载
评论 #32978272 未加载
评论 #32979394 未加载
评论 #32975160 未加载
princevegeta89over 2 years ago
By switching to AppCode. In my experience Xcode sucked
ProfMeowsworthover 2 years ago
Swiftlint[1] is nice and can be integrated into Xcode’s warning panel. For auto-formatting, you can press CTRL-i on any selection to auto-format.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;realm&#x2F;SwiftLint" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;realm&#x2F;SwiftLint</a>
Arcanum-XIIIover 2 years ago
I developed in ObjC till 2016, so my opinion are dated but:<p>- Xcode is an acquired taste. A bit slow and crash prone, but most of my issues came from the frameworks. Completion and linting were good enough and the integration with dtrace was enough to help me move faster than my colleagues. I even did use Xib :D<p>- I tried multiple time app code: it’s not good either. In fact, I don’t like most of the jet rains product, but they’re easier to set up than the competition so….<p>- but now I’m back to nvim or emacs.<p>I don’t develop as my job anymore, so my tooling seems pretty barebone to what seems to be the trend :) I nearly make do with the Processing&#x2F;Arduino IDE and they’re both horrible.
评论 #32973123 未加载
评论 #32972470 未加载
oneplaneover 2 years ago
I think your main pain point stems from the difference in ecosystems. This is not even a good&#x2F;bad thing, just a &quot;things are done a bit different&quot; thing.<p>If you take a look at the functionality that you are after, perhaps moving out outside of the scope of the editor may help you far more than trying to re-compose the editor to be more like something that it isn&#x27;t.<p>I personally don&#x27;t have much of an issue switching between them, I mostly prefer Sublime Text over everything but it doesn&#x27;t have the features I need for everything so I just use whatever tools the project needs the most. For iOS and macOS the whole workflow split in two parts: a common CI part where all the external tools run, and the in-editor part where you mostly just write the features you want. This applies to AppCode too, but we also do that for C# code where it really doesn&#x27;t matter if you do it in Rider or Visual Studio on Mac, Visual Studio on Windows or Visual Studio Code anywhere. In the end, the pre-commit and CI tasks will do the common workflow anyway.<p>While I understand that people enjoy digging deep into the features of a single specific IDE to do everything, in reality this is probably not the &#x27;best of all worlds&#x27;, unless you are working solo.
manmalover 2 years ago
One thing I‘ve really come to appreciate (applies to all code editors) is to actively use keyboard shortcuts for moving selected lines up&#x2F;down, and for deleting the current line. Vim users will be used to this anyway, but for the rest of us it’s a great way to code faster.<p>The other thing (since Xcode‘s clipboard feature is IMO clunky) is to use a clipboard manager with the history set to a decent size. I use Paste (happens to come with SetApp) and never once lost a copied snippet - it‘s rock solid. I’ve developed a habit of just copying whole files in case I want to revert to that state (or partially) later.
tcldrover 2 years ago
Xcode definitely has it&#x27;s issues but I think they&#x27;re moving to a system where Swift, and the Swift Package Manger specifically, can provide a bunch of this kind of functionality.<p>Take a look at this &#x27;Meet Swift Package Plugins&#x27; talk from WWDC 22 which goes into detail: <a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;videos&#x2F;play&#x2F;wwdc2022&#x2F;110359&#x2F;" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;videos&#x2F;play&#x2F;wwdc2022&#x2F;110359&#x2F;</a><p>What&#x27;s nice about this is that it&#x27;s not restricted to Xcode, it can be integrated with your CIDI, too.
Cloudefover 2 years ago
Use xcodebuild and forget xcode
jdmoreiraover 2 years ago
I have one single tip. Don&#x27;t use storyboards &#x2F; nibs. Write all you view code by hand. Stackviews and your own layer of helper functions are you friend. I can write UI faster in code than would ever be possible in nib tooling. To say nothing of managing conflicts in those files. You won&#x27;t look back!
jasmesover 2 years ago
I’d just switch to JetBrains AppCode, but I’m very partial to their IDEs.
boukover 2 years ago
Remove the print key binding and bind quick open to cmd+P
评论 #32972552 未加载
评论 #32976592 未加载
stoeckleyover 2 years ago
for me, main thing is turning on the (now native) vim emulation which is decent though missing some things (dot operator please!), and learning the keyboard shortcuts for the various UI panes<p>for &quot;prettier&quot; all I&#x27;ve ever needed is just auto indentation of a block, which works fine<p>other than that, I just submit to what Xcode is and live with it
pixel_tracingover 2 years ago
Everything you mentioned is possible and going from Xcode =&gt; VSCode I have the same experience
throwaway1777over 2 years ago
You get used to it. I don’t find myself missing any of those functions.
Jemmover 2 years ago
VM on pc with lots of ram. Works fine for me.
评论 #32985104 未加载
lizardactivistover 2 years ago
You don&#x27;t. You ignore it and use AppCode instead.
评论 #32973718 未加载
pgtover 2 years ago
I improved Xcode usability by ceasing to make iOS apps.