Archive for the ‘Xcode’ Category
XCode documentation alternative
When I started using XCode, one thing that catch my attention was the way the documentation is included in the tool. Do not get me wrong, the documentation provided is fantastic, but I do not like very much the way is provided. As you know it comes with a specially designed browser linked to XCode. This means that when XCode closes or hides, the doc closes or hides as well.
Another issue I found that this mentioned browser is very well designed to use with the mouse but (here I go again) not so much with the keyboard.
I have been for some times looking for an alternative to browse the documentation and here I suggest another way that works for me.
Omniweb as a documentation browsing tool
The first thing to notice is that the documentation comes in html (or pdf), so probably a browser can be the best shot. I read on some blogs about the simplicity and great navigability of OmniWeb from the Omni Group. I tried it and I found it was perfect for my purpose.
OmniWeb has lots of goodies to work with the keyboard from which I can highlight the fast search for links. Other browsers also have this feature where you can just start typing to search for some link and once the link is selected return to go there.
Another great feature of Omniweb is the capability to hide everything and looks like a simple window frame with just your favorites. This makes it far less distracting.

If you set up your favorites as the links to the local and remote documentation, then you can go directly with alt + 1..2..3..4 (the number of the favorite). That way if I want to go to the NSString reference page I do the following:
- “alt + 2″ to go to the Core Reference page.
- “NSSt” + return.
As you can see this is ultra fast. In fact I only have three local favorites:
- iPhone OS Reference library
- Core Reference library
- Developer Reference library
That way, the only thing I need to do is to type “alt” + 1 or 2 or 3 and start typing what I’m looking for. Once inside the page I can not use the same technique to find the area or exact think I’m looking for. The fast search only search links but not plain text. This means that I shall go with Cmd + F as usual.
The success of this approach to the developer documentation relays on the level of knowledge you get with your browsing tool (if you are a keyboard junkie you will understand this).
Getting the links to the local documentation.
One of the issues you will find is how to get the links to the local documentation. I can give you the whole path but there is a simple way to get the path of the local documentation you access all the time.
In the documentation browser that comes with XCode, search for the page you want and once there right click on the page will suggest you to open in another browser. Select it and there you have the address of that page.

Get the address and create a “Favorite” on OmniWeb.
So, this solution may not solve your daily live, but if you are geek enough to make everything with the keyboard this may make you happier.
Big event in Barcelona with iNVASIVECODE
This week in Barcelona. Do not miss it. We will go through the iPhone SDK and its potentialities.
NOW is a reflection on the present based on the scientific, technological, artistic, social and spiritual transformations that are taking place at the start of the 21st century. It is a process of research, creation and dissemination that aims to bring together different local and international agents involved in the actions that are promoting a change of paradigm in the information and knowledge society and in globalised cultures.
Highlights
XCode Tip: Tools Navigation
The mouse is a fantastic tool to work and explore what an application can do for us, but as long as we are coders, most of our time we have our hands on the keyboard. Moving to get the mouse to change context and back to the keyboard is something that we can avoid in a lot of situations.
I love the keyboard, and I usually spend some time improving my knowledge about the shortcuts on the tools I use, in order to be able to work faster. I did this exercise with XCode some time ago and here I expose some of the shortcuts I use the most.
The XCode Editor is a big topic so I will cover it in another post, here I’ll focus on the navigability among some of the tools offered by XCode.
Configuration
I have configured XCode to have editor and debugger in the same window frame, this can be done on the General tab on the XCode preferences pane.

On setting this option, a selector will appear on the top left to select between the debugger window and the project/edit view.
![]()
To the debugger and back
On build and go (⌘ + ⏎) the debugger will be opened hiding the debugger editor. Once you are done with it you can go back to the project using ⌘ + 0. This shortcut will open the project/editor and the editor will get the focus, so you can edit right away.
The same ⌘ + 0 will take you to the project pane so you can select a file using the arrows. Here, if the file you want to open is visible (not disclose) you can also type directly the name of the file to open it. I miss here some of the Textmate powerful features to open resources. Three tabs (⇥) here will take you to the editor again.
Once on the editor, it may happen that the window is split in two. At the top you have a window for the build and find results (and others). At the bottom you have the code editor. Using ⇧ + ⌘ + E you make the editor using as much space as possible. If you hit it again you will go back to the previous state.
In any moment on the project/editor window you can use ⇧ + ⌘ + Y to go back to the debugger. In the debugger ⇧ + ⌘ + R will set the focus on the Console so you can type commands.
So, as can be seen, with for shortcuts you can move to the debugger and back and also go to the console and the editor. Only this, saves me lots of mouse.
Files on the editor
On the editor you need to move around the different files. A typical action is open the counter part (h or m) file. You can do this using ⌘ + ⌥ + ↑.
At the top of the editor window you have to small combo menus. One for the opened files and another for the symbols on the currently edited file.

You can open these with the keyboard using ⌃ + 1 and ⌃ + 2. These two shortcuts may collide with your spaces configuration so I have changed the shortcut to ⌃ + ⌥ + 1 and ⌃ + ⌥ + 2.
Finally, think that you can also go to preferences and change the shortcuts to something more suitable to you.





