Category Archives: Uncategorized

iOS Goodies

Just release a new blog to act as a weekly digest for what’s happening in the iOS world (articles, controls, UI). Hope you like it.

Advertisements
Tagged , ,

How debug Node.js applications using Eclipse

eclipse-node

In this post I’ll help understand how can debugging a Node.js application from scrach.

Requirements

You need installed in you computer the following tolls:

  • Java
  • Eclipse
  • Node.js (make sure that you have access a node command in your command line tool)

Create a Simple Node.JS application

First, we’ll install express.

npm install -g express

Note: The -g flag means that you are installing express globally on your system.

So, now we are available for create a node.js application using express.

express -c stylus express-app-sample

Note: The -c states that we want to use stylus for css.

The next step, is install the app dependencies. So, we need enter express-app-sample folder and install. We can do that with the following commands:

cd express-app-sample
npm install

And now we’re available for running our app. What we need to do is the following command.

node app.js

You should see Express server listening on port 3000 and if you open http://localhost:3000 you’ll see the default Express page.

Debugging Node.js application using Eclipse

Install Eclipse debugger plugin for V8

With Eclipse debugger plugin for V8 we can easy used for debugging node applications. This is the steps to install the plugin on Eclipse:

  1. Select the menu item Help > Install New Software…
  2. Click on Add… button.
  3. In the textbox labeled Name: enter Google Chrome Developer Tools. In the textbox labeled Location: enter http://chromedevtools.googlecode.com/svn/update/dev/. Click OK.
  4. Select Google Chrome Developer Toolshttp://chromedevtools.googlecode.com/svn/update/dev/ from the combo box Work with.
  5. Click the checkbox next to Google Chrome Developer Tools in the table. And Click the button labeled Next >.
  6. Accept the terms of the license agreement and click the button labeled Finish.
  7. Eclipse will restart with the V8 Eclipse Debugging Plugin installed.

Debug node.js application

  1. Using node.js command line, we’ll launch our app on debug mode, using the following command:
    node --debug=5858 app.js
    
  2. In the Menu, choose Window > Open Perspective > Other, then select Debug from the list and click OK, to ensure we are viewing the debug perspective.
  3. Click the drop box button next to the green bug one and select “Debug Configurations …” option.
    debug-configurations
  4. Start the debugging by clicking “Debug” button. If everything goes well, we’ll get something like this:
    node.js-debug
  5. So, we just need to put breakpoints on the project that appears when we start debugging, in the Project Explorer, to debug.

NOTE: You can find out more about debugging node.js applications using Eclipse in this link.

Tagged , , ,

iOS 7

iOS 7

Tagged

TestFlight + Xcode + Archive Post-Script = win

Imagem

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:

Imagem

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 on the Terminal

Looking good, although I also added the following:

  • Changed the font to Inconsolata 15p.
  • Window Size => 130 columns 30 rows

Imagem

Tagged , , ,

Facebook Native Integration in iOS 6

The facebook integration has been a bit of pain for me, so in order to help others, I am going to provide the best links for integration. In case you want to use Facebook’s own SDK, you can always go here. On the other hand, if you prefer to use the native features:

1. For posting content.

2. For authentication.

3. For retrieving the user’s info. 

Tagged , , ,