Code Inspection: Appcode Vs Xcode (iOS apps)

Unleash the power of debugging with App Code for your apps

Balraj Verma
4 min readAug 30, 2023
Inspect your code using Appcode

Did someone ask you to check the health of our code? If so, could you please respond as quickly as possible with a list of the faults and any recommendations you may have. What would happen if you had recently joined a team and someone asked you to examine the code's health? One can tell if he is part of team for a longer time and participate in each and every calls. Another One is SwiftLint, which we may utilize(We will not discuss about Swiftlint, there are lot of great articles available). I will include one article for Swiftlint next time.

What other strategies will you employ, though? Ever heard of AppCode?

I'm not sure whether all of you heard about AppCode, so JetBrains, the same firm that created popular IDEs like PyCharm and IntelliJ IDEA, is the one that developed Appcode. A single IDE that supports a variety of programming languages and platforms may be convenient if you are developing for many platforms. But we will only cover specific use for iOS usage.

AppCode is known for its advanced code analysis and intelligent code completion features. It often provides more accurate suggestions and offers various refactoring options, which can enhance your productivity and help you write better code.

Now you can run your iOS code on Windows too, without installaing MacOS …🥸!!!

Although JetBrains no longer provides commercial support for Appcode (AppCode has been discontinued by JetBrains for commercial support), this type of analysis can still be carried out by downloading the software and signing up for an account.They released their final version on January 23.

When i used Appcode for code inspection, I was amazed to realize that it actually have good features that Xcode lacked. Perhaps Apple will release all of those in the future, but we never know.🤔. Let’s see an example,

To demonstrate this example, I used Apple’s code from here. Once you Download the Appcode(it is Paid, not free 😔, But you can try a free version for a month with all features) for your machine either Mac or Window you open your project in to IDE and select this menu Code → Inspect Code. Once you tap on it, you will see a prompt like the one below.

Appcode’s Inspect Code window prompt

Once you tap on Analyze, it will list down all of the warnings and errors. And you can see the error window like the one below.

Error logs for errors in iOS app

So, you can expand the error for more information, as I did with the highlighted grammatical error. It can list out error for your localization missing, grammatical erros, if any, any improper usage of initialization methods (init), markdown error, natural language will process proffreading and will suggest if is there any error, and so more. Very helpful for apps with a lot of textual information, such as those for exams, education, or apps with a lot of localization strings. I don’t believe there is now a tool for iOS apps that can list your grammatical errors, errors for strings where you forgot to provide localization, etc. This could save literally a lot of time for a developer quickly to find out there grammatical error and correc them, quickly to find out any missing localization etc;

Another fantastic feature is that Error tree has several child nodes, such as warning, markdown, swift, xml, etc. However, if someone wants to avoid seeing a particular child node, they can select that node and remove it. Isn’t it a good option to only focus on what you exactly need. See the example below

Exclude error node from logs

Although you are free to build your own error generation query, I believe that Swfitlint is more elegant(via writing your own lint rules i.e see my gist for example) in this case since we have much easier options available there in the framework. But how it support to create your own error analyzer see the screenshot below.

set up your query for your code inspection

Bonus: It also features a Power Saving option, which isn’t useful for code inspection, but it’s worth considering because occasionally, when you launch a project in Xcode, the indexing process takes longer than four to five minutes if code base is large. Thought of worth mentioning.

That’s it, I appreciate you taking the time to read this post, and I thank you. Comment or clap if you found it helpful. And i see you in next one 👋

--

--