Increase your iOS development productivity with AppCode.
divine dubeBlockedUnblockFollowFollowingApr 29The de facto IDE for iOS and Mac IDE is Xcode and it’s a good IDE but I feel like it can be better.
As a “lazy” developer I am quick to notice things that can be automated, so I usually get frustrated when I find out that I cannot automate many mundane tasks that I do in Xcode.
I find it very frustrating developing using Xcode, even more so coming from an Android(Kotlin and Java) development background where we are spoilt with the rich functionality of Android Studio, on the contrary, Xcode feels like the old eclipse Android days ????.
…I felt limited by the current technology…I am very familiar IDEA-based IDEs from JetBrains, at university, I was a JetBrains Campus Ambassador where if you are a student you can get access to all JetBrains tools for free, so I decided to try out AppCode.
AppCode is an Intelligent and modern IDE created by JetBrains and if this does not mean anything to you, you must just know that it was created by really smart people.
AppCode to the rescueI will now cover some of the awesome features of AppCode as well as some of the things I find annoying.
I will discuss the good parts of AppCode and lastly, I will end with the bad parts, good news first right, let’s get right to it!The GoodSince AppCode is an IDEA based IDE, by default it comes with awesome and powerful editing features that Android Studio users and IntelliJ IDEA users enjoy daily; I will now highlight a few features that make my daily iOS development workflow a pleasurable experience.
AppCode tip of the day startup dialogTIP OF THE DAY STARTUP DIALOG Above is the popup dialog that shows whenever AppCode starts, one useful tip would be to read the first one that pops up every day you start the IDE, close the window and try it out, it only takes ~45 seconds.
The more of these shortcuts you incorporate into your daily workflow the more productive you become and the less you will use your trackpad/mouse.
AppCodes version of the Mac Spotlight (Search Everywhere)SEARCH EVERYWHERE Is like the Mac OS’s spotlight built into your IDE, you trigger search everywhere by Double ⇧ (double click shift).
In search everywhere, you can search for anything from your IDE settings to your source code files.
Search everywhere is even more powerful than Spotlight, let me summarise what I am trying to convey with a GIF ????Awesome AppCode search everywhereSo simply by hitting Double ⇧ and typing view/SLVC:34 I was able to go to line 34 of the file SongsListViewController.
Whilst in that file you can go to a specific line by hitting ⌘L.
If you don't know or you forgot certain shortcut keys you can search for them using Search Everywhere(Double ⇧).
I always forget how to reformat my code so I search for it in Search Everywhere, then when it comes up, the IDE shows me the short cut keys as well as allowing me to select it and it will reformat code of the current file.
The keyboard shortcut to reformat code is ⌥⌘L ????,Locate file iconNow that you have found your source code file, but you don’t know in which group this file belongs and you want to make sure that it is indeed the right source code file, you want to edit so by clicking the locate file Icon.
You can locate where the source file is in your source code file hierarchy, it’s located in the Project tool window, look at above Image(Awesome AppCode search everywhere)Line 192 to line 212 without foldingCustom folding for line 192 to 212By default, AppCode provides code folding for classes and functions but you can also create your own custom folding, like for long closures like the one above, the hotkey for that is: ⌘.
(cmd + .
)Furthermore, notice that at line 186 that the type for user GIDGoogleUser is in grey as well as the type for authentication.
This is called type hints so AppCode can show you the type of your variables inside functions as you code which is really handy for me because at a glance I can quickly understand my code better.
The IDE is intelligent as you would expect a JetBrains IDE to be, it has a spell checker and it also warns you of some unintended logic errors, which I also find helpful in learning more about Swift or why I should use certain constructs over other constructs, for example, if-let vs guard statement.
App code helps solve merge conflictsAwesome AppCode git featuresGit is an integral part of software development and AppCode treats it as such.
You can do all the day to day things that everybody uses Git for: commit,push, merge, add, stash but AppCode does more; it also highlights files in project files depending on their git-status, are they in staging, committed, changed or not being tracked but that's not all!.I will highlight the extraordinary Git features that AppCode has:App code helps solve merge conflicts: If you use the AppCode Git GUI (via VCS menu item) and there is a merge conflict AppCode can help you select which line segments you might want to keep and which ones you would like to discard, then you can accept the incoming changes or you keep the changes that you made and discard the incoming changes.
Awesome AppCode git features: Clicking the VCS tool window at the bottom, please note that sometimes you might have to first enable Git integration by clicking the VCS ->Integrate VCS, it will show you a pretty git-branch graph of all your commits, hotkeys: ⌘9.
Here you are also able to see staged files and also unstaged, nicely grouped, see diff and also you can stash selected files, in the same tool window clicking the Log tab you are able to see the file that got modified/added/deleted for any of your commits.
MiscNext, to the VCS tool window, you will get the access your terminal within the IDE.
All your comments which are marked with //TODO, are all aggregated so that you can see all the todo items in your whole project, of course, you can also easily drill down to see all the TODOs for a specific fileSee the parameters to a function, ⌘PBring documentation popup for the function where the cursor is, ⌘JContextual selection ⌥↓ or ⌥↑, I recommend you try this one it’s really cool, it makes it easy to select parts of your code like parameters to a function, strings that you want to delete/cut/copy.
Easily duplicate a line by placing your cursor on that line.
History of 5 most recent copies ⇧⌘V, for example, you can copy two items one after the other and paste those two items without pasting the same thing ????Look at how a function, class, property is defined anywhere in your project from where it is being used, ⌥ SPACE will show the quick definition pop up.
To show recently opened files, ⌘E or ⌃⇥ to quickly switch between open tabsThe multiline selection feature, words cannot describe this type of magic, let’s use a gif ????:Multiline selectThe IDE comes with a keymap reference PDF you can find it here Help -> Keymap ReferenceThe Not So GoodWhen a force unwrapping optionals fails at runtime AppCode does not tell you the line where the force unwrap happened.
AppCode has no Interface Builder but when you click on any storyboard in AppCode it will open Xcode which is fine because my primary use for AppCode is because of its intelligent editor and other productivity-related features.
The fact that it doesn’t have IB will not make me any more productive.
AppCode has no debug view hierarchy you would need to install an external plugin called Reveal, with Reveal you can get better information about your view hierarchy at runtime and you can also modify the view hierarchy in real time.
TipsIt’s advisable to always have Xcode open so that you can easily modify storyboard files.
Also easily modify the config xcodeproj files.
It’s good to have the same emulator selected in AppCode and in Xcode so that you can run the app from either of the IDEs and it will not open another emulatorWhen force unwrap fails at runtime, run the same project in Xcode, it will tell you where it happened.
DownloadYou can download AppCode hereConclusionIn conclusion, I really love AppCode and it’s my primary iOS development editor because I am more productive in AppCode than in Xcode.
Another awesome thing is that if you use a language other than Swift or Objective-C like Go, Java, Python, Kotlin, Ruby you name it, JetBrains has an IDE for them too, so the skills that you learn in AppCode are transferable.
If you have any questions or suggestions please feel free to ask me anything by commenting below or via e-mail, my e-mail is dubedivine@gmail.
Happy coding!.. More details