ios / Mac OS X1 Comment
May 12

Xcode 4.3.2 on OS X Lion fails to deploy app to an iPhone on iOS 5.1.1

A seriously frustrating and naturally time-consuming issue paralyzed me today.

Apple recently released the iOS 5.1.1 update to its mobile devices. Sounds minor and it probably was. But 5.1.1 also signaled the end of life for using OS X 10.6 Snow Leopard for developing for newer OS versions. Snow Leopard supports devices with iOS up to 5.1. Yup, not 5.1.1. Just 5.1. Not much of a heads up but well – time to move on to Lion. So I do.

Today came another surprise. The most current release version of Xcode – 4.3.2 – did not appear to enjoy my iPhone and its iOS 5.1.1. Organizer saw the device, added it to the provisioning portal team (removed, added, removed, added, etc.) and added and removed the provisioning profile for the app. Still, Xcode would fail to recognize the device and stick with the blank 'iOS Device' in the execution scheme.

Finally, I stumbled across this post in Apple's Developer Forum:

"The latest Xcode for Snow Leopard is 4.2 and that appears to be the highest it will go. 10.6.8 is required for iOS support.

The latest Xcode for Lion as of 5.7.2012 is 4.3.2, which requires 10.7.3 and is needed to work with iOS devices at iOS v5.1.x – v4.3.2 is an application that will be installed to your /Applications folder. Xcode 4.3.2 comes with 5.1 SDK and supports iOS 5.1.1…connect your device and let Xcode download 5.1.1 symbols."

The part I seemed to be missing seemed to be the "let Xcode download 5.1.1 symbols".

Further digging on StackOverflow had the answer: essentially power cycle your iOS device and THEN reconnect it to your Mac. Let iTunes start up and finish its scan of the device. Then close it and start Xcode. I ended up also restarting my machine. I then created a NEW project and had it detect the iOS 5.1.1 device successfully.

Still, I am unable to get projects that were created before 5.1.1 came out to detect the device. Luckily nothing is major there but this is clearly a rather grim bug in Xcode.

Jan 12

Parallels and Windows 7 really hate Virtual Box

While I am a huge fan of Virtual Box, work supplies us with Parallels and a Windows 7 virtual machine. I find Parallels to be slower but it works overall just fine. Recently I wanted to install a Linux VM so I installed Virtual Box on my Mac. As always, Virtual Box installs virtual network cards (vnic) and makes some modifications to the underlying OS.

My Parallels Windows 7 VM was running using shared networking. I needed to have it be accessible outside the host so I switched it to Bridged Networking using the host's Ethernet device. At that point something weird happened: the VM would connect to the network, get an IP address assigned, but it would report failing to get to the network gateway. It failed to see the outside Internet. Trying all sorts of Windows networking tricks did nothing to alleviate the situation, with Windows reporting that 'unauthenticated domain'. 

The solution: removing Virtual Box using the script that comes on its dmg installer, restarting the Mac host and starting Parallels again. Suddenly I was able to connect to the network just fine. 

Hope it helps others.

Jan 12

Enabling Oracle OCI8 PHP Extension on OS X Snow Leopard

My current project involves using PHP with an Oracle database. Oracle apparently embraces PHP warmly and as such supports an open source database driver for the environment called OCI8. As a Mac user I was looking to use OS X's built-in Apache and PHP setup, which like many PHP installations does not have the Oracle OCI8 driver installed or enabled. It took me some time and research to get it up and running. I was using Oracle Express, a limited capability, free-ish version of Oracle's database. Oracle Express was installed on a separate Windows machine as it cannot run or be installed on Snow Leopard. I also assume that you enabled PHP in your Apache configuration (/etc/apache2/httpd.conf) and have a /etc/php.ini by copying it from /etc/php.ini.default.

OCI8 relies on OS X having several client libraries and tools from Oracle installed on OS X. For most intents and purposes download the 64-bit version of the following files under the title "Version (64-bit)": 

Registration is required for all downloads.

Continue reading →