Category Archives: Xcode

Architecting with Blocks part 2

(Note: This is part 2 of a series of posts about Architecting an application using blocks in objective-c. By no means I am an expert on using blocks, and also it’s not the intention of this series to teach you how to use blocks. You can check this for that. To finalise, I am sure there are better ways to use blocks while architecting an app: use this at your own risk. :))

This is the final post from a 2 parts series that I start a long ago. In this case I won’t show any snippet of code, I will give away an entire sample. My approach about this matter, change in the meantime, nonetheless hope you enjoy it. You can find it here .

Tagged , , , , , , ,

Xcode Hidden features

A nice thread @ stackoverflow about hidden features in Xcode

Tagged , ,

TestFlight + Xcode + Archive Post-Script = win


For some time now I wondered how I could do automatic uploads to Test Flight. As you might have guessed, they allow to make builds uploads by using their API, which is quite straightforward. So, I read somewhere that some people already had created scripts to do this automatically for you. A big bonus here, is that Xcode, allows you to run scripts after an archive has been made:


This can easily be found when editing your schemas. After that just add this. And the blog post talking about it. I have tried the first  suggestion, but the 2nd one was the most complete. Besides allowing you to select some stuff (distribution lists, Provisioning profile, etc) it also shows you what’s going on the console. So have fun!

Tagged , , , , , , , ,

Solarized Theme

Was actually looking for a new theme for my Terminal, when I found this. In the end I just putted on Xcode, and I might add it looks really nice.


Tagged , , ,

Breakpoints fun in Xcode

Xcode although every 15 minutes will crash, gives you some nice features related to breakpoints. One of those things is the ability to based on a given condition do something. Imagine that when a  var inside your code is equal to 50, you want to output the result:

  1. Start by adding a breakpoint where you want.
  2. Right click on it -> Edit Breakpoint.
  3. Something like this will show up:

Screen Shot 2013-04-26 at 08.53.09

So, after this, add the following condition:

x == 50

And the respective action that you want to be produce if that given condition happens, in this case we will just output in the console:

p x

(“p x” means print x. While for objects you would say “po x”, being “po” “print object”)

In the end you will have this:

Screen Shot 2013-04-26 at 09.01.00

And the corresponding output:

Screen Shot 2013-04-26 at 09.01.51

You can also add different actions ( the “p x” is just a simple example):

Screen Shot 2013-04-26 at 09.02.46

Finally, you can add multiple actions to be done at the same time and continue evaluation after the breakpoint is reached. The last one, is uber important, if you don’t want to break the natural flow of your manual debugging, but you want to avoid polluting your code with conditional if’s to Log things.

Tagged , , , ,