AppCode 2.5 EAP #131.284

Hey everyone,

here goes the last AppCode 2.5 EAP build with various fixes and improvements, including Xcode 5.0.1 support. We plan to publish a Release Candidate build later this week and the final release next week.

There are a few outstanding performance issues that we hope to solve by RC – thanks you for your help and patience.

Here is a direct download link; or you can wait until Check for Updates… in the AppCode’s menu is available.

The AppCode Team

Posted in Announcement | Leave a comment

AppCode 2.5 EAP #131.240: C++ code generation and advanced unit testing

Hey fellows,

we have been working flat out to deliver this 2.5 EAP with quite a few improvements in various areas; first of all we have supported Xcode 5 almost at the full extent, including new iOS devices and iOS Simulator.

And the most noticeable features in this build, as you could have already figured from the post title, are:

  • C++ code generation, such as Override/Implement, constructor/destructor and getter/setter:

  • Boosted OCUnit/XCTest and Google Test support with ability to rerun any number of tests right from the test results tree:

    It is also possible to run all tests in the file – right-click on a file with tests and check the context menu options, or use Run… (Ctrl+Shift+R/D) shortcut in the editor.

  • Clever new intention actions that can quickly simplify and restructure conditional expressions.
    Simplifying boolean expressions:

    Replacing if-else with ?: and back:

    Extracting if-blocks:

  • Also you can now work with Xcode 5 Asset Catalogs right from the project view:

Here is the full list of fixes and changes in this build.

As we are getting closer to AppCode 2.5 release, which is in about two weeks, we are now concentrating on the most critical problems and your feedback is very much welcome.
If you have outstanding issues, please ping us in the tracker to make sure we don’t miss them. We can’t promise to fix all of them, but we’ll do our best to resolve as many as possible.

Also, let us know, if you spot issues with Xcode 5 integration so we are able to fix them timely.

You can download the build manually or wait until automatic update in AppCode | Check for Updates… is available.

The AppCode Team

Posted in Announcement | 6 Comments

New AppCode 2.5 EAP: build #131.144

Hello everyone!

Today a new AppCode Early Access build is available for download. This time we have added support for Xcode 5 GM and 64-bit iOS Simulator.
Your feedback on this is very important to us, so don’t hesitate to share it via forum and tracker if you encounter any issues.

There are a few known issues remain with Xcode 5, though:

  • Compilation reports ‘Failed to register MobileDevices.bundle’ error; it’s harmless and you can simply ignore it. And don’t forget to file a radar report!
  • Debugging 64-bit applications on a 64-bit device may not work properly, should you be so lucky to have one.
  • Standalone unit-tests on a simulator may hang in ‘Run’ mode. To fix the problem kill launchd_sim process tree or use ‘Debug’ mode.

We’ll do our best to fix the remaining issues as quickly as possible.

Among the other highlights, in this EAP build we improved the ‘Set Value’ feature in the debugger, fixed some issues with CocoaPods, and enhanced C++ language support. We also added support for typed and parameterized Google Tests.

And here is the full list of fixes and changes.

Try the build and tell us what you think!
No incremental update this time, sorry for that.

Develop with pleasure!
The AppCode team

Posted in Announcement | 2 Comments

Meet AppCode team members in Paris

Hey guys!

We’ve got some more exciting news! This September we’ll be joining CocoaHeads Paris meetup where we’ll be presenting AppCode to the local community.

We’ll make an overview of our Objective-C IDE, show what makes it stand out and what is different from Xcode, share a whole bunch of tips and tricks about coding productivity, and show some of the features planned for version 2.5.

Whether you are an experienced AppCode user, or just tried it a few days ago, I’m sure you’ll learn a thing or two.

So if you are in Paris area, and are curious about AppCode, feel free to join us and spread the news! We are always happy to meet OS X/iOS developers face-to-face to chat and share ideas.

Date: Thursday, September the 12th
Location and updates you can find at
Thanks to CocoaHeads Paris organisers for inviting us!

See you!

Posted in Events | 2 Comments

AppCode 2.5 EAP opens with CocoaPods and Google Test

Hi everyone!

So everyone is back from vacations and eager to move forward with their projects. To stir up your enthusiasm even further we have some good news in the first days of fall. Today we are opening the EAP program for the upcoming AppCode 2.5 version, so you can learn about the new features as soon as possible.
As usual, the first EAP build is quite packed with all kinds of new things. Let’s take a look at them!

CocoaPods Support
Long-awaited support for popular dependency manager CocoaPods is now available in AppCode with smart features like completion:

and on-the-fly inspections:

You can easily install and update pods using Tools | CocoaPods menu, or context menu in the editor, when a pod file is opened:

Google Test Support
C++ developers will be happy to know that as of today AppCode supports one of the popular C++ testing frameworks – Google Test.

XCTest Support
2.5 EAP also adds full support for XCTest framework: all features available for OCUnit work as well with XCTest.

‘Rerun Failed Tests’ Action
Overall, unit testing has become even more flexible with the new build, now in addition to the ability to run a single test you have an option to rerun all failed tests.

Move Statement Up/Down
We also implemented Move Statement Up/Down (Shift+Cmd+Up/Down) action, familiar to users of IntelliJ IDEA, to move classes, methods and statements around easily. The feature available for Objective-C and C/C++.

‘Set Value’ in Debugger
Now you can manually set a value to a variable when stopped at a breakpoint in the debugger: select a variable and hit F2 to set a value, or use context menu. ‘Set Value’ feature works with local and member variables as well as with Core Data objects. We will also add support to NS-collection and STL-container elements:

And More!
We have added support for External and Aggregate targets with the ability to specify external executable and optimized indexing and memory usage further, especially on branch switching. C++ support was also improved.

Here is the list of all fixes and improvements in build 131.46.

You can find the build on our EAP page. Let us know what you think — take part in discussions on the forum. Bug reports and suggestions are warmly welcome in our open tracker.

Yours as always,
The AppCode Team

Posted in Announcement | 11 Comments

Find Usages: no place for symbols to hide

Find Usages lets you quickly see all the places where a symbol (class, method, property, variable, etc.) is used. Unlike textual search, Find Usages in AppCode works on the semantic level and shows you actual usages, not just text matches. Moreover, it understands and can be used with localization, Core Data and xib files.

Finding usages
Just press Alt + F7 and get a list of references grouped by type of usage, module and file. The first results are displayed immediately. When you have a huge project, more results appear as the IDE finds them.

By default the results are not grouped by usage type, but you can enable this by pressing Ctrl + T or by clicking the corresponding button on the sidebar.

You can adjust the search options to include text occurrences, not show results when there’s only one usage, or limit the search scope by using Shift + Alt + Cmd + F7 shortcut or clicking the first button on the right panel with search results.

Quick popup
If you want to see the results quickly without leaving the editor, simply press Alt + Cmd + F7.

Highlight usages
By default, AppCode highlights the usages of a symbol at the caret within the opened file in the editor.

However, you can disable this feature by deselecting Preferences | Editor | Highlight usages of element at the caret and calling it via Shift + Cmd + F7 instead, only when you need it.

This way you can highlight more than one symbol if you want, and to remove the highlighting by simply pressing Esc.

That’s it for today! Stay tuned!

Posted in Tips'n'Tricks | Leave a comment

Debugging with AppCode – what, where and how

In this post I’d like to cover some of the essentials regarding debugging with AppCode – how to add breakpoints and manage them, step through code, review variables, evaluate expressions and so on.

Let’s start with adding some line breakpoints – to set one just click in the left gutter next to the line in question, you’ll see a red dot appear there.
To remove it click on it again. When you have many breakpoints in different parts of your project, you can easily manage them using Breakpoints dialog that you can invoke with Shift+Cmd+F8 shortcut or from the main menu Run | View Breakpoints. Here you can find all the breakpoints you have in your project and modify their settings, for instance make one breakpoint dependant on another. In the screenshot below the breakpoint at line 25 of AppDelegate.m will be disabled unless the breakpoint at line 14 in ListViewController is hit.

You can also add a boolean condition for a breakpoint, so that debugger will stop on it only when the condition is met. Note, that you can use code completion here.

Another useful option here is called “Log evaluated expression”. Check it to have an expression entered in the field below evaluated in the context of a breakpoint and its value displayed in the debugging console.

In the same dialog you can delete a bunch of no longer needed breakpoints, and also temporarily mute some of them, if you think you might need them later. To do so, just uncheck them in the tree. They will be ignored until enabled again. You can also mute/unmute a breakpoint from the editor by Alt+clicking on it in the left gutter.

Let’s start debugging. By now you should know how to create and run a run configuration. To debug, the shortcut is almost the same, except where you normally press R (e.g. Ctrl+R) you need to hit D (Ctrl+D). If you run your app by clicking the green arrow in the upper right corner of the IDE, hit another icon right next to you – the one with, right, a bug.

Once you started debugging, you’ll see the Debug tool window appear in the bottom of the screen, just like with the Runner.

Whether there was an exception, a signal or a breakpoint was met, the debugger stops and AppCode navigates you to the line of code where the problem or a breakpoint occurred. It also switches from Console to Debugger tab in the Debugger tool window. What do we have there?

On the left side you see the threads like in the Debugger Navigator in Xcode, only in AppCode you choose a thread from a drop down, not by expanding a node in the tree.

Now, on the right side you see the variables. What do you normally do when you want to see the contents of NS-object, NS collection, NS dictionary or an STL container? I think it’s safe to assume that you use “print description”, right?
Well, you don’t need to do any of that in AppCode. Just expand the node in the tree and explore the values.

AppCode also provides a convenient way to browse Core Data objects and their relationships in debugger.

Stepping through code
In the Debugger tool window, you’ll see several options for that:

  • Step Over (F8): run until the next line in the current method, skipping the methods referenced at the current execution point (if any).
  • Step Into (F7): step into the method called at the current execution point.
  • Step Out (Shift+F8): step out of the current method, to the line executed right after it.
  • Run to Cursor (Alt+F9): resume the execution and pause when the execution point reaches the line at the current cursor location in the editor.

Note: Force Step Over (Alt+Shift+F8), Force Step Into (Alt+Shift+F7) and Force Run to Cursor (Alt+Cmd+F9) allow you to do similar actions but they ignore existing breakpoints on the way.

Need to evaluate an expression? Alt+F8 at your service. Type in an expression you want to evaluate (code completion works here), or first choose a variable in the Variables view and then press Alt+F8. Not many know though, that you can invoke it from the editor as well, just position the caret within an expression and hit Alt+F8 to have it evaluated.

Hope, you’ve learned a thing or two from this post. See more tips’n'tricks.

Posted in Tips'n'Tricks | Leave a comment

AppCode 2.1.2: better Xcode 5 support

Hello everyone!

We have a new update for you today – AppCode 2.1.2 that addresses a number of critical issues. A good part of those are related to debugger. Plus we have improved the compatibility with Xcode 5.

Take a look at the complete list of changes, download the build and tell us what you think. Your valuable feedback helps us make AppCode better, so keep it coming!

The AppCode Team

Posted in Announcement | Leave a comment

Unit testing with AppCode

Today we’ll talk about unit testing support in AppCode. We’ll assume that you already know how it works in Xcode, and that you’ve read our previous post about run configurations. Let’s focus more on the details of how it’s done in AppCode.

First, if you already have an Xcode project with configured unit tests in it, and you open it in AppCode, you need to create test run configurations: go to Run | Edit Configurations and add a OCUnit configuration.

Here you need to specify a class and methods to be run – note, that you can use code completion in these fields. If you leave the Class field blank, all tests in the target will be run. The rest of the options are similar to regular run configurations.

Now, when you want to run your tests, you can do it the same way you run your app – choose a configuration in the right upper corner of the IDE and click the green arrow button, or select it from the Run popup (Ctrl+Alt+R) invoked right from the editor.

When you run your tests, a dedicated tool window will appear at the bottom of the IDE showing you the progress and the results when ready.

Let’s take a moment to inspect the options that this tool window provides.
On the left vertical panel there are the two important options: rerun current configuration and stop.

You can find a number of options above the tests tree that can help you investigate the problems faster: hide successful tests, sort them alphabetically, navigate to previous/next failed test (which can also be done with shortcuts Alt+Cmd+Up/Alt+Cmd+Down) and export test results.

To find a test in the tree by name you can use speed search like in many other views – just start typing its name.

Under a gear-like icon you’ll find a number of settings allowing you to control the presentation of the tests in the view and enabling additional features e.g. statistics.

From this tool window you can easily navigate to the failing test code – simply click on the test in the tree. When you have fixed it, you don’t need to re-run the whole bunch of tests, you can re-run only this test in question: select the test and hit Ctrl+Shift+R (or choose it from the context menu).

You can also run a single test from the editor. Position the caret anywhere inside a test method and press Ctrl+Shift+R (Run [test name] from the context menu)to run this particular test. AppCode will create a temporary test run configuration which you can save and reuse later. You can also position the caret within a test class (but outside of the methods) and press Ctrl+Shift+R to run all tests in the class.

Now, in addition to all above, here’s a short FAQ.
If my project doesn’t have unit tests yet, how can I add them?
Currently you need Xcode to do that – can add Cocoa Unit Testing Bundle or Cocoa Touch Unit Testing Bundle target in Xcode. In AppCode you can add individual tests by generating them from Xcode template: in Project view hit Cmd+N and choose File from Xcode template.

Can I run tests on device?
Yes, you can – change the destination for test run configuration the same way as you do with normal run configurations.

Can I debug tests?
Yes, you can. Use Ctrl+Alt+D shortcut to debug instead of Ctrl+Alt+R.

How to run Kiwi tests?
The same way as OCUnit tests – configure Kiwi tests in Xcode, and create a test run configuration. You only need to remember to open *.xcworkspace project file not *.xcodeproj if you have added Kiwi tests via CocoaPods.

That’s about it!

Posted in Tips'n'Tricks | 9 Comments

AppCode 2.1.1 update is available

Hi folks,

in this update we have fixed a few critical problems, in particular in project building when error messages from custom scripts caused build to fail. Also, we’ve improved build messages output and error reporting.

Those of you who happened to have projects with complex dependencies (e.g. when iOS targets depend on OS X targets) can also try AppCode 2.1.1 with the latest Xcode developer preview – with new xcodebuild AppCode is able to correctly build such configurations. Please note that this only is supported if AppCode 2.1.1 runs on Xcode 5 DP2 (check used Xcode version in AppCode | Preferences | Xcode).

There is a known issue with Xcode 5 DP2 – iPhone simulator may hang when launched from AppCode. To workaround the problem, use File | Open Project in Xcode, launch iPhone simulator from Xcode and select Hardware | Device | iPhone Retina. After that AppCode will be able to launch simulator correctly.
We are working on the fix and it will be available in 2.1.2.

Please let us know if you have any other issues with DP2 – as usual bug reports are very welcome in our public tracker.

You can download the build manually, or wait till auto-update is available.

All the best,
The AppCode Team

Posted in Announcement | 1 Comment