Xcode How To: Naming Your Tests

I noticed something that might be of interest to y’all. At one point I asked my team if the preference was to name test files as MyFileTests or TestMyFile. I’ve noticed that for test files that end with Tests you get this nice output in the Counterparts menu where the test and the …

Xcode How To: Run Tests Without Running All Tests

TIL: if you are running the same test case over and over you can mash ⌃⌥⌘G and Xcode will rerun the last test case you just ran. Importantly this will just run whatever you had run just before. So if it’s a whole test case, it runs that again. If it’s a single test it will run that …

Option clicking a window...

Causes the window you’re focused on prior to the click event to hide. I was trying to remember how to do this so I’m writing it down for future me. This is something I heard @siracusa@mastodon.social talking about on a somewhat recent video epsiode of ATP.

How to fix WatchKit app WeatherKit issues

I made an iOS app that used WeatherKit. Everything was working as expected and recently I wanted to add an WatchOS component. Because I am adding the watch app to an existing iOS app, I added the target in Xcode and made sure to update the capabilities to the watch app so that it could use …

Xcode How To: Edit all instances of a word in a file with a keyboard shortcut

Menu: Editor -> Edit All In Scope (also shows key binding) Keyboard Shortcut: Control-Command-E I have used Xcode’s Refactor command many times and while it’s nice and useful, it is always buggy and really slow. Sometimes I just want to quickly edit something in the file I’m …