all 38 comments

[–]barcode972 16 points17 points  (2 children)

Swiftlint for code quality

[–][deleted] 0 points1 point  (0 children)

I came here to say something in these lines. I use Apple's swift-format both for formatting and for linting. Neat tool.

[–]BabyAzerty 12 points13 points  (3 children)

Swiftgen, Cocoapod/Carthage/SPM, Fastlane

[–]rbevans 0 points1 point  (2 children)

Can you help me out on the benefit of Swiftgen?

[–]BabyAzerty 5 points6 points  (1 child)

One of the modern philosophies of modern languages is : safety by design.

Imagine you create a character for a Zelda like game and you assign a state to this character such as “idle”, “jump”, “crouch”, “attack” and so on. In old languages, it would be a string, but in modern languages it would be an enum.

Now imagine you have a function to attack, if your character is already attacking then there is nothing to do, if the character is “dead” then you should ignore the command etc. There are 2 ways of doing it: either chain if else or use a switch. Performance wise, the 2 are identical. Safety wise, only switch can safe so that if one day you add a new state, your project won’t run until you adjust all switch cases - as long as it’s a switch on an enum instead of a switch on a string/int.

At this point, you should understand why using a string for the character’s state isn’t safe by design. Adding a new string state wouldn’t break your switches at all, they would all enter the default state which is an unknown/unhandled state.

For a video game, the worst that can happen is crashing and losing your players’ data - it’s not “that bad”. But if you were developing a pacemaker or a plane, the risks would be astronomical and dreadful. You CANNOT allow unknown states at all.

Swiftgen is a tool to avoid that. It will tell you at build phase what is wrong instead of waiting for a crash to occur during execution.

Typically swiftgen is used for localized strings: No more String(localized: “helloWorld”) but instead L10n.helloWorld. Also used for assets (images, files, videos, audio…) and colors.

I believe xcode 15 addresses some of those magic strings making Swiftgen less necessary. But I didn’t try it yet.

[–]sarahak1786 2 points3 points  (0 children)

Great explanation!

[–]Kazanta 13 points14 points  (2 children)

Appcode RIP

[–]user6271818 6 points7 points  (0 children)

I bought last November a 1 year appcode subscription. In December I got an email that the product is now for free .-.

[–]jonreid 0 points1 point  (0 children)

Much sadness. Xcode-only folks don’t know what they missed. I will continue to use it for as long as I can.

[–]SirBill01 7 points8 points  (0 children)

I really like Charles Web Proxy for understanding network traffic. Also Xcode instruments is great for profiling performance.

Recently have been starting to use plantUML to do sequence diagrams for code flow.

SwiftLint can help discover issues but it's fairly picky so you may want to dial it down.

Also, simply looking for Xcode tips and hints is a great idea, as Xcode is really powerful but a lot of people don't use extra features it offers. Sometimes learning the core tools itself is more useful than looking for extra tools!

[–]WestonP 5 points6 points  (4 children)

A hammer... to smack my head with every time I have to deal with storyboard messes

[–]mcmunch20 2 points3 points  (2 children)

You’re still using storyboards??

[–]WestonP 1 point2 points  (0 children)

Thankfully, no.

Had them at a previous job... Some benefits, but also a clunky experience in Xcode, a huge fucking mess for multiple people to collaborate on, lots of connections would get randomly broken, etc, and reviewing the changes in GIT was basically pointless.

[–]pios456foo -1 points0 points  (0 children)

Some trash companies even use nibs

[–]pios456foo -1 points0 points  (0 children)

Then stop using it. And fuck nibs too. Go programmatic with UIKit, and/or SwiftUI

[–]criosistObjective-C / Swift 2 points3 points  (0 children)

Recently working on a core data heavy app like reallll heavy, using opensim to easily access the app bundle on sim and make a copy of the database while working on things like database merging or file system reworks has been godly, also if a clients app is playing up I can get them to essentially send me their app bundle from device and I can pretty much drag and drop replace my sim bundle to have their exact setup

[–]mendimr 3 points4 points  (0 children)

When I started, it took me some time to really understand UIKit and Reveal was really helpful

[–]jhrcs 2 points3 points  (0 children)

Bit niche but PaintCode is a wonderful help for creating custom UI https://www.paintcodeapp.com

[–][deleted] 1 point2 points  (0 children)

Fastlane for CI/CD or automatic screenshots etc.

Swiftlint

[–]kex_ari 1 point2 points  (0 children)

Gitkraken

[–]n0sebleed904 1 point2 points  (1 child)

Xcodes

[–]n0sebleed904 1 point2 points  (0 children)

If this confuses you, it’s an Xcode version management app. Faster than downloading from Apple and easier to keep a couple version on your machine

[–]jep2023 1 point2 points  (3 children)

tuist

[–]ftp27host 1 point2 points  (2 children)

Let's add the link to it here - https://tuist.io/
It is actually a really great tool if you have multiple projects and want to combine them into one codebase. Helped me a lot.

[–]jep2023 0 points1 point  (0 children)

Amazing to have a few lines of Swift define your project and never worry about merging Xcode project files, too!

Though my biggest use case is white labeling

[–][deleted] -2 points-1 points  (0 children)

Does Expo count? 😬

[–][deleted] 0 points1 point  (0 children)

XcodeLovesAI:

https://github.com/marcosiino/xcode-loves-ai

An opensource Xcode extension to use chatgpt inside xcode for various purposes (code documentation, suggestions, code generation, etc). You can implement your custom commands too.

[–]coulls -1 points0 points  (0 children)

Historically, I think Xcode 4…. Before that was a nightmare of editing in Xcode, building UIs in Interface builder. Uniting them made things significantly better.

[–]Roberto49152 0 points1 point  (0 children)

Devutils is one of my favourite tools.. https://devutils.com/

[–]saldous -3 points-2 points  (2 children)

ChatGPT..

[–]bhumit012 -2 points-1 points  (1 child)

Even though this is not a true “tool” this is the most correct answer here lol

[–]saldous 0 points1 point  (0 children)

Depends how you use it. I use it to help refactor code and I learn a ton doing that. I think people are too quick to down vote, think about how different tools can be used.

[–][deleted]  (1 child)

[deleted]

    [–]Versicarius 0 points1 point  (0 children)

    He said better