Archives for the ‘Apple’ Category

12 Jun 2014

TIP: Create global batch files for use in Terminal

I’m slowly but surely becoming a huge fan of running my development workflows through Terminal on my Mac, especially in the case of mobile development using Appcelerator Titanium. This is a quick tip to show you how to group terminal commands into batch files and have these batch files accessible anywhere when working in Terminal.


  • I haven’t moved to Mavericks as yet, so my example below applies to Mountain Lion, but should also apply to Mavericks
  • In my example below, my batch file navigates to the required folder, builds and runs my mobile app the iPad Simulator
  • To enable/disable hidden folders and files in Finder, I recommend using Funter or Mountain Tweaks
  • You can’t double click on a hidden file to open it, you need to right-click on the file and select “Open”

Do The Following

  • Open TextEdit and add your commands to it, each command on a new line (See below what I did)


  • Save this file and provide a file name without a suffix/file extension (i.e. file name = debugapp) and put it in a folder of your choosing. (e.g. “Users/{username}/Documents/terminalcommands“)
  • Under the “Users/{username}” folder, search for a hidden file called “.bash_profile” and open it
  • NOTE: if you can view hidden files in Finder and you don’t see the “.bash_profile” file, you will need to create it using TextEdit or something similar
  • Next, to add your folder path to the PATH Environment Variable, on a new line, type in export PATH=/Users/{username}/Documents/terminalcommands:$PATH


  • Save and Close
  • Restart Terminal

Test if this worked

  • You can check the $PATH variable by entering echo $PATH in Terminal
  • To run your batch file, simply enter the batch file name (e.g. debugapp) in Terminal
I hope this works for you :)
15 Apr 2014

Install previous versions of iOS SDK in your current version of Xcode

In some cases, one might be developing for iOS6 and therefore require the iOS6.1 SDK. Xcode 5 however, no longer has the iOS6.1 SDK installed. In this article I’ll show you how to install the iOS6.1 SDK in your current version of Xcode.

Download Xcode 4.6.3 to get the iOS6.1 SDK and Simulator

  • Make sure Xcode is closed. If you are using Appcelerator Titanium, make sure that’s closed as well.
  • Go to Apple’s Developer Center
  • Log into iOS Dev Center (You will need an Apple Developer License for this)
  • Under Downloads, where it currently shows Xcode 5, Click on “Go to older versions of XCode
  • Let’s say you want the latest iOS6 SDK, that would be XCode 4.6.3. Search for it in the list and download the full Xcode package (about 1.6GB)


Install the iOS6.1 SDK and Simulator

  • Once downloaded, double click on the “xxx.dmg” file.
  • Right click on and select “Show Package Contents
  • Navigate to “Contents\Developer\Platforms“.

- When in the Platforms folder, to copy over the iOS 6.1 SDK:

  • In “iPhoneOS.platform\Developer\SDKs”, copy the folder “iPhoneOS6.1.sdk”.
  • In your Finder Window, go to “Applications”.
  • Right click on and select “Show Package Contents”
  • Navigate to “Contents\Developer\Platforms\iPhoneOS.platform\Developer\SDKs”.
  • Paste the “iPhoneOS6.1.sdk” folder.

- When in the Platforms folder, to copy over the iOS 6.1 Simulator:

  • In “iPhoneSimulator.platform\Developer\SDKs”, copy the folder “iPhoneSimulator6.1.sdk”.
  • In your Finder Window, go to “Applications”.
  • Right click on and select “Show Package Contents”
  • Navigate to “Contents\Developer\Platforms\iPhoneSimulator.platform\Developer\SDKs”.
  • Paste the “iPhoneSimulator6.1.sdk” folder.


That’s it. You can now use iOS6.1 SDK and Simulator as well as whatever current SDK and simulator you had installed.

Till next time, enjoy :)
2 Oct 2012

The Apple iOS6 Beta Rude Awakening

Hi everyone. This post is a “Good To Know”, but is mainly for those who installed the Beta version of iOS6 a while back.

Yesterday morning I had a Rude Awakening when both my iPad2 and iPhone 4s were deactivated. Now, I’m fairly new to the Apple Developers Program and this was the first time I had a Beta running on my devices. At first I thought it was something related to Apple’s new Terms and Agreement and that they were forcing everyone to re-activate their devices, so I play nice and click on the “Activate” button. Sadly, no matter how many times I try to Activate, I keep getting a message that the Server is unavailable.

Next up, I start mailing around (Because I can’t phone around thanks to been deactivated) to find out if others have this problem. Nope, it’s only me. I immediately knew that it had something to do with me running iOS6 Beta. What concerned me though was that I on numerous occasions checked for updates only for my iPhone and iPad2 to tell me I am up to date. So that’s already 2 misleading messages from Apple. Bleh.

The only good message I got was when I connected to my iTunes. iTunes tells me immediately that my software has expired. Great, so all I need to do is download the new iOS6 Installs and I’ll be sorted. The only problem is that both installs come to 1.8GB in size and I was working remotely on a 3G Internet Account. This meant that I had to spend the entire day without my iPhone and iPad2 which I rely on heavily.

Finally, last night I got home and began downloading the installs (via a 1Meg ADSL Line that should be pumping out 4Megs – Thanks again Telkom).

The end result is that I woke this morning, ran an update on both devices via iTunes Restore and BOOM! All is working again.

I think the bottom line is that had Apple provided intelligent Messages instead of just the general “Cannot connect to server at this time”, I would’ve known from yesterday morning what needed to be done. Furthermore, according to iTunes and my Devices I was already running iOS6 and not iOS6 Beta 3. Had they provided the correct info I would’ve reacted a while ago already. I expect a bit more from Apple.




12 Jul 2012

How to check your OS X Version, Processor and Memory Information on your Mac

Hi All. I thought I’d add this to my Blog. It’s simple enough if you’re an inquisitive person, but for those who just want to know….in order to view your Processor and Memory Details, as well as the current version of OS X, simply click on the Apple icon, followed by clicking on About This Mac.

Please note, I’m not sure how it works on previous versions of Mac OS. I assume it’s similar.



About This Mac

About This Mac