Posted on Nov 3, 2011

How to enable Airdrop on old Macs running Lion

Airdrop is a feature available in Lion that allows users to easily share files between Macs without sharing a connection to the same Wi-Fi Network.
It uses PAN to provide for p2p connection (like Bluetooth does).
It may happen that your old mac does not carry a Wi-Fi module capable of supporting this type of network but there’s a known workaround to make this possible.
Fire up your terminal and issue

defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

Once you did that, relaunch Finder by Opt+Clicking onto the Finder icon in the dock or by issuing

killall Finder

in a terminal shell.

Now you should have your old-fashioned MacBook running both Lion and Airdrop.

Thank you @LorenzoMMariani that pointed this out to my attention.

Posted on Jul 21, 2011

How to burn Lion boot image once installed

Plenty of websites and users have posted the solution to the problem “How can I burn a Lion image onto a DVD?”. What I was really looking for today is a way to get the installation files back in order to be capable of extracting the dmg file containing the image to burn.

The solution is pretty trivial: fire up the Mac App Store and click on the “Purchased” tab on the top. You’ll get the list of applications you have previously bought. Around the top of such list there should be an entry labeled “OS X Lion”. Keeping your “alt” button pressed, click on that entry (on the name). You will enter the Lion page but the install button is now labeled as “Install”. Keep the “alt” key button pressed and click on the “Install” button. The Mac App Store will ask you again for your Apple ID. Issue your credentials and enjoy (once again) the download.

The following steps are the same proposed in many blogs on how to burn OSX Lion dmg image.

After the download completes, go into “Applications” and search for the “Install OS X Lion.app” file. Right click -> Show package content, locate “SharedSupport” directory and pick up the file named “InstallESD.dmg”. Copy it somewhere else and burn it. Oh you just need a common DVD-R single layer.

See ya!

Posted on Apr 11, 2011

Early 2011 Macbook Pro GPU Switch

Today I tried gfxCardStatus, an application that allows you to monitor whether you are using the integrated or the discrete GPU.

I have nothing to complain about how long lasts my battery, I just did it out of curiosity.

I discovered, on regular basis, that when I open Chrome and I go to a page containing flash video (such as Youtube) the application notifies me that the discrete GPU has been turned on. It is not a big deal. The tricky part comes when you actuallly close the page containing such player.
The application keeps telling me that the discrete GPU is still enabled.

As you can see, from the image below, gfxCardStatus says that there is a process asking for the GPU. This process is Chrome, indeed.

The real problem here is that the only solution to turn the discrete GPU off and switch back to the integrated one is to completely close Chrome. I guess this is because of the Flash Player staying in background even when you close the tab responsible for it.

Then I tried with Safari and the discrete GPU card is not turned on. Furthermore, the same things, for both the scenarios above, happen if I try with the HTML 5 player.

This makes me think that Apple is properly using the discrete/integrated GPU switch and, for third party developers, having set a low threshold (I don’t know on which kind of parameter) in order to turn on the discrete GPU even if it should be unnecessary.

Posted on Feb 24, 2011

Why the recent MacBook upgrade sucks

This article contains my merely opinion about the recent MacBooks upgrade.
Feel free to ignore this article if you are not interested in non-technical content.

As you have probably already heard about, the Apple new MacBooks are available in the Apple Store. From my point of view this upgrade is really disappointing. They are nothing but the same old MacBooks with a state of the art processor soldered inside.

A question arises: “What did you expect? It’s just an ordinary upgrade, you should have nothing to complain about that”.
Indeed, that’s true. The problem is not Apple’s. The problem comes from all the (inaccurate) rumors surrounding Apple products.

First of all we heard about mockups regarding the MacBook Liquid Metal inspired by the recently introduced dark-gray bar in the Apple website.
This is just a mockup. Something that I, in first place, should have never deceived myself thinking that would have been real.
Then we heard about MacBooks going to become lighter, cheaper and longer-lasting 1. Let me say that all of these rumors didn’t turn out to be true.

1. Longer-lasting batteries: the opposite. The cached version of previous MacBook Pro page states about 9-10 hours of battery. The new one says up to 7 hours. The same occurred for the White MacBook, even if it remained untouched by this upgrade.
Here, actually, Apple is playing a little bit dirty. They claim about having “new, more powerful processor and still having the same autonomy before”. That’s actually untrue, as proven above.

2. Ligher: The weight remained the same.

3. Cheaper: Both version costs the same.

So, beside the processor, the clock of the RAM and the fantastic Thunderbolt port, nothing relevant had changed.

  • Rumors about Apple were going to dismiss the 13 inches white model. It is still available.
  • Rumors about having a third USB port. Fake.
  • Rumors about having the option to remove the Superdrive to leave room for another HDD. Fake.
  • Rumors about having the SSD hard-disk by default on the 15" inches model. Fake.
  • Rumors about having the High Resolution on all the 15" display by default. So fake.

These are the rumors that just came in my mind and I haven’t even begun looking for them. I can bet you have heard even more than me.

Let me repeat that again: it is not Apple fault. It’s all about rumors. We should stop listening to them, websites that claim to be “reliable” should not report them.
Honestly I was thinking about retiring my almost 4 years old MacBook and buying a new one, but all the hype surrounding this upgrade just smashed to the ground due to the facts I aforementioned; so I guess I will wait maybe another year.

Or, if you want to see it in another way, this could be the best upgrade that a late 2010 MacBook owner would have ever imagined.

Oh, of course, if you want to know rumors say that next year will be the “Liquid-metal year”. Screw you.

1 This is actually the first source I found. If you browse the Internet you will find plenty of them.

Posted on Dec 21, 2010

iOS4 and wireless application deploy

Starting from iOS4 it is possible to publish applications on to a generic webserver and allow people to download an application with just a single “tap” without using iTunes or Xcode.

The operation is quite straightforward and also well documented in the related Apple Documentation. This is only possible, of course, if you have a valid developer certificate and a list of UUIDs of the devices enabled to run the application onto. Such list is part of the so called “provisioning profile” that is generated through the Apple Developer Portal. The idea is that this method is useful for enterprise development (aka Ad Hoc) and you don’t want to deal with colleagues asking for a new deploy or for the latest version every time you update your application or fix some bug.

So let’s start setting up our system. Fire up Xcode and select Build -> Build and Archive. The Organiser will pop-up. Select the build you want to publish and click on the Share... button above the list. Select then the identity you want to sign your code with (usually this is the same you use for signing the code for a standard deploy on the device). Click, then, on Distribuite for Enterprise..

At this point a form will appear asking you from which URL the application should be downloaded from. Let’s suppose your website is available at www.example.com and your application (the file .ipa) is hosted at www.example.com/download/myapp.ipa, then http://www.example.com/download/myapp.ipa should go in that field. [See the update below]
Fill the other fields as you wish; you can get more information about that in the Apple Documentation

Once you filled the form and clicked OK select the place where to save the generated files (ipa and plist).
Congrats you are done!

Now the tricky parts comes when you have to deal with the webserver-side code. I have created a small example page below.
Remember that you have to put on your website all the files: myapp.ipa, myapp.plist and myapp.mobileprovision.

<!DOCTYPE HTML>
<html>
  <head>
    <title>Install your application</title>
  </head>
  <body>
    <ul>
      <li> <a href="http://www.example.com/download/myapp.mobileprovision">Install Team Provisioning File</a></li>
      <li><a href="itms-services://?action=download-manifest&url=http%3A%2F%2Fwww.example.com%2Fdownload%2Fmyapp.plist">Install Application</a></li>
    </ul>
    </div>
  </body>
</html>

Please notice that the second href is nothing just a plain old-fashioned URL. Nothing special into that. If you are wondering about those weird %2F and %3A they are normal urlencoded symbols (for ‘/’ and ‘:’ resp.).
Once you did this you are definitely done.

Maybe if I find some time in the near future I will upload a php page that updates automagically the links to the new application snapshot you publish.

Happy sharin’ :)

[UPDATE 11st January 2011]
Please remember that in the URL textfield you should put exactly the link to the file that is going to be hosted on your website. Is it then necessary that you put the same filename both in that URL field as well as in the filename field where Xcode asks you where to put your archived application (the ipa and plist files).