Titanium.API.info Not Working?
After recently upgrading OS X and Xcode, my Titanium iOS simulator log had some serious issues. Issues, as in, Titanium.API.info not working at all. A quick Googling let me to this three year old Appcelerator Question forum post. While the post was for an old version of Titanium, Xcode, and version 4 of the iPhone simulator, the same situation had reappeared for the latest simulator version.
The basic problem is that the Titanium console uses symbolic links to read from the iPhone Simulator app’s log. Every time the simulator gets an upgrade to a new version, the Titanium build process must be modified, and Appcelerator has to push out an update for Titanium Studio. Sometimes they’re not right on top of that, Rose.
After personally running into this problem, I quick fixed my issue using that post as a guideline. A few days later, I switched the simulator’s hardware option from
iPhone Retina (4-inch) to
iPhone Retina (4-inch 64-bit). This killed my Titanium console log again.
The point is, until Appcelerator pushes out an update, any time you switch the hardware option of the simulator, you’ll need to update your symlinks.
Let’s Fix It, Felix
So let’s walk through the simple process. First, open up a command prompt and change directory to the iPhone Simulator support directory. Then take a look at any existing sym links with
cd ~/Library/Application\ Support/iPhone\ Simulator ls -la
Next, we need to create a symbolic link to the simulator we’re using. We’ll use the
ln command with the
-s option to create the symlink. Here, I’m assuming we’re using the 64-bit version of the iOS 7 simulator.
ln -s 7.0.3-64 7.0 ls -la
That’s it. Rebuild and run your project, and you should be good to go. You can confirm your new symlink with the
ls -la command. Just remember you’ll need to change this symlink every time you change the simulator hardware option, at least, until Appcelerator gets this implemented into the latest build process.