Xcode 4.6 Released!

Head your browsers to Apple’s Development Center. Apple has just released Xcode 4.6, with iOS 6.1 support (Release!).

So far it has proven to be sooooo much stable. The previous release was a nightmare, specially during summertime. (Those of you who run Xcode on macbooks understand me… the entire machine turns into an iron!).

However, i’ve been reading quite a lot of reports, from many different sources, pointing out that although 4.6 freezes less, it still has a couple of severe bugs, that will lower your productivity.

Xcode

Disabling Jetpack Stats

So… you just connected Jetpack to wordpress.com, and you can’t figure out how to disable the stats module… right?.

It’s fairly easy. Firt, head to the admin, an click ‘Jetpack’ on the left menu. Then, click the ‘Learn More’ button in the ‘Wordpress Stats’ section. You should be seeing the following:

deactivate-jetpack-stats

Notice the ‘Deactivate’ button that appeared, right by the ‘Learn More’ button?. Click it.

That’s it… Wordpress Stats should be disabled by now!

We got a new domain!

Well, as you might have noticed, we’ve got a brand new domain: lantean.co. This is sort of an experiment to me, to see if rankings can actually improve by leaving behind the .com.ar domain. (Since this site is written, essentially, in english, and .com.ar is geotargetted for Argentina).

updating-domain-name

What was done in order to attempt to prevent drops in rankings?.

  1. 301 redirects from the old domain. How?. the .htaccess looks like this:
    RewriteCond %{HTTP_HOST} !^www.lantean.co$ [NC]
    RewriteRule ^(.*)$ /$1 [R=301,L]
  2. I’ve indicated Google Webmaster Tools that the website has been moved. Here are the details.
  3. I’ve crossed my fingers!

Stay tuned for updates!

Fixing 'Could Not Read from Device' Xcode Error

Did you just get this error while trying to run your app in Xcode?…

Could not read from device

The fix is fairly simple. Simply launch iTunes, make sure the device is plugged in, and synchronize. The error should be gone by now.

Told you, it was a quick fix!

Knowing Memory Usage in iOS

This task is quite straightforward. First, import the following headers:

#import <mach/mach.h>
#import <mach/mach_host.h>

Now what?. Simple… use this method:

-(void)printMemoryUsage
{
    mach_port_t host_port;
    mach_msg_type_number_t host_size;
    vm_size_t pagesize;

    host_port = mach_host_self();
    host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
    host_page_size(host_port, &pagesize);

    vm_statistics_data_t vm_stat;

    if (host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size) != KERN_SUCCESS)
    {
        NSLog(@"Failed to fetch vm statistics");
    }

    /* Stats in bytes */
    natural_t mem_used = (vm_stat.active_count +
                          vm_stat.inactive_count +
                          vm_stat.wire_count) * pagesize;
    natural_t mem_free = vm_stat.free_count * pagesize;
    natural_t mem_total = mem_used + mem_free;

    NSLog(@"used: %u free: %u total: %u", mem_used, mem_free, mem_total);
}

Credits: This is a snippet taken from this Stackoverflow question.